From c69a5a69f993276d7cbf9563470d01fab4217273 Mon Sep 17 00:00:00 2001 From: Filipe Manuel Couto Pinheiro Date: Tue, 9 Jul 2019 01:21:43 +0100 Subject: [PATCH 01/82] Fix for Issue #2205 Because when we have tags on OpenAPI Specification, there can be more than 1 Feign Beans being generated and the title field is share by all the clients. This makes the code to stop working in runtime. Here is a PR which uses the classVarName instead, which follows the standards and should be enough to solve this issue. For more info please refer to: https://github.com/OpenAPITools/openapi-generator/issues/2205 --- .../JavaSpring/libraries/spring-cloud/apiClient.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache index 2a3e72fb1c..f00a6c3b6f 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache @@ -4,7 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient; import {{configPackage}}.ClientConfiguration; {{=<% %>=}} -@FeignClient(name="${<%title%>.name:<%title%>}", url="${<%title%>.url:<%basePath%>}", configuration = ClientConfiguration.class) +@FeignClient(name="${<%classVarName%>.name:<%classVarName%>}", url="${<%classVarName%>.url:<%basePath%>}", configuration = ClientConfiguration.class) <%={{ }}=%> public interface {{classname}}Client extends {{classname}} { -} \ No newline at end of file +} From 85f43a300093264b77879a2db53d9876023e725c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 29 Dec 2019 14:55:08 +0800 Subject: [PATCH 02/82] fix java feign parameter request name (#4883) --- .../main/resources/Java/libraries/feign/api.mustache | 4 ++-- .../main/java/org/openapitools/client/api/FakeApi.java | 10 +++++----- .../main/java/org/openapitools/client/api/PetApi.java | 2 +- .../java/org/openapitools/client/api/StoreApi.java | 4 ++-- .../main/java/org/openapitools/client/api/FakeApi.java | 10 +++++----- .../main/java/org/openapitools/client/api/PetApi.java | 2 +- .../java/org/openapitools/client/api/StoreApi.java | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache index b446223ba5..238079ca27 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache @@ -42,7 +42,7 @@ public interface {{classname}} extends ApiClient.Api { "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, {{/hasMore}}{{/headerParams}} }) - {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{baseName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#hasQueryParams}} /** @@ -80,7 +80,7 @@ public interface {{classname}} extends ApiClient.Api { "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, {{/hasMore}}{{/headerParams}} }) - {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map queryParams); + {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{baseName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java index 601e2527ee..17404af4c5 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java @@ -181,7 +181,7 @@ public interface FakeApi extends ApiClient.Api { "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", }) - void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback); + void testEndpointParameters(@Param("number") BigDecimal number, @Param("double") Double _double, @Param("pattern_without_delimiter") String patternWithoutDelimiter, @Param("byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("callback") String paramCallback); /** * To test enum parameters @@ -203,7 +203,7 @@ public interface FakeApi extends ApiClient.Api { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_query_string_array") List enumQueryStringArray, @Param("enum_query_string") String enumQueryString, @Param("enum_query_integer") Integer enumQueryInteger, @Param("enum_query_double") Double enumQueryDouble, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString); /** * To test enum parameters @@ -234,7 +234,7 @@ public interface FakeApi extends ApiClient.Api { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map queryParams); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the @@ -276,7 +276,7 @@ public interface FakeApi extends ApiClient.Api { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); + void testGroupParameters(@Param("required_string_group") Integer requiredStringGroup, @Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("required_int64_group") Long requiredInt64Group, @Param("string_group") Integer stringGroup, @Param("boolean_group") Boolean booleanGroup, @Param("int64_group") Long int64Group); /** * Fake endpoint to test group parameters (optional) @@ -304,7 +304,7 @@ public interface FakeApi extends ApiClient.Api { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); + void testGroupParameters(@Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("boolean_group") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java index 4996156d28..5226f76408 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java @@ -40,7 +40,7 @@ public interface PetApi extends ApiClient.Api { "Accept: application/json", "api_key: {apiKey}" }) - void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey); + void deletePet(@Param("petId") Long petId, @Param("api_key") String apiKey); /** * Finds Pets by status diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java index 30757ed573..2dba62319d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java @@ -24,7 +24,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - void deleteOrder(@Param("orderId") String orderId); + void deleteOrder(@Param("order_id") String orderId); /** * Returns pet inventories by status @@ -47,7 +47,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - Order getOrderById(@Param("orderId") Long orderId); + Order getOrderById(@Param("order_id") Long orderId); /** * Place an order for a pet diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java index 601e2527ee..17404af4c5 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java @@ -181,7 +181,7 @@ public interface FakeApi extends ApiClient.Api { "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", }) - void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback); + void testEndpointParameters(@Param("number") BigDecimal number, @Param("double") Double _double, @Param("pattern_without_delimiter") String patternWithoutDelimiter, @Param("byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("callback") String paramCallback); /** * To test enum parameters @@ -203,7 +203,7 @@ public interface FakeApi extends ApiClient.Api { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_query_string_array") List enumQueryStringArray, @Param("enum_query_string") String enumQueryString, @Param("enum_query_integer") Integer enumQueryInteger, @Param("enum_query_double") Double enumQueryDouble, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString); /** * To test enum parameters @@ -234,7 +234,7 @@ public interface FakeApi extends ApiClient.Api { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map queryParams); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the @@ -276,7 +276,7 @@ public interface FakeApi extends ApiClient.Api { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); + void testGroupParameters(@Param("required_string_group") Integer requiredStringGroup, @Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("required_int64_group") Long requiredInt64Group, @Param("string_group") Integer stringGroup, @Param("boolean_group") Boolean booleanGroup, @Param("int64_group") Long int64Group); /** * Fake endpoint to test group parameters (optional) @@ -304,7 +304,7 @@ public interface FakeApi extends ApiClient.Api { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); + void testGroupParameters(@Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("boolean_group") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java index 4996156d28..5226f76408 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java @@ -40,7 +40,7 @@ public interface PetApi extends ApiClient.Api { "Accept: application/json", "api_key: {apiKey}" }) - void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey); + void deletePet(@Param("petId") Long petId, @Param("api_key") String apiKey); /** * Finds Pets by status diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java index 30757ed573..2dba62319d 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java @@ -24,7 +24,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - void deleteOrder(@Param("orderId") String orderId); + void deleteOrder(@Param("order_id") String orderId); /** * Returns pet inventories by status @@ -47,7 +47,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - Order getOrderById(@Param("orderId") Long orderId); + Order getOrderById(@Param("order_id") Long orderId); /** * Place an order for a pet From 0ebbfbc26adaaab256f62d422c9bfef01594c72d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 29 Dec 2019 15:15:23 +0800 Subject: [PATCH 03/82] update sprign cloud feign sample --- .../src/main/java/org/openapitools/api/PetApiClient.java | 4 ++-- .../src/main/java/org/openapitools/api/StoreApiClient.java | 4 ++-- .../src/main/java/org/openapitools/api/UserApiClient.java | 4 ++-- .../src/main/java/org/openapitools/api/PetApiClient.java | 4 ++-- .../src/main/java/org/openapitools/api/StoreApiClient.java | 4 ++-- .../src/main/java/org/openapitools/api/UserApiClient.java | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java index ac33f94332..f80fe4ddc6 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${pet.name:pet}", url="${pet.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface PetApiClient extends PetApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java index 0943d58135..71d613a871 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${store.name:store}", url="${store.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface StoreApiClient extends StoreApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java index 1933bd82d3..1db4598108 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${user.name:user}", url="${user.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface UserApiClient extends UserApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java index ac33f94332..f80fe4ddc6 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${pet.name:pet}", url="${pet.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface PetApiClient extends PetApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java index 0943d58135..71d613a871 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${store.name:store}", url="${store.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface StoreApiClient extends StoreApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java index 1933bd82d3..1db4598108 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${user.name:user}", url="${user.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface UserApiClient extends UserApi { -} \ No newline at end of file +} From f37d26cc73cf4424030aa645d757e9ac4915c14a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Vasek?= Date: Sun, 29 Dec 2019 09:21:32 +0100 Subject: [PATCH 04/82] [JAVA][SPRING][2195] added missing getter for enum value (#2346) * [2195] added missing getter for enum value * updated samples * re-generate spring samples * Removed @JsonValue from toString and regenerated samples * re-generate spring samples Co-authored-by: Esteban Gehring --- .../resources/JavaSpring/enumClass.mustache | 8 ++++++- .../JavaSpring/enumOuterClass.mustache | 8 ++++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../virtualan/model/EnumArrays.java | 12 ++++++++-- .../virtualan/model/EnumClass.java | 6 ++++- .../virtualan/model/EnumTest.java | 24 +++++++++++++++---- .../openapitools/virtualan/model/MapTest.java | 6 ++++- .../openapitools/virtualan/model/Order.java | 6 ++++- .../virtualan/model/OuterEnum.java | 6 ++++- .../org/openapitools/virtualan/model/Pet.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- 85 files changed, 649 insertions(+), 129 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache index 2e90275477..c1d813aa80 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache @@ -26,8 +26,14 @@ this.value = value; } - @Override + {{#jackson}} @JsonValue + {{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache index 60d13571cb..baa6d54d70 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache @@ -24,8 +24,14 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum this.value = value; } - @Override + {{#jackson}} @JsonValue + {{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index 0878b2dfe7..74afafe555 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -45,8 +45,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index 0700123586..d14c54e6ab 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -53,8 +53,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 0878b2dfe7..74afafe555 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -45,8 +45,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 0700123586..d14c54e6ab 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -53,8 +53,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java index 0878b2dfe7..74afafe555 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -45,8 +45,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index 0700123586..d14c54e6ab 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -53,8 +53,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java index 87bc2feb92..dcc367e50e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java index 9592f35f25..d57bb6c1de 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java index 7a4421206d..c9b418c690 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java index 85e3c108d4..26b38944e1 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java index 1fab3a2e12..e91bc5697c 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java index 9592f35f25..d57bb6c1de 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index 7a4421206d..c9b418c690 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java index 85e3c108d4..26b38944e1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index 1fab3a2e12..e91bc5697c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index 9592f35f25..d57bb6c1de 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 7a4421206d..c9b418c690 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 85e3c108d4..26b38944e1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 1fab3a2e12..e91bc5697c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java index 25585cdced..d2346d758a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java index 31286ef24f..02adc43755 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index e5b7493db1..cc61c7818a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java index d2d385b401..0e2354891e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java index 4075aecc8f..2df7246dbb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java index a0dbf4671d..ef0bba51c5 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index 78398cd43a..052fdc5308 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } From ac4ead9e7805d4dc89d791376539496a57c49df7 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 29 Dec 2019 18:13:30 +0800 Subject: [PATCH 05/82] update samples --- .../src/main/java/org/openapitools/model/BigCat.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCatAllOf.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCat.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCatAllOf.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCat.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCatAllOf.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCat.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCatAllOf.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCat.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCatAllOf.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCat.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCatAllOf.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCat.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCatAllOf.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCat.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCatAllOf.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCat.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCatAllOf.java | 6 +++++- .../main/java/org/openapitools/virtualan/model/BigCat.java | 6 +++++- .../java/org/openapitools/virtualan/model/BigCatAllOf.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCat.java | 6 +++++- .../src/main/java/org/openapitools/model/BigCatAllOf.java | 6 +++++- 22 files changed, 110 insertions(+), 22 deletions(-) diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java index dbf4216195..aad86c6048 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java index 89cbe6c4ca..b98ba1e2fa 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } From 89e963c07285722c7fae099a43d73c4f964e1d07 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Thu, 2 Jan 2020 10:46:58 +0530 Subject: [PATCH 06/82] [r] Ignoring README.md in Rbuildignore (#4898) * fix(r): Removing an unnecessary file from build R library * fix(r): Removing an unnecessary file from build R library --- .../src/main/resources/r/Rbuildignore.mustache | 3 ++- samples/client/petstore/R/.Rbuildignore | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/r/Rbuildignore.mustache b/modules/openapi-generator/src/main/resources/r/Rbuildignore.mustache index d2835cda09..10cdec0cd6 100644 --- a/modules/openapi-generator/src/main/resources/r/Rbuildignore.mustache +++ b/modules/openapi-generator/src/main/resources/r/Rbuildignore.mustache @@ -4,4 +4,5 @@ ^\.travis\.yml$ ^\.openapi-generator$ ^docs$ -^git_push\.sh$ \ No newline at end of file +^git_push\.sh$ +^README\.md$ \ No newline at end of file diff --git a/samples/client/petstore/R/.Rbuildignore b/samples/client/petstore/R/.Rbuildignore index d2835cda09..10cdec0cd6 100644 --- a/samples/client/petstore/R/.Rbuildignore +++ b/samples/client/petstore/R/.Rbuildignore @@ -4,4 +4,5 @@ ^\.travis\.yml$ ^\.openapi-generator$ ^docs$ -^git_push\.sh$ \ No newline at end of file +^git_push\.sh$ +^README\.md$ \ No newline at end of file From 178a3e24bda0269710b27ac564b2de31f1186b45 Mon Sep 17 00:00:00 2001 From: sullis Date: Wed, 1 Jan 2020 21:20:29 -0800 Subject: [PATCH 07/82] upgrade to JUnit 4.13 (#4899) --- CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle | 2 +- docs/templating.md | 2 +- modules/openapi-generator-online/pom.xml | 2 +- .../src/main/resources/Groovy/build.gradle.mustache | 2 +- .../src/main/resources/Java/build.gradle.mustache | 2 +- .../main/resources/Java/libraries/feign/build.gradle.mustache | 2 +- .../src/main/resources/Java/libraries/feign/build.sbt.mustache | 2 +- .../src/main/resources/Java/libraries/feign/pom.mustache | 2 +- .../Java/libraries/google-api-client/build.gradle.mustache | 2 +- .../Java/libraries/google-api-client/build.sbt.mustache | 2 +- .../resources/Java/libraries/google-api-client/pom.mustache | 2 +- .../main/resources/Java/libraries/jersey2/build.gradle.mustache | 2 +- .../main/resources/Java/libraries/jersey2/build.sbt.mustache | 2 +- .../src/main/resources/Java/libraries/jersey2/pom.mustache | 2 +- .../src/main/resources/Java/libraries/microprofile/pom.mustache | 2 +- .../main/resources/Java/libraries/native/build.gradle.mustache | 2 +- .../src/main/resources/Java/libraries/native/pom.mustache | 2 +- .../resources/Java/libraries/okhttp-gson/build.gradle.mustache | 2 +- .../resources/Java/libraries/okhttp-gson/build.sbt.mustache | 2 +- .../src/main/resources/Java/libraries/okhttp-gson/pom.mustache | 2 +- .../resources/Java/libraries/rest-assured/build.gradle.mustache | 2 +- .../resources/Java/libraries/rest-assured/build.sbt.mustache | 2 +- .../src/main/resources/Java/libraries/rest-assured/pom.mustache | 2 +- .../resources/Java/libraries/resteasy/build.gradle.mustache | 2 +- .../main/resources/Java/libraries/resteasy/build.sbt.mustache | 2 +- .../src/main/resources/Java/libraries/resteasy/pom.mustache | 2 +- .../resources/Java/libraries/resttemplate/build.gradle.mustache | 2 +- .../src/main/resources/Java/libraries/resttemplate/pom.mustache | 2 +- .../resources/Java/libraries/retrofit/build.gradle.mustache | 2 +- .../main/resources/Java/libraries/retrofit/build.sbt.mustache | 2 +- .../src/main/resources/Java/libraries/retrofit/pom.mustache | 2 +- .../resources/Java/libraries/retrofit2/build.gradle.mustache | 2 +- .../main/resources/Java/libraries/retrofit2/build.sbt.mustache | 2 +- .../src/main/resources/Java/libraries/retrofit2/pom.mustache | 2 +- .../main/resources/Java/libraries/vertx/build.gradle.mustache | 2 +- .../src/main/resources/Java/libraries/vertx/pom.mustache | 2 +- .../src/main/resources/Java/libraries/webclient/pom.mustache | 2 +- modules/openapi-generator/src/main/resources/Java/pom.mustache | 2 +- .../src/main/resources/JavaJaxRS/cxf-ext/pom.mustache | 2 +- .../src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache | 2 +- .../src/main/resources/JavaJaxRS/cxf/pom.mustache | 2 +- .../src/main/resources/JavaJaxRS/cxf/server/pom.mustache | 2 +- .../src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache | 2 +- .../openapi-generator/src/main/resources/JavaJaxRS/pom.mustache | 2 +- .../src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache | 2 +- .../src/main/resources/JavaJaxRS/resteasy/gradle.mustache | 2 +- .../main/resources/JavaSpring/libraries/spring-mvc/pom.mustache | 2 +- .../src/main/resources/JavaVertXServer/pom.mustache | 2 +- .../main/resources/JavaVertXWebServer/supportFiles/pom.mustache | 2 +- .../openapi-generator/src/main/resources/android/build.mustache | 2 +- .../src/main/resources/android/libraries/volley/build.mustache | 2 +- .../src/main/resources/java-undertow-server/pom.mustache | 2 +- .../kotlin-server/libraries/ktor/build.gradle.mustache | 2 +- .../src/main/resources/kotlin-vertx-server/pom.mustache | 2 +- .../src/main/resources/scala-akka-client/build.sbt.mustache | 2 +- .../src/main/resources/scala-akka-client/pom.mustache | 2 +- .../src/main/resources/scala-httpclient/build.sbt.mustache | 2 +- .../src/main/resources/scala-httpclient/pom.mustache | 2 +- .../2_0/templates/Java/libraries/jersey2/build.gradle.mustache | 2 +- .../2_0/templates/Java/libraries/jersey2/build.sbt.mustache | 2 +- .../resources/2_0/templates/Java/libraries/jersey2/pom.mustache | 2 +- pom.xml | 2 +- samples/client/petstore/android/httpclient/build.gradle | 2 +- samples/client/petstore/android/volley/build.gradle | 2 +- samples/client/petstore/groovy/build.gradle | 2 +- samples/client/petstore/java/feign/build.gradle | 2 +- samples/client/petstore/java/feign/build.sbt | 2 +- samples/client/petstore/java/feign/pom.xml | 2 +- samples/client/petstore/java/feign10x/build.gradle | 2 +- samples/client/petstore/java/feign10x/build.sbt | 2 +- samples/client/petstore/java/feign10x/pom.xml | 2 +- samples/client/petstore/java/google-api-client/build.gradle | 2 +- samples/client/petstore/java/google-api-client/build.sbt | 2 +- samples/client/petstore/java/google-api-client/pom.xml | 2 +- samples/client/petstore/java/jersey1/build.gradle | 2 +- samples/client/petstore/java/jersey1/pom.xml | 2 +- samples/client/petstore/java/jersey2-java6/build.gradle | 2 +- samples/client/petstore/java/jersey2-java6/build.sbt | 2 +- samples/client/petstore/java/jersey2-java6/pom.xml | 2 +- samples/client/petstore/java/jersey2-java8/build.gradle | 2 +- samples/client/petstore/java/jersey2-java8/build.sbt | 2 +- samples/client/petstore/java/jersey2-java8/pom.xml | 2 +- samples/client/petstore/java/jersey2/build.gradle | 2 +- samples/client/petstore/java/jersey2/build.sbt | 2 +- samples/client/petstore/java/jersey2/pom.xml | 2 +- samples/client/petstore/java/microprofile-rest-client/pom.xml | 2 +- samples/client/petstore/java/native/build.gradle | 2 +- samples/client/petstore/java/native/pom.xml | 2 +- .../petstore/java/okhttp-gson-parcelableModel/build.gradle | 2 +- .../client/petstore/java/okhttp-gson-parcelableModel/build.sbt | 2 +- .../client/petstore/java/okhttp-gson-parcelableModel/pom.xml | 2 +- samples/client/petstore/java/okhttp-gson/build.gradle | 2 +- samples/client/petstore/java/okhttp-gson/build.sbt | 2 +- samples/client/petstore/java/okhttp-gson/pom.xml | 2 +- samples/client/petstore/java/rest-assured/build.gradle | 2 +- samples/client/petstore/java/rest-assured/build.sbt | 2 +- samples/client/petstore/java/rest-assured/pom.xml | 2 +- samples/client/petstore/java/resteasy/build.gradle | 2 +- samples/client/petstore/java/resteasy/build.sbt | 2 +- samples/client/petstore/java/resteasy/pom.xml | 2 +- samples/client/petstore/java/resttemplate-withXml/build.gradle | 2 +- samples/client/petstore/java/resttemplate-withXml/pom.xml | 2 +- samples/client/petstore/java/resttemplate/build.gradle | 2 +- samples/client/petstore/java/resttemplate/pom.xml | 2 +- samples/client/petstore/java/retrofit/build.gradle | 2 +- samples/client/petstore/java/retrofit/build.sbt | 2 +- samples/client/petstore/java/retrofit/pom.xml | 2 +- samples/client/petstore/java/retrofit2-play24/build.gradle | 2 +- samples/client/petstore/java/retrofit2-play24/build.sbt | 2 +- samples/client/petstore/java/retrofit2-play24/pom.xml | 2 +- samples/client/petstore/java/retrofit2-play25/build.gradle | 2 +- samples/client/petstore/java/retrofit2-play25/build.sbt | 2 +- samples/client/petstore/java/retrofit2-play25/pom.xml | 2 +- samples/client/petstore/java/retrofit2-play26/build.gradle | 2 +- samples/client/petstore/java/retrofit2-play26/build.sbt | 2 +- samples/client/petstore/java/retrofit2-play26/pom.xml | 2 +- samples/client/petstore/java/retrofit2/build.gradle | 2 +- samples/client/petstore/java/retrofit2/build.sbt | 2 +- samples/client/petstore/java/retrofit2/pom.xml | 2 +- samples/client/petstore/java/retrofit2rx/build.gradle | 2 +- samples/client/petstore/java/retrofit2rx/build.sbt | 2 +- samples/client/petstore/java/retrofit2rx/pom.xml | 2 +- samples/client/petstore/java/retrofit2rx2/build.gradle | 2 +- samples/client/petstore/java/retrofit2rx2/build.sbt | 2 +- samples/client/petstore/java/retrofit2rx2/pom.xml | 2 +- samples/client/petstore/java/vertx/build.gradle | 2 +- samples/client/petstore/java/vertx/pom.xml | 2 +- samples/client/petstore/java/webclient/build.gradle | 2 +- samples/client/petstore/java/webclient/pom.xml | 2 +- samples/client/petstore/jaxrs-cxf-client/pom.xml | 2 +- samples/client/petstore/scala-akka/build.sbt | 2 +- samples/client/petstore/scala-akka/pom.xml | 2 +- samples/client/petstore/scala-httpclient/build.sbt | 2 +- samples/client/petstore/scala-httpclient/pom.xml | 2 +- .../server/petstore/java-undertow/dependency-reduced-pom.xml | 2 +- samples/server/petstore/java-undertow/pom.xml | 2 +- samples/server/petstore/java-vertx-web/rx/pom.xml | 2 +- samples/server/petstore/java-vertx/async/pom.xml | 2 +- samples/server/petstore/java-vertx/rx/pom.xml | 2 +- samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml | 2 +- samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml | 2 +- samples/server/petstore/jaxrs-cxf/pom.xml | 2 +- samples/server/petstore/jaxrs-datelib-j8/pom.xml | 2 +- samples/server/petstore/jaxrs-jersey/pom.xml | 2 +- samples/server/petstore/jaxrs-resteasy/default/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/eap/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/joda/build.gradle | 2 +- samples/server/petstore/jaxrs/jersey1-useTags/pom.xml | 2 +- samples/server/petstore/jaxrs/jersey1/pom.xml | 2 +- samples/server/petstore/jaxrs/jersey2-useTags/pom.xml | 2 +- samples/server/petstore/jaxrs/jersey2/pom.xml | 2 +- samples/server/petstore/kotlin-server/ktor/build.gradle | 2 +- samples/server/petstore/kotlin/vertx/pom.xml | 2 +- samples/server/petstore/spring-mvc-j8-async/pom.xml | 2 +- samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml | 2 +- samples/server/petstore/spring-mvc/pom.xml | 2 +- 158 files changed, 158 insertions(+), 158 deletions(-) diff --git a/CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle b/CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle index 37f1ab526d..d540a137bd 100644 --- a/CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle +++ b/CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle @@ -102,7 +102,7 @@ ext { jersey_version = "2.6" commons_io_version=2.5 commons_lang3_version=3.6 - junit_version = "4.12" + junit_version = "4.13" threetenbp_version = "2.6.4" } diff --git a/docs/templating.md b/docs/templating.md index 04c512e7c1..a2f5b2335b 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -150,7 +150,7 @@ index 04a9d55..7a93c50 100644 @@ -140,9 +142,18 @@ ext { jersey_version = "1.19.4" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" + aspectjVersion = '1.9.0' } diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index 7c8cc056b7..1d50a9c70f 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -17,7 +17,7 @@ ${java.version} 2.0.7.RELEASE 2.8.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache index 5fb5911997..e83c34f0e3 100644 --- a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache @@ -40,5 +40,5 @@ dependencies { compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" compile 'io.github.http-builder-ng:http-builder-ng-core:1.0.3' - testCompile "junit:junit:4.11" + testCompile "junit:junit:4.13" } diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index 1aa650293b..0d370b8c3f 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -141,7 +141,7 @@ ext { jackson_databind_nullable_version = "0.2.1" jersey_version = "1.19.4" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index fcdbf1c4f2..caa0ca5899 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -128,7 +128,7 @@ ext { {{/threetenbp}} feign_version = "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" feign_form_version = "2.1.0" - junit_version = "4.12" + junit_version = "4.13" oltu_version = "1.0.1" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache index 61273efb77..4194803a08 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache @@ -21,7 +21,7 @@ lazy val root = (project in file(".")). "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache index fd0315830e..a13a4a263e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache @@ -320,7 +320,7 @@ {{#threetenbp}} 2.9.10 {{/threetenbp}} - 4.12 + 4.13 1.0.0 1.0.1 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache index aa26930fd9..9808528459 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache @@ -126,7 +126,7 @@ ext { google_api_client_version = "1.23.0" jersey_common_version = "2.25.1" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" {{#threetenbp}} jackson_threeten_version = "2.9.10" {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache index 2af4dd8dfd..87b444d938 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache @@ -27,7 +27,7 @@ lazy val root = (project in file(".")). {{#threetenbp}} "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", {{/threetenbp}} - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache index 4e17016acb..259f9806af 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache @@ -316,6 +316,6 @@ 2.9.10 {{/threetenbp}} 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index 56d0e55fcb..fdd258f1d2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -130,7 +130,7 @@ ext { {{^supportJava6}} jersey_version = "2.27" {{/supportJava6}} - junit_version = "4.12" + junit_version = "4.13" {{#threetenbp}} threetenbp_version = "2.9.10" {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache index 61f8e28378..84fc8b722b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache @@ -32,7 +32,7 @@ lazy val root = (project in file(".")). "org.apache.commons" % "commons-lang3" % "3.6", "commons-io" % "commons-io" % "2.5", {{/supportJava6}} - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache index 21f566f2c4..e2eb2bdbd0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -367,6 +367,6 @@ 2.9.10 {{/threetenbp}} 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache index 95ffef0335..ca7d6b7a83 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/pom.mustache @@ -160,7 +160,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 {{#useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache index f81df201eb..c797b1ba9b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache @@ -52,7 +52,7 @@ artifacts { ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache index 75f54dab22..7e6ebb2f95 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache @@ -216,6 +216,6 @@ 11 2.9.9 0.2.1 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index fbf57ba779..a149c68220 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -142,7 +142,7 @@ dependencies { {{#threetenbp}} compile 'org.threeten:threetenbp:1.4.0' {{/threetenbp}} - testCompile 'junit:junit:4.12' + testCompile 'junit:junit:4.13' } javadoc { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache index 4d76839326..4390746220 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.sbt.mustache @@ -25,7 +25,7 @@ lazy val root = (project in file(".")). {{/threetenbp}} "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", "javax.annotation" % "jsr250-api" % "1.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache index cbcdd78f97..e4c05f4151 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pom.mustache @@ -320,7 +320,7 @@ {{/threetenbp}} 1.0.0 1.0 - 4.12 + 4.13 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache index dd848e0f5e..bd24198622 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache @@ -97,7 +97,7 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.21" rest_assured_version = "4.0.0" - junit_version = "4.12" + junit_version = "4.13" {{#jackson}} jackson_version = "2.9.10" jackson_databind_version = "2.9.10" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache index d8214467ae..71f2eaeeba 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.sbt.mustache @@ -27,7 +27,7 @@ lazy val root = (project in file(".")). "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} "com.squareup.okio" % "okio" % "1.13.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache index f4eb427c76..bec9af57bb 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache @@ -331,6 +331,6 @@ {{/threetenbp}} {{/jackson}} 1.13.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache index 6579b7c46c..86fb51119f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache @@ -131,7 +131,7 @@ ext { commons_io_version=2.5 commons_lang3_version=3.5 {{/supportJava6}} - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache index 95ab58d1f9..2554ec2f10 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache @@ -29,7 +29,7 @@ lazy val root = (project in file(".")). "org.apache.commons" % "commons-lang3" % "3.5" % "compile", "commons-io" % "commons-io" % "2.5" % "compile", {{/supportJava6}} - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache index 30a4ba06e6..48d1fa3a28 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache @@ -306,6 +306,6 @@ 3.6 {{/supportJava6}} 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index 2e2485139f..74c7fdea5f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -125,7 +125,7 @@ ext { jackson_databind_nullable_version = "0.2.1" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" {{#threetenbp}} jackson_threeten_version = "2.9.10" {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache index e55bc8e7fe..04920dd554 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache @@ -319,6 +319,6 @@ 2.9.10 {{/threetenbp}} 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache index a3c7c226f0..af83cc1ef0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache @@ -111,7 +111,7 @@ ext { oltu_version = "1.0.1" retrofit_version = "1.9.0" swagger_annotations_version = "1.5.21" - junit_version = "4.12" + junit_version = "4.13" jodatime_version = "2.9.3" {{#threetenbp}} threetenbp_version = "1.4.0" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache index 6afa18db86..360f53d1ae 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.sbt.mustache @@ -17,7 +17,7 @@ lazy val root = (project in file(".")). {{#threetenbp}} "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache index 73d9b4d565..5a40a07979 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/pom.mustache @@ -280,6 +280,6 @@ {{/threetenbp}} 1.0.1 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache index 362c8a504a..55025dd0e0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache @@ -138,7 +138,7 @@ ext { {{/play26}} {{/usePlayWS}} swagger_annotations_version = "1.5.22" - junit_version = "4.12" + junit_version = "4.13" {{#useRxJava}} rx_java_version = "1.3.0" {{/useRxJava}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache index ecae66c6a8..0d7954c4e0 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache @@ -53,7 +53,7 @@ lazy val root = (project in file(".")). "org.threeten" % "threetenbp" % "1.4.0" % "compile", {{/threetenbp}} "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) ) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache index f041511210..78046cbf1c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache @@ -404,6 +404,6 @@ 1.4.0 {{/threetenbp}} 1.0.1 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache index 862aee9f78..3ac8134e0f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache @@ -31,7 +31,7 @@ ext { jackson_version = "2.9.10" jackson_databind_version = "2.9.10.1" vertx_version = "3.4.2" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache index 51125fa48e..21b5fdbc6f 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache @@ -292,6 +292,6 @@ 2.9.10 2.9.10.1 0.2.1 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache index f07bbf5e94..be8e056002 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache @@ -146,7 +146,7 @@ 2.9.10 2.9.10.1 0.2.1 - 4.12 + 4.13 3.1.8.RELEASE 0.7.8.RELEASE {{#joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/pom.mustache b/modules/openapi-generator/src/main/resources/Java/pom.mustache index 7dde4b12d9..b17b2357ba 100644 --- a/modules/openapi-generator/src/main/resources/Java/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/pom.mustache @@ -356,6 +356,6 @@ {{/supportJava6}} {{^threetenbp}}2.7.5{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}} 1.0.0 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache index 315e0d096a..a613b1b204 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/pom.mustache @@ -206,7 +206,7 @@ ${java.version} 1.5.22 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 {{#useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache index 83c7335172..eabc448d6b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/server/pom.mustache @@ -337,7 +337,7 @@ {{/generateSpringBootApplication}} {{/generateSpringApplication}} {{^generateSpringBootApplication}} - 4.12 + 4.13 1.1.7 {{/generateSpringBootApplication}} 3.3.0 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache index 62d0e3ebc0..6fdc923594 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/pom.mustache @@ -200,7 +200,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 {{#useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache index 2e75578f59..de2adaff11 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/server/pom.mustache @@ -251,7 +251,7 @@ ${java.version} 1.5.22 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 {{#useBeanValidation}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache index 08e49b7f3c..a2a8cc7103 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/libraries/jersey1/pom.mustache @@ -208,7 +208,7 @@ 1.19.1 2.9.9 1.7.21 - 4.12 + 4.13 2.5 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache index 9785f8ac10..5b50f42711 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/pom.mustache @@ -217,7 +217,7 @@ 2.5 3.5 {{/supportJava6}} - 4.12 + 4.13 1.1.7 2.5 UTF-8 diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache index df8a82b461..0191d3d8a7 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache @@ -25,7 +25,7 @@ dependencies { {{#java8}} compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9' {{/java8}} - testCompile 'junit:junit:4.12', + testCompile 'junit:junit:4.13', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache index 84e2d612aa..e55118c44a 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache @@ -25,7 +25,7 @@ dependencies { //TODO: swaggerFeature compile 'io.swagger:swagger-jaxrs:1.5.12' - testCompile 'junit:junit:4.12', + testCompile 'junit:junit:4.13', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache index 156ba47b04..c0abd27f20 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-mvc/pom.mustache @@ -258,7 +258,7 @@ ${java.version} 9.2.15.v20160210 1.7.21 - 4.12 + 4.13 2.5 2.8.0 2.9.9 diff --git a/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache b/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache index 64aec46faf..782786111b 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXServer/pom.mustache @@ -12,7 +12,7 @@ UTF-8 1.8 - 4.12 + 4.13 3.4.1 3.8.1 {{vertxSwaggerRouterVersion}} diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache index dbe1de7342..458ee2b4dd 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache @@ -12,7 +12,7 @@ 3.6.3 1.7.26 - 4.12 + 4.13 diff --git a/modules/openapi-generator/src/main/resources/android/build.mustache b/modules/openapi-generator/src/main/resources/android/build.mustache index ec465e6cb0..0e564cee5c 100644 --- a/modules/openapi-generator/src/main/resources/android/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/build.mustache @@ -91,7 +91,7 @@ ext { gson_version = "2.3.1" httpclient_version = "4.5.2" httpcore_version = "4.4.4" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache index 728bea6987..30d1640af8 100644 --- a/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache @@ -76,7 +76,7 @@ ext { httpcore_version = "4.4.4" httpclient_version = "4.3.3" volley_version = "1.0.0" - junit_version = "4.12" + junit_version = "4.13" robolectric_version = "3.0" concurrent_unit_version = "0.4.2" } diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache index 575b55d6e5..092699c7a1 100644 --- a/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache @@ -27,7 +27,7 @@ 1.2 3.1.2 1.1.7 - 4.12 + 4.13 2.1.0-beta.124 1.4.0.Final 2.2.0 diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache index 6bc5036feb..0e1b0fc200 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache @@ -64,5 +64,5 @@ dependencies { compile "io.ktor:ktor-client-core:$ktor_version" compile "io.ktor:ktor-client-apache:$ktor_version" compile "ch.qos.logback:logback-classic:1.2.1" - testCompile group: 'junit', name: 'junit', version: '4.12' + testCompile group: 'junit', name: 'junit', version: '4.13' } diff --git a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/pom.mustache b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/pom.mustache index 9ed4aa1b96..c728b5c6b2 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-vertx-server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-vertx-server/pom.mustache @@ -14,7 +14,7 @@ 1.8 1.3.10 true - 4.12 + 4.13 3.4.1 3.8.1 1.0.2 diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/build.sbt.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/build.sbt.mustache index 8832a43c52..a806f3694b 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/build.sbt.mustache @@ -14,7 +14,7 @@ libraryDependencies ++= Seq( "de.heikoseeberger" %% "akka-http-json4s" % "1.25.2", // test dependencies "org.scalatest" %% "scalatest" % "3.0.5" % "test", - "junit" % "junit" % "4.12" % "test" + "junit" % "junit" % "4.13" % "test" ) resolvers ++= Seq(Resolver.mavenLocal) diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/pom.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/pom.mustache index bb393bb13e..65e18d49da 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/pom.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/pom.mustache @@ -23,7 +23,7 @@ 2.10.1 1.3.3 1.25.2 - 4.12 + 4.13 3.0.5 3.3.1 diff --git a/modules/openapi-generator/src/main/resources/scala-httpclient/build.sbt.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/build.sbt.mustache index 328c251865..71a7404a0b 100644 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/build.sbt.mustache @@ -14,7 +14,7 @@ libraryDependencies ++= Seq( "joda-time" % "joda-time" % "2.9.9", "org.joda" % "joda-convert" % "1.9.2", "org.scalatest" %% "scalatest" % "3.0.4" % "test", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.wordnik.swagger" %% "swagger-async-httpclient" % "0.3.5" ) diff --git a/modules/openapi-generator/src/main/resources/scala-httpclient/pom.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/pom.mustache index 3f0d26bc5e..51b42097ef 100644 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/pom.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/pom.mustache @@ -244,7 +244,7 @@ 1.0.0 2.9.9 - 4.12 + 4.13 3.1.5 3.0.4 0.3.5 diff --git a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.gradle.mustache index e31fd0f067..9d25bfaa82 100644 --- a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.gradle.mustache @@ -129,7 +129,7 @@ ext { commons_io_version=2.5 commons_lang3_version=3.5 {{/supportJava6}} - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.sbt.mustache b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.sbt.mustache index cce1667464..1049751cf3 100644 --- a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.sbt.mustache +++ b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/build.sbt.mustache @@ -30,7 +30,7 @@ lazy val root = (project in file(".")). "org.apache.commons" % "commons-lang3" % "3.5", "commons-io" % "commons-io" % "2.5", {{/supportJava6}} - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/pom.mustache index 5260709d02..fe2fe4267a 100644 --- a/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/test/resources/2_0/templates/Java/libraries/jersey2/pom.mustache @@ -305,6 +305,6 @@ 3.5 {{/supportJava6}} 1.0.0 - 4.12 + 4.13 diff --git a/pom.xml b/pom.xml index 1841899880..8a31c03b54 100644 --- a/pom.xml +++ b/pom.xml @@ -1405,7 +1405,7 @@ 3.3.1 2.4 1.2 - 4.8.1 + 4.13 2.8.9 1.0.0 3.4 diff --git a/samples/client/petstore/android/httpclient/build.gradle b/samples/client/petstore/android/httpclient/build.gradle index eadda81f63..6be898ef01 100644 --- a/samples/client/petstore/android/httpclient/build.gradle +++ b/samples/client/petstore/android/httpclient/build.gradle @@ -53,7 +53,7 @@ ext { gson_version = "2.3.1" httpclient_version = "4.5.2" httpcore_version = "4.4.4" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/samples/client/petstore/android/volley/build.gradle b/samples/client/petstore/android/volley/build.gradle index 4ab03ee2a4..b3a4c135c0 100644 --- a/samples/client/petstore/android/volley/build.gradle +++ b/samples/client/petstore/android/volley/build.gradle @@ -58,7 +58,7 @@ ext { httpcore_version = "4.4.4" httpclient_version = "4.3.3" volley_version = "1.0.0" - junit_version = "4.12" + junit_version = "4.13" robolectric_version = "3.0" concurrent_unit_version = "0.4.2" } diff --git a/samples/client/petstore/groovy/build.gradle b/samples/client/petstore/groovy/build.gradle index 884cb75a2b..9ffe5398d8 100644 --- a/samples/client/petstore/groovy/build.gradle +++ b/samples/client/petstore/groovy/build.gradle @@ -40,5 +40,5 @@ dependencies { compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" compile 'io.github.http-builder-ng:http-builder-ng-core:1.0.3' - testCompile "junit:junit:4.11" + testCompile "junit:junit:4.13" } diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle index d2ed9b1b02..e5af9a63fa 100644 --- a/samples/client/petstore/java/feign/build.gradle +++ b/samples/client/petstore/java/feign/build.gradle @@ -102,7 +102,7 @@ ext { jackson_threetenbp_version = "2.9.10" feign_version = "9.7.0" feign_form_version = "2.1.0" - junit_version = "4.12" + junit_version = "4.13" oltu_version = "1.0.1" } diff --git a/samples/client/petstore/java/feign/build.sbt b/samples/client/petstore/java/feign/build.sbt index c83996e1bb..527b5d8dcf 100644 --- a/samples/client/petstore/java/feign/build.sbt +++ b/samples/client/petstore/java/feign/build.sbt @@ -21,7 +21,7 @@ lazy val root = (project in file(".")). "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml index 5890ab9401..12bcdd6ba6 100644 --- a/samples/client/petstore/java/feign/pom.xml +++ b/samples/client/petstore/java/feign/pom.xml @@ -285,7 +285,7 @@ 0.2.1 2.9.10.1 2.9.10 - 4.12 + 4.13 1.0.0 1.0.1 diff --git a/samples/client/petstore/java/feign10x/build.gradle b/samples/client/petstore/java/feign10x/build.gradle index 4488d47329..dfc75b39b3 100644 --- a/samples/client/petstore/java/feign10x/build.gradle +++ b/samples/client/petstore/java/feign10x/build.gradle @@ -102,7 +102,7 @@ ext { jackson_threetenbp_version = "2.9.10" feign_version = "10.2.3" feign_form_version = "2.1.0" - junit_version = "4.12" + junit_version = "4.13" oltu_version = "1.0.1" } diff --git a/samples/client/petstore/java/feign10x/build.sbt b/samples/client/petstore/java/feign10x/build.sbt index 75e80dd275..89a9e8072e 100644 --- a/samples/client/petstore/java/feign10x/build.sbt +++ b/samples/client/petstore/java/feign10x/build.sbt @@ -21,7 +21,7 @@ lazy val root = (project in file(".")). "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/feign10x/pom.xml b/samples/client/petstore/java/feign10x/pom.xml index 2dbf864e3a..40d89b0d73 100644 --- a/samples/client/petstore/java/feign10x/pom.xml +++ b/samples/client/petstore/java/feign10x/pom.xml @@ -285,7 +285,7 @@ 0.2.1 2.9.10.1 2.9.10 - 4.12 + 4.13 1.0.0 1.0.1 diff --git a/samples/client/petstore/java/google-api-client/build.gradle b/samples/client/petstore/java/google-api-client/build.gradle index 179019d022..3b0c95caae 100644 --- a/samples/client/petstore/java/google-api-client/build.gradle +++ b/samples/client/petstore/java/google-api-client/build.gradle @@ -102,7 +102,7 @@ ext { google_api_client_version = "1.23.0" jersey_common_version = "2.25.1" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" jackson_threeten_version = "2.9.10" } diff --git a/samples/client/petstore/java/google-api-client/build.sbt b/samples/client/petstore/java/google-api-client/build.sbt index 010aeb2783..4022715c50 100644 --- a/samples/client/petstore/java/google-api-client/build.sbt +++ b/samples/client/petstore/java/google-api-client/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/google-api-client/pom.xml b/samples/client/petstore/java/google-api-client/pom.xml index 47a18571de..9ae84e9754 100644 --- a/samples/client/petstore/java/google-api-client/pom.xml +++ b/samples/client/petstore/java/google-api-client/pom.xml @@ -263,6 +263,6 @@ 0.2.1 2.9.10 1.0.0 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle index 0d16f055d7..3051d5c4e7 100644 --- a/samples/client/petstore/java/jersey1/build.gradle +++ b/samples/client/petstore/java/jersey1/build.gradle @@ -117,7 +117,7 @@ ext { jackson_databind_nullable_version = "0.2.1" jersey_version = "1.19.4" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/samples/client/petstore/java/jersey1/pom.xml b/samples/client/petstore/java/jersey1/pom.xml index 80243d26d1..3360beb90f 100644 --- a/samples/client/petstore/java/jersey1/pom.xml +++ b/samples/client/petstore/java/jersey1/pom.xml @@ -267,6 +267,6 @@ 1.19.4 2.6.4 1.0.0 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/jersey2-java6/build.gradle b/samples/client/petstore/java/jersey2-java6/build.gradle index 37f1ab526d..d540a137bd 100644 --- a/samples/client/petstore/java/jersey2-java6/build.gradle +++ b/samples/client/petstore/java/jersey2-java6/build.gradle @@ -102,7 +102,7 @@ ext { jersey_version = "2.6" commons_io_version=2.5 commons_lang3_version=3.6 - junit_version = "4.12" + junit_version = "4.13" threetenbp_version = "2.6.4" } diff --git a/samples/client/petstore/java/jersey2-java6/build.sbt b/samples/client/petstore/java/jersey2-java6/build.sbt index 3bb20e3d1b..228edc4e01 100644 --- a/samples/client/petstore/java/jersey2-java6/build.sbt +++ b/samples/client/petstore/java/jersey2-java6/build.sbt @@ -20,7 +20,7 @@ lazy val root = (project in file(".")). "com.brsanthu" % "migbase64" % "2.2", "org.apache.commons" % "commons-lang3" % "3.6", "commons-io" % "commons-io" % "2.5", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/jersey2-java6/pom.xml b/samples/client/petstore/java/jersey2-java6/pom.xml index f4cf661f43..ccc62e8e80 100644 --- a/samples/client/petstore/java/jersey2-java6/pom.xml +++ b/samples/client/petstore/java/jersey2-java6/pom.xml @@ -295,6 +295,6 @@ 0.2.1 2.9.10 1.0.0 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/jersey2-java8/build.gradle b/samples/client/petstore/java/jersey2-java8/build.gradle index c3eb9a069f..6efdd2bdd0 100644 --- a/samples/client/petstore/java/jersey2-java8/build.gradle +++ b/samples/client/petstore/java/jersey2-java8/build.gradle @@ -99,7 +99,7 @@ ext { jackson_databind_version = "2.9.10.1" jackson_databind_nullable_version = "0.2.1" jersey_version = "2.27" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/samples/client/petstore/java/jersey2-java8/build.sbt b/samples/client/petstore/java/jersey2-java8/build.sbt index d4c35713ae..864d02b09f 100644 --- a/samples/client/petstore/java/jersey2-java8/build.sbt +++ b/samples/client/petstore/java/jersey2-java8/build.sbt @@ -17,7 +17,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml index 9197b3718c..f2905dcd50 100644 --- a/samples/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/client/petstore/java/jersey2-java8/pom.xml @@ -281,6 +281,6 @@ 2.9.10.1 0.2.1 1.0.0 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/jersey2/build.gradle b/samples/client/petstore/java/jersey2/build.gradle index 3b60e74d4b..7e01a214c1 100644 --- a/samples/client/petstore/java/jersey2/build.gradle +++ b/samples/client/petstore/java/jersey2/build.gradle @@ -99,7 +99,7 @@ ext { jackson_databind_version = "2.9.10.1" jackson_databind_nullable_version = "0.2.1" jersey_version = "2.27" - junit_version = "4.12" + junit_version = "4.13" threetenbp_version = "2.9.10" } diff --git a/samples/client/petstore/java/jersey2/build.sbt b/samples/client/petstore/java/jersey2/build.sbt index 88c2bdfba5..81511375ed 100644 --- a/samples/client/petstore/java/jersey2/build.sbt +++ b/samples/client/petstore/java/jersey2/build.sbt @@ -18,7 +18,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.brsanthu" % "migbase64" % "2.2", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml index 36ae053a4b..4654fea20b 100644 --- a/samples/client/petstore/java/jersey2/pom.xml +++ b/samples/client/petstore/java/jersey2/pom.xml @@ -288,6 +288,6 @@ 0.2.1 2.9.10 1.0.0 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/microprofile-rest-client/pom.xml b/samples/client/petstore/java/microprofile-rest-client/pom.xml index f8c57252b9..7cbd4fec38 100644 --- a/samples/client/petstore/java/microprofile-rest-client/pom.xml +++ b/samples/client/petstore/java/microprofile-rest-client/pom.xml @@ -131,7 +131,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 3.2.7 diff --git a/samples/client/petstore/java/native/build.gradle b/samples/client/petstore/java/native/build.gradle index 70f87373f8..8ab78d3a7e 100644 --- a/samples/client/petstore/java/native/build.gradle +++ b/samples/client/petstore/java/native/build.gradle @@ -52,7 +52,7 @@ artifacts { ext { swagger_annotations_version = "1.5.22" jackson_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/samples/client/petstore/java/native/pom.xml b/samples/client/petstore/java/native/pom.xml index 5681e8b004..c3501155a3 100644 --- a/samples/client/petstore/java/native/pom.xml +++ b/samples/client/petstore/java/native/pom.xml @@ -209,6 +209,6 @@ 11 2.9.9 0.2.1 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle index 30ce39baba..4d63449dbc 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle @@ -107,7 +107,7 @@ dependencies { compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9' compile 'org.threeten:threetenbp:1.4.0' - testCompile 'junit:junit:4.12' + testCompile 'junit:junit:4.13' } javadoc { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt index af7c30f1de..f802b21310 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.sbt @@ -18,7 +18,7 @@ lazy val root = (project in file(".")). "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", "javax.annotation" % "jsr250-api" % "1.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml index d39a18c521..90eafb262b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/pom.xml @@ -273,7 +273,7 @@ 1.4.0 1.0.0 1.0 - 4.12 + 4.13 UTF-8 diff --git a/samples/client/petstore/java/okhttp-gson/build.gradle b/samples/client/petstore/java/okhttp-gson/build.gradle index 0e7e2aaed6..a1baae2cc3 100644 --- a/samples/client/petstore/java/okhttp-gson/build.gradle +++ b/samples/client/petstore/java/okhttp-gson/build.gradle @@ -107,7 +107,7 @@ dependencies { compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9' compile 'org.threeten:threetenbp:1.4.0' - testCompile 'junit:junit:4.12' + testCompile 'junit:junit:4.13' } javadoc { diff --git a/samples/client/petstore/java/okhttp-gson/build.sbt b/samples/client/petstore/java/okhttp-gson/build.sbt index 987da596bf..c01fc8d867 100644 --- a/samples/client/petstore/java/okhttp-gson/build.sbt +++ b/samples/client/petstore/java/okhttp-gson/build.sbt @@ -18,7 +18,7 @@ lazy val root = (project in file(".")). "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", "javax.annotation" % "jsr250-api" % "1.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/okhttp-gson/pom.xml b/samples/client/petstore/java/okhttp-gson/pom.xml index 9a873bf9cd..1f3d33811c 100644 --- a/samples/client/petstore/java/okhttp-gson/pom.xml +++ b/samples/client/petstore/java/okhttp-gson/pom.xml @@ -266,7 +266,7 @@ 1.4.0 1.0.0 1.0 - 4.12 + 4.13 UTF-8 diff --git a/samples/client/petstore/java/rest-assured/build.gradle b/samples/client/petstore/java/rest-assured/build.gradle index c7691593cd..9668102ffa 100644 --- a/samples/client/petstore/java/rest-assured/build.gradle +++ b/samples/client/petstore/java/rest-assured/build.gradle @@ -97,7 +97,7 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.21" rest_assured_version = "4.0.0" - junit_version = "4.12" + junit_version = "4.13" gson_version = "2.8.5" gson_fire_version = "1.8.3" threetenbp_version = "1.4.0" diff --git a/samples/client/petstore/java/rest-assured/build.sbt b/samples/client/petstore/java/rest-assured/build.sbt index fdc880df0c..8777fcab7f 100644 --- a/samples/client/petstore/java/rest-assured/build.sbt +++ b/samples/client/petstore/java/rest-assured/build.sbt @@ -15,7 +15,7 @@ lazy val root = (project in file(".")). "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", "org.threeten" % "threetenbp" % "1.4.0" % "compile", "com.squareup.okio" % "okio" % "1.13.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/rest-assured/pom.xml b/samples/client/petstore/java/rest-assured/pom.xml index c33e3aa005..89c5361260 100644 --- a/samples/client/petstore/java/rest-assured/pom.xml +++ b/samples/client/petstore/java/rest-assured/pom.xml @@ -247,6 +247,6 @@ 1.0.0 1.4.0 1.13.0 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/resteasy/build.gradle b/samples/client/petstore/java/resteasy/build.gradle index 74d6ad5567..57037d35c5 100644 --- a/samples/client/petstore/java/resteasy/build.gradle +++ b/samples/client/petstore/java/resteasy/build.gradle @@ -101,7 +101,7 @@ ext { threetenbp_version = "2.9.10" resteasy_version = "3.1.3.Final" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/samples/client/petstore/java/resteasy/build.sbt b/samples/client/petstore/java/resteasy/build.sbt index b94b8b1e7e..72666efc37 100644 --- a/samples/client/petstore/java/resteasy/build.sbt +++ b/samples/client/petstore/java/resteasy/build.sbt @@ -20,7 +20,7 @@ lazy val root = (project in file(".")). "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", "joda-time" % "joda-time" % "2.9.9" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/resteasy/pom.xml b/samples/client/petstore/java/resteasy/pom.xml index 561259f718..a1ad565c64 100644 --- a/samples/client/petstore/java/resteasy/pom.xml +++ b/samples/client/petstore/java/resteasy/pom.xml @@ -249,6 +249,6 @@ 2.9.10 2.9.9 1.0.0 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle index 8310f0f4a3..d4e0a4078d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/build.gradle +++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle @@ -101,7 +101,7 @@ ext { jackson_databind_nullable_version = "0.2.1" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" jackson_threeten_version = "2.9.10" } diff --git a/samples/client/petstore/java/resttemplate-withXml/pom.xml b/samples/client/petstore/java/resttemplate-withXml/pom.xml index 909b61ab16..2c07e6f0ae 100644 --- a/samples/client/petstore/java/resttemplate-withXml/pom.xml +++ b/samples/client/petstore/java/resttemplate-withXml/pom.xml @@ -272,6 +272,6 @@ 0.2.1 2.9.10 1.0.0 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/resttemplate/build.gradle b/samples/client/petstore/java/resttemplate/build.gradle index 845612fa0f..54857b5614 100644 --- a/samples/client/petstore/java/resttemplate/build.gradle +++ b/samples/client/petstore/java/resttemplate/build.gradle @@ -101,7 +101,7 @@ ext { jackson_databind_nullable_version = "0.2.1" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" jackson_threeten_version = "2.9.10" } diff --git a/samples/client/petstore/java/resttemplate/pom.xml b/samples/client/petstore/java/resttemplate/pom.xml index 49ca9e754a..488c9758fb 100644 --- a/samples/client/petstore/java/resttemplate/pom.xml +++ b/samples/client/petstore/java/resttemplate/pom.xml @@ -264,6 +264,6 @@ 0.2.1 2.9.10 1.0.0 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/retrofit/build.gradle b/samples/client/petstore/java/retrofit/build.gradle index 2bdf348905..123f01dbfa 100644 --- a/samples/client/petstore/java/retrofit/build.gradle +++ b/samples/client/petstore/java/retrofit/build.gradle @@ -99,7 +99,7 @@ ext { oltu_version = "1.0.1" retrofit_version = "1.9.0" swagger_annotations_version = "1.5.21" - junit_version = "4.12" + junit_version = "4.13" jodatime_version = "2.9.3" } diff --git a/samples/client/petstore/java/retrofit/build.sbt b/samples/client/petstore/java/retrofit/build.sbt index cedb083de9..800255e2a2 100644 --- a/samples/client/petstore/java/retrofit/build.sbt +++ b/samples/client/petstore/java/retrofit/build.sbt @@ -14,7 +14,7 @@ lazy val root = (project in file(".")). "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "joda-time" % "joda-time" % "2.9.3" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/samples/client/petstore/java/retrofit/pom.xml b/samples/client/petstore/java/retrofit/pom.xml index fff98c3ba3..4efea78399 100644 --- a/samples/client/petstore/java/retrofit/pom.xml +++ b/samples/client/petstore/java/retrofit/pom.xml @@ -242,6 +242,6 @@ 2.9.9 1.0.1 1.0.0 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/retrofit2-play24/build.gradle b/samples/client/petstore/java/retrofit2-play24/build.gradle index fc11884337..8eb6390c73 100644 --- a/samples/client/petstore/java/retrofit2-play24/build.gradle +++ b/samples/client/petstore/java/retrofit2-play24/build.gradle @@ -100,7 +100,7 @@ ext { jackson_version = "2.6.6" play_version = "2.4.11" swagger_annotations_version = "1.5.22" - junit_version = "4.12" + junit_version = "4.13" json_fire_version = "1.8.0" } diff --git a/samples/client/petstore/java/retrofit2-play24/build.sbt b/samples/client/petstore/java/retrofit2-play24/build.sbt index ef9a3ad810..d2bc6d8212 100644 --- a/samples/client/petstore/java/retrofit2-play24/build.sbt +++ b/samples/client/petstore/java/retrofit2-play24/build.sbt @@ -19,7 +19,7 @@ lazy val root = (project in file(".")). "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) ) diff --git a/samples/client/petstore/java/retrofit2-play24/pom.xml b/samples/client/petstore/java/retrofit2-play24/pom.xml index eab89a5e1f..2682f93418 100644 --- a/samples/client/petstore/java/retrofit2-play24/pom.xml +++ b/samples/client/petstore/java/retrofit2-play24/pom.xml @@ -285,6 +285,6 @@ 0.2.1 2.5.0 1.0.1 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/retrofit2-play25/build.gradle b/samples/client/petstore/java/retrofit2-play25/build.gradle index 41ac622a4e..1ef29ccc68 100644 --- a/samples/client/petstore/java/retrofit2-play25/build.gradle +++ b/samples/client/petstore/java/retrofit2-play25/build.gradle @@ -100,7 +100,7 @@ ext { jackson_version = "2.9.10" play_version = "2.5.14" swagger_annotations_version = "1.5.22" - junit_version = "4.12" + junit_version = "4.13" threetenbp_version = "1.4.0" json_fire_version = "1.8.0" } diff --git a/samples/client/petstore/java/retrofit2-play25/build.sbt b/samples/client/petstore/java/retrofit2-play25/build.sbt index fe180418e7..4672fa0453 100644 --- a/samples/client/petstore/java/retrofit2-play25/build.sbt +++ b/samples/client/petstore/java/retrofit2-play25/build.sbt @@ -20,7 +20,7 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) ) diff --git a/samples/client/petstore/java/retrofit2-play25/pom.xml b/samples/client/petstore/java/retrofit2-play25/pom.xml index e1191e2d5d..413b596595 100644 --- a/samples/client/petstore/java/retrofit2-play25/pom.xml +++ b/samples/client/petstore/java/retrofit2-play25/pom.xml @@ -291,6 +291,6 @@ 2.5.0 1.4.0 1.0.1 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/retrofit2-play26/build.gradle b/samples/client/petstore/java/retrofit2-play26/build.gradle index 5ce5e94d58..3e2f777ba2 100644 --- a/samples/client/petstore/java/retrofit2-play26/build.gradle +++ b/samples/client/petstore/java/retrofit2-play26/build.gradle @@ -102,7 +102,7 @@ ext { jackson_databind_nullable_version = "0.2.1" play_version = "2.6.7" swagger_annotations_version = "1.5.22" - junit_version = "4.12" + junit_version = "4.13" threetenbp_version = "1.4.0" json_fire_version = "1.8.0" } diff --git a/samples/client/petstore/java/retrofit2-play26/build.sbt b/samples/client/petstore/java/retrofit2-play26/build.sbt index ca10a8f59e..2a1a6f8bbe 100644 --- a/samples/client/petstore/java/retrofit2-play26/build.sbt +++ b/samples/client/petstore/java/retrofit2-play26/build.sbt @@ -21,7 +21,7 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) ) diff --git a/samples/client/petstore/java/retrofit2-play26/pom.xml b/samples/client/petstore/java/retrofit2-play26/pom.xml index 02565e2040..787a447eb1 100644 --- a/samples/client/petstore/java/retrofit2-play26/pom.xml +++ b/samples/client/petstore/java/retrofit2-play26/pom.xml @@ -296,6 +296,6 @@ 2.5.0 1.4.0 1.0.1 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/retrofit2/build.gradle b/samples/client/petstore/java/retrofit2/build.gradle index 997a3fe860..e9a28db63f 100644 --- a/samples/client/petstore/java/retrofit2/build.gradle +++ b/samples/client/petstore/java/retrofit2/build.gradle @@ -98,7 +98,7 @@ ext { oltu_version = "1.0.1" retrofit_version = "2.3.0" swagger_annotations_version = "1.5.22" - junit_version = "4.12" + junit_version = "4.13" threetenbp_version = "1.4.0" json_fire_version = "1.8.0" } diff --git a/samples/client/petstore/java/retrofit2/build.sbt b/samples/client/petstore/java/retrofit2/build.sbt index e8e82ccf59..c3c6286433 100644 --- a/samples/client/petstore/java/retrofit2/build.sbt +++ b/samples/client/petstore/java/retrofit2/build.sbt @@ -16,7 +16,7 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) ) diff --git a/samples/client/petstore/java/retrofit2/pom.xml b/samples/client/petstore/java/retrofit2/pom.xml index 879e3abf6d..963436bd1f 100644 --- a/samples/client/petstore/java/retrofit2/pom.xml +++ b/samples/client/petstore/java/retrofit2/pom.xml @@ -251,6 +251,6 @@ 2.5.0 1.4.0 1.0.1 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/retrofit2rx/build.gradle b/samples/client/petstore/java/retrofit2rx/build.gradle index 484532d45c..ac9459f6ad 100644 --- a/samples/client/petstore/java/retrofit2rx/build.gradle +++ b/samples/client/petstore/java/retrofit2rx/build.gradle @@ -98,7 +98,7 @@ ext { oltu_version = "1.0.1" retrofit_version = "2.3.0" swagger_annotations_version = "1.5.22" - junit_version = "4.12" + junit_version = "4.13" rx_java_version = "1.3.0" threetenbp_version = "1.4.0" json_fire_version = "1.8.0" diff --git a/samples/client/petstore/java/retrofit2rx/build.sbt b/samples/client/petstore/java/retrofit2rx/build.sbt index 106217f49f..4407bf5a6e 100644 --- a/samples/client/petstore/java/retrofit2rx/build.sbt +++ b/samples/client/petstore/java/retrofit2rx/build.sbt @@ -18,7 +18,7 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) ) diff --git a/samples/client/petstore/java/retrofit2rx/pom.xml b/samples/client/petstore/java/retrofit2rx/pom.xml index 05fc235b4b..3a355df304 100644 --- a/samples/client/petstore/java/retrofit2rx/pom.xml +++ b/samples/client/petstore/java/retrofit2rx/pom.xml @@ -262,6 +262,6 @@ 1.3.0 1.4.0 1.0.1 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/retrofit2rx2/build.gradle b/samples/client/petstore/java/retrofit2rx2/build.gradle index 97c14f8bca..9f0cbdce3d 100644 --- a/samples/client/petstore/java/retrofit2rx2/build.gradle +++ b/samples/client/petstore/java/retrofit2rx2/build.gradle @@ -98,7 +98,7 @@ ext { oltu_version = "1.0.1" retrofit_version = "2.3.0" swagger_annotations_version = "1.5.22" - junit_version = "4.12" + junit_version = "4.13" rx_java_version = "2.1.1" threetenbp_version = "1.4.0" json_fire_version = "1.8.0" diff --git a/samples/client/petstore/java/retrofit2rx2/build.sbt b/samples/client/petstore/java/retrofit2rx2/build.sbt index c4c8da53e7..f08041b22e 100644 --- a/samples/client/petstore/java/retrofit2rx2/build.sbt +++ b/samples/client/petstore/java/retrofit2rx2/build.sbt @@ -18,7 +18,7 @@ lazy val root = (project in file(".")). "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "org.threeten" % "threetenbp" % "1.4.0" % "compile", "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) ) diff --git a/samples/client/petstore/java/retrofit2rx2/pom.xml b/samples/client/petstore/java/retrofit2rx2/pom.xml index 4afe2a3971..cb617bc117 100644 --- a/samples/client/petstore/java/retrofit2rx2/pom.xml +++ b/samples/client/petstore/java/retrofit2rx2/pom.xml @@ -262,6 +262,6 @@ 2.1.1 1.4.0 1.0.1 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/vertx/build.gradle b/samples/client/petstore/java/vertx/build.gradle index 379110a524..3c78bdb5ab 100644 --- a/samples/client/petstore/java/vertx/build.gradle +++ b/samples/client/petstore/java/vertx/build.gradle @@ -31,7 +31,7 @@ ext { jackson_version = "2.9.10" jackson_databind_version = "2.9.10.1" vertx_version = "3.4.2" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/samples/client/petstore/java/vertx/pom.xml b/samples/client/petstore/java/vertx/pom.xml index 9e0c3bd8a4..18dc402a47 100644 --- a/samples/client/petstore/java/vertx/pom.xml +++ b/samples/client/petstore/java/vertx/pom.xml @@ -269,6 +269,6 @@ 2.9.10 2.9.10.1 0.2.1 - 4.12 + 4.13 diff --git a/samples/client/petstore/java/webclient/build.gradle b/samples/client/petstore/java/webclient/build.gradle index 101096e85e..c10cf1b59c 100644 --- a/samples/client/petstore/java/webclient/build.gradle +++ b/samples/client/petstore/java/webclient/build.gradle @@ -117,7 +117,7 @@ ext { jackson_databind_nullable_version = "0.2.1" jersey_version = "1.19.4" jodatime_version = "2.9.9" - junit_version = "4.12" + junit_version = "4.13" } dependencies { diff --git a/samples/client/petstore/java/webclient/pom.xml b/samples/client/petstore/java/webclient/pom.xml index 1c5a5150b3..4a85bf0221 100644 --- a/samples/client/petstore/java/webclient/pom.xml +++ b/samples/client/petstore/java/webclient/pom.xml @@ -125,7 +125,7 @@ 2.9.10 2.9.10.1 0.2.1 - 4.12 + 4.13 3.1.8.RELEASE 0.7.8.RELEASE diff --git a/samples/client/petstore/jaxrs-cxf-client/pom.xml b/samples/client/petstore/jaxrs-cxf-client/pom.xml index ee6920b9a5..9c8c47f76a 100644 --- a/samples/client/petstore/jaxrs-cxf-client/pom.xml +++ b/samples/client/petstore/jaxrs-cxf-client/pom.xml @@ -164,7 +164,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 3.3.0 diff --git a/samples/client/petstore/scala-akka/build.sbt b/samples/client/petstore/scala-akka/build.sbt index 85c5d1907b..150b1f75bc 100644 --- a/samples/client/petstore/scala-akka/build.sbt +++ b/samples/client/petstore/scala-akka/build.sbt @@ -14,7 +14,7 @@ libraryDependencies ++= Seq( "de.heikoseeberger" %% "akka-http-json4s" % "1.25.2", // test dependencies "org.scalatest" %% "scalatest" % "3.0.5" % "test", - "junit" % "junit" % "4.12" % "test" + "junit" % "junit" % "4.13" % "test" ) resolvers ++= Seq(Resolver.mavenLocal) diff --git a/samples/client/petstore/scala-akka/pom.xml b/samples/client/petstore/scala-akka/pom.xml index d3a320ab63..33f8926454 100644 --- a/samples/client/petstore/scala-akka/pom.xml +++ b/samples/client/petstore/scala-akka/pom.xml @@ -23,7 +23,7 @@ 2.10.1 1.3.3 1.25.2 - 4.12 + 4.13 3.0.5 3.3.1 diff --git a/samples/client/petstore/scala-httpclient/build.sbt b/samples/client/petstore/scala-httpclient/build.sbt index 990c87596d..d6eb1a7168 100644 --- a/samples/client/petstore/scala-httpclient/build.sbt +++ b/samples/client/petstore/scala-httpclient/build.sbt @@ -14,7 +14,7 @@ libraryDependencies ++= Seq( "joda-time" % "joda-time" % "2.9.9", "org.joda" % "joda-convert" % "1.9.2", "org.scalatest" %% "scalatest" % "3.0.4" % "test", - "junit" % "junit" % "4.12" % "test", + "junit" % "junit" % "4.13" % "test", "com.wordnik.swagger" %% "swagger-async-httpclient" % "0.3.5" ) diff --git a/samples/client/petstore/scala-httpclient/pom.xml b/samples/client/petstore/scala-httpclient/pom.xml index d7b73e5d3f..36b925af55 100644 --- a/samples/client/petstore/scala-httpclient/pom.xml +++ b/samples/client/petstore/scala-httpclient/pom.xml @@ -244,7 +244,7 @@ 1.0.0 2.9.9 - 4.12 + 4.13 3.1.5 3.0.4 0.3.5 diff --git a/samples/server/petstore/java-undertow/dependency-reduced-pom.xml b/samples/server/petstore/java-undertow/dependency-reduced-pom.xml index 54df4d8f5b..d39e0c8f5e 100644 --- a/samples/server/petstore/java-undertow/dependency-reduced-pom.xml +++ b/samples/server/petstore/java-undertow/dependency-reduced-pom.xml @@ -123,7 +123,7 @@ 1.7.21 2.5 1.1.7 - 4.12 + 4.13 4.5.3 diff --git a/samples/server/petstore/java-undertow/pom.xml b/samples/server/petstore/java-undertow/pom.xml index 06e3d5e7b7..02f17355f8 100644 --- a/samples/server/petstore/java-undertow/pom.xml +++ b/samples/server/petstore/java-undertow/pom.xml @@ -26,7 +26,7 @@ 1.2 3.1.2 1.1.7 - 4.12 + 4.13 2.1.0-beta.124 1.4.0.Final 2.2.0 diff --git a/samples/server/petstore/java-vertx-web/rx/pom.xml b/samples/server/petstore/java-vertx-web/rx/pom.xml index 3417b239e1..5ffdf42caf 100644 --- a/samples/server/petstore/java-vertx-web/rx/pom.xml +++ b/samples/server/petstore/java-vertx-web/rx/pom.xml @@ -12,7 +12,7 @@ 3.6.3 1.7.26 - 4.12 + 4.13 diff --git a/samples/server/petstore/java-vertx/async/pom.xml b/samples/server/petstore/java-vertx/async/pom.xml index ebb71face2..37949addac 100644 --- a/samples/server/petstore/java-vertx/async/pom.xml +++ b/samples/server/petstore/java-vertx/async/pom.xml @@ -12,7 +12,7 @@ UTF-8 1.8 - 4.12 + 4.13 3.4.1 3.8.1 1.4.0 diff --git a/samples/server/petstore/java-vertx/rx/pom.xml b/samples/server/petstore/java-vertx/rx/pom.xml index 95c666375e..b4ede38a1d 100644 --- a/samples/server/petstore/java-vertx/rx/pom.xml +++ b/samples/server/petstore/java-vertx/rx/pom.xml @@ -12,7 +12,7 @@ UTF-8 1.8 - 4.12 + 4.13 3.4.1 3.8.1 1.4.0 diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml index e179d994d9..b27bd9c315 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml @@ -193,7 +193,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 1.1.0.Final diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml index 3076aadb8c..7a62c0cdaa 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml @@ -193,7 +193,7 @@ ${java.version} 1.5.18 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 1.1.0.Final diff --git a/samples/server/petstore/jaxrs-cxf/pom.xml b/samples/server/petstore/jaxrs-cxf/pom.xml index 273e216da1..7dd35b86d7 100644 --- a/samples/server/petstore/jaxrs-cxf/pom.xml +++ b/samples/server/petstore/jaxrs-cxf/pom.xml @@ -193,7 +193,7 @@ ${java.version} 1.5.22 9.2.9.v20150224 - 4.12 + 4.13 1.1.7 2.5 1.1.0.Final diff --git a/samples/server/petstore/jaxrs-datelib-j8/pom.xml b/samples/server/petstore/jaxrs-datelib-j8/pom.xml index e60717a0ef..1c5a5d982f 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/pom.xml +++ b/samples/server/petstore/jaxrs-datelib-j8/pom.xml @@ -185,7 +185,7 @@ 9.2.9.v20150224 2.22.2 2.8.9 - 4.12 + 4.13 1.1.7 2.5 UTF-8 diff --git a/samples/server/petstore/jaxrs-jersey/pom.xml b/samples/server/petstore/jaxrs-jersey/pom.xml index 973329638f..cad5fb45b9 100644 --- a/samples/server/petstore/jaxrs-jersey/pom.xml +++ b/samples/server/petstore/jaxrs-jersey/pom.xml @@ -185,7 +185,7 @@ 9.2.9.v20150224 2.22.2 2.8.9 - 4.12 + 4.13 1.1.7 2.5 UTF-8 diff --git a/samples/server/petstore/jaxrs-resteasy/default/build.gradle b/samples/server/petstore/jaxrs-resteasy/default/build.gradle index 467eb76237..c58d59ff0e 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/default/build.gradle @@ -23,7 +23,7 @@ dependencies { //TODO: swaggerFeature compile 'io.swagger:swagger-jaxrs:1.5.12' - testCompile 'junit:junit:4.12', + testCompile 'junit:junit:4.13', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle index 63a1d0b7c7..8a4c7bbd48 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle @@ -17,7 +17,7 @@ dependencies { compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final' providedCompile 'javax.validation:validation-api:1.1.0.Final' compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9' - testCompile 'junit:junit:4.12', + testCompile 'junit:junit:4.13', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle index 6dd309498e..ed9c2512cc 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle @@ -18,7 +18,7 @@ dependencies { providedCompile 'javax.validation:validation-api:1.1.0.Final' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' - testCompile 'junit:junit:4.12', + testCompile 'junit:junit:4.13', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle index 6dd309498e..ed9c2512cc 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle @@ -18,7 +18,7 @@ dependencies { providedCompile 'javax.validation:validation-api:1.1.0.Final' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9' compile 'joda-time:joda-time:2.7' - testCompile 'junit:junit:4.12', + testCompile 'junit:junit:4.13', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/joda/build.gradle index 467eb76237..c58d59ff0e 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/joda/build.gradle @@ -23,7 +23,7 @@ dependencies { //TODO: swaggerFeature compile 'io.swagger:swagger-jaxrs:1.5.12' - testCompile 'junit:junit:4.12', + testCompile 'junit:junit:4.13', 'org.hamcrest:hamcrest-core:1.3' } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml index a85ec85578..e81c49fa6c 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey1-useTags/pom.xml @@ -202,7 +202,7 @@ 1.19.1 2.9.9 1.7.21 - 4.12 + 4.13 2.5 UTF-8 diff --git a/samples/server/petstore/jaxrs/jersey1/pom.xml b/samples/server/petstore/jaxrs/jersey1/pom.xml index fad09cbc14..26bca35956 100644 --- a/samples/server/petstore/jaxrs/jersey1/pom.xml +++ b/samples/server/petstore/jaxrs/jersey1/pom.xml @@ -202,7 +202,7 @@ 1.19.1 2.9.9 1.7.21 - 4.12 + 4.13 2.5 UTF-8 diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml index c396d5a6db..a56cf1e395 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml @@ -185,7 +185,7 @@ 9.2.9.v20150224 2.22.2 2.9.9 - 4.12 + 4.13 1.1.7 2.5 UTF-8 diff --git a/samples/server/petstore/jaxrs/jersey2/pom.xml b/samples/server/petstore/jaxrs/jersey2/pom.xml index 05175f71f7..28c9590494 100644 --- a/samples/server/petstore/jaxrs/jersey2/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2/pom.xml @@ -185,7 +185,7 @@ 9.2.9.v20150224 2.22.2 2.9.9 - 4.12 + 4.13 1.1.7 2.5 UTF-8 diff --git a/samples/server/petstore/kotlin-server/ktor/build.gradle b/samples/server/petstore/kotlin-server/ktor/build.gradle index 5670f65579..f9dc2458a2 100644 --- a/samples/server/petstore/kotlin-server/ktor/build.gradle +++ b/samples/server/petstore/kotlin-server/ktor/build.gradle @@ -64,5 +64,5 @@ dependencies { compile "io.ktor:ktor-client-core:$ktor_version" compile "io.ktor:ktor-client-apache:$ktor_version" compile "ch.qos.logback:logback-classic:1.2.1" - testCompile group: 'junit', name: 'junit', version: '4.12' + testCompile group: 'junit', name: 'junit', version: '4.13' } diff --git a/samples/server/petstore/kotlin/vertx/pom.xml b/samples/server/petstore/kotlin/vertx/pom.xml index c6f2cbff3e..2c2af368f3 100644 --- a/samples/server/petstore/kotlin/vertx/pom.xml +++ b/samples/server/petstore/kotlin/vertx/pom.xml @@ -14,7 +14,7 @@ 1.8 1.3.10 true - 4.12 + 4.13 3.4.1 3.8.1 1.0.2 diff --git a/samples/server/petstore/spring-mvc-j8-async/pom.xml b/samples/server/petstore/spring-mvc-j8-async/pom.xml index 6b564dea71..7b53a777e4 100644 --- a/samples/server/petstore/spring-mvc-j8-async/pom.xml +++ b/samples/server/petstore/spring-mvc-j8-async/pom.xml @@ -157,7 +157,7 @@ ${java.version} 9.2.15.v20160210 1.7.21 - 4.12 + 4.13 2.5 2.8.0 2.9.9 diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml b/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml index 9b3b1f7bdc..dc64497955 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/pom.xml @@ -157,7 +157,7 @@ ${java.version} 9.2.15.v20160210 1.7.21 - 4.12 + 4.13 2.5 2.8.0 2.9.9 diff --git a/samples/server/petstore/spring-mvc/pom.xml b/samples/server/petstore/spring-mvc/pom.xml index d5e6f655d7..49b9cce014 100644 --- a/samples/server/petstore/spring-mvc/pom.xml +++ b/samples/server/petstore/spring-mvc/pom.xml @@ -157,7 +157,7 @@ ${java.version} 9.2.15.v20160210 1.7.21 - 4.12 + 4.13 2.5 2.8.0 2.9.9 From 85f6ed533858dbdc827bcce972df735ebe84d1f8 Mon Sep 17 00:00:00 2001 From: Hui Yu Date: Thu, 2 Jan 2020 13:24:23 +0800 Subject: [PATCH 08/82] [C-libcurl] The JSON key name in request/response body should not be escaped even though it is a C key word. (#4893) --- .../resources/C-libcurl/model-body.mustache | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache index 3c133c12dc..fb4f691615 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache @@ -282,18 +282,18 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { {{^isContainer}} {{#isPrimitiveType}} {{#isNumeric}} - if(cJSON_AddNumberToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddNumberToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Numeric } {{/isNumeric}} {{#isBoolean}} - if(cJSON_AddBoolToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddBoolToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Bool } {{/isBoolean}} {{#isEnum}} {{#isString}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{name}}}{{classname}}_ToString({{{classname}}}->{{{name}}})) == NULL) + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{name}}}{{classname}}_ToString({{{classname}}}->{{{name}}})) == NULL) { goto fail; //Enum } @@ -301,30 +301,30 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { {{/isEnum}} {{^isEnum}} {{#isString}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //String } {{/isString}} {{/isEnum}} {{#isByteArray}} - if(cJSON_AddNumberToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddNumberToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Byte } {{/isByteArray}} {{#isBinary}} char* encoded_str_{{{name}}} = base64encode({{{classname}}}->{{{name}}}->data,{{{classname}}}->{{{name}}}->len); - if(cJSON_AddStringToObject(item, "{{{name}}}", encoded_str_{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", encoded_str_{{{name}}}) == NULL) { goto fail; //Binary } free (encoded_str_{{{name}}}); {{/isBinary}} {{#isDate}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Date } {{/isDate}} {{#isDateTime}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Date-Time } {{/isDateTime}} @@ -336,7 +336,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { if({{{name}}}_enum_local_JSON == NULL) { goto fail; // enum } - cJSON_AddItemToObject(item, "{{{name}}}", {{{name}}}_enum_local_JSON); + cJSON_AddItemToObject(item, "{{{baseName}}}", {{{name}}}_enum_local_JSON); if(item->child == NULL) { goto fail; } @@ -346,19 +346,19 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { if({{{name}}}_local_JSON == NULL) { goto fail; //model } - cJSON_AddItemToObject(item, "{{{name}}}", {{{name}}}_local_JSON); + cJSON_AddItemToObject(item, "{{{baseName}}}", {{{name}}}_local_JSON); if(item->child == NULL) { goto fail; } {{/isEnum}} {{/isModel}} {{#isUuid}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //uuid } {{/isUuid}} {{#isEmail}} - if(cJSON_AddStringToObject(item, "{{{name}}}", {{{classname}}}->{{{name}}}) == NULL) { + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{classname}}}->{{{name}}}) == NULL) { goto fail; //Email } {{/isEmail}} @@ -367,7 +367,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { if({{{name}}}_object == NULL) { goto fail; //model } - cJSON_AddItemToObject(item, "{{{name}}}", {{{name}}}_object); + cJSON_AddItemToObject(item, "{{{baseName}}}", {{{name}}}_object); if(item->child == NULL) { goto fail; } @@ -377,7 +377,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { {{#isContainer}} {{#isListContainer}} {{#isPrimitiveType}} - cJSON *{{{name}}} = cJSON_AddArrayToObject(item, "{{{name}}}"); + cJSON *{{{name}}} = cJSON_AddArrayToObject(item, "{{{baseName}}}"); if({{{name}}} == NULL) { goto fail; //primitive container } @@ -401,7 +401,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { } {{/isPrimitiveType}} {{^isPrimitiveType}} - cJSON *{{{name}}} = cJSON_AddArrayToObject(item, "{{{name}}}"); + cJSON *{{{name}}} = cJSON_AddArrayToObject(item, "{{{baseName}}}"); if({{{name}}} == NULL) { goto fail; //nonprimitive container } @@ -419,7 +419,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { {{/isPrimitiveType}} {{/isListContainer}} {{#isMapContainer}} - cJSON *{{{name}}} = cJSON_AddObjectToObject(item, "{{{name}}}"); + cJSON *{{{name}}} = cJSON_AddObjectToObject(item, "{{{baseName}}}"); if({{{name}}} == NULL) { goto fail; //primitive map container } @@ -466,7 +466,7 @@ fail: {{#vars}} // {{{classname}}}->{{{name}}} - cJSON *{{{name}}} = cJSON_GetObjectItemCaseSensitive({{classname}}JSON, "{{{name}}}"); + cJSON *{{{name}}} = cJSON_GetObjectItemCaseSensitive({{classname}}JSON, "{{{baseName}}}"); {{#required}} if (!{{{name}}}) { goto end; From 3a2439c8e60fb08675342006559e8a67f06aa251 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 1 Jan 2020 21:26:31 -0800 Subject: [PATCH 09/82] Unables CI tests of python-flask-python2 (#4889) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8a31c03b54..19b04f0890 100644 --- a/pom.xml +++ b/pom.xml @@ -1079,7 +1079,7 @@ samples/client/petstore/typescript-angular-v7-provided-in-root samples/server/petstore/rust-server samples/server/petstore/python-flask - + samples/server/petstore/python-flask-python2 From d643b2706ac5047c056d24cced5c3f129e26cf84 Mon Sep 17 00:00:00 2001 From: Tomasz Jakub Rup Date: Thu, 2 Jan 2020 06:44:52 +0100 Subject: [PATCH 10/82] [go][client] fix when schema have multiple servers (#4901) --- .../go-experimental/configuration.mustache | 44 +++++++------- .../main/resources/go/configuration.mustache | 45 +++++++------- .../go-petstore/configuration.go | 8 +-- .../go/go-petstore-withXml/configuration.go | 9 +-- .../petstore/go/go-petstore/configuration.go | 9 +-- .../go-petstore/configuration.go | 60 +++++++++---------- .../petstore/go/go-petstore/configuration.go | 60 ++++++++++--------- 7 files changed, 120 insertions(+), 115 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache b/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache index 28f235e694..d7b93eac06 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/configuration.mustache @@ -95,31 +95,31 @@ func NewConfiguration() *Configuration { {{#-first}} Servers: ServerConfigurations{ {{/-first}} - { - URL: "{{{url}}}", - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - {{#variables}} - {{#-first}} - Variables: map[string]ServerVariable{ - {{/-first}} - "{{{name}}}": ServerVariable{ - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - DefaultValue: "{{{defaultValue}}}", - {{#enumValues}} - {{#-first}} - EnumValues: []string{ - {{/-first}} - "{{{.}}}", - {{#-last}} + { + URL: "{{{url}}}", + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + Variables: map[string]ServerVariable{ + {{/-first}} + "{{{name}}}": ServerVariable{ + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + DefaultValue: "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + EnumValues: []string{ + {{/-first}} + "{{{.}}}", + {{#-last}} + }, + {{/-last}} + {{/enumValues}} }, - {{/-last}} - {{/enumValues}} + {{#-last}} }, - {{#-last}} + {{/-last}} + {{/variables}} }, - {{/-last}} - {{/variables}} - }, {{#-last}} }, {{/-last}} diff --git a/modules/openapi-generator/src/main/resources/go/configuration.mustache b/modules/openapi-generator/src/main/resources/go/configuration.mustache index ec28dd024c..b21d2a13a2 100644 --- a/modules/openapi-generator/src/main/resources/go/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/go/configuration.mustache @@ -92,32 +92,33 @@ func NewConfiguration() *Configuration { Debug: false, {{#servers}} {{#-first}} - Servers: []ServerConfiguration{{ + Servers: []ServerConfiguration{ {{/-first}} - Url: "{{{url}}}", - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - {{#variables}} - {{#-first}} - Variables: map[string]ServerVariable{ - {{/-first}} - "{{{name}}}": ServerVariable{ - Description: "{{{description}}}{{^description}}No description provided{{/description}}", - DefaultValue: "{{{defaultValue}}}", - {{#enumValues}} - {{#-first}} - EnumValues: []string{ - {{/-first}} - "{{{.}}}", - {{#-last}} + { + Url: "{{{url}}}", + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + Variables: map[string]ServerVariable{ + {{/-first}} + "{{{name}}}": ServerVariable{ + Description: "{{{description}}}{{^description}}No description provided{{/description}}", + DefaultValue: "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + EnumValues: []string{ + {{/-first}} + "{{{.}}}", + {{#-last}} + }, + {{/-last}} + {{/enumValues}} }, - {{/-last}} - {{/enumValues}} + {{#-last}} }, - {{#-last}} + {{/-last}} + {{/variables}} }, - {{/-last}} - {{/variables}} - }, {{#-last}} }, {{/-last}} diff --git a/samples/client/petstore/go-experimental/go-petstore/configuration.go b/samples/client/petstore/go-experimental/go-petstore/configuration.go index 9c5a196fc3..153d3a46ef 100644 --- a/samples/client/petstore/go-experimental/go-petstore/configuration.go +++ b/samples/client/petstore/go-experimental/go-petstore/configuration.go @@ -100,10 +100,10 @@ func NewConfiguration() *Configuration { UserAgent: "OpenAPI-Generator/1.0.0/go", Debug: false, Servers: ServerConfigurations{ - { - URL: "http://petstore.swagger.io:80/v2", - Description: "No description provided", - }, + { + URL: "http://petstore.swagger.io:80/v2", + Description: "No description provided", + }, }, OperationServers: map[string]ServerConfigurations{ }, diff --git a/samples/client/petstore/go/go-petstore-withXml/configuration.go b/samples/client/petstore/go/go-petstore-withXml/configuration.go index f0134476c5..fbebb230db 100644 --- a/samples/client/petstore/go/go-petstore-withXml/configuration.go +++ b/samples/client/petstore/go/go-petstore-withXml/configuration.go @@ -87,10 +87,11 @@ func NewConfiguration() *Configuration { DefaultHeader: make(map[string]string), UserAgent: "OpenAPI-Generator/1.0.0/go", Debug: false, - Servers: []ServerConfiguration{{ - Url: "http://petstore.swagger.io:80/v2", - Description: "No description provided", - }, + Servers: []ServerConfiguration{ + { + Url: "http://petstore.swagger.io:80/v2", + Description: "No description provided", + }, }, } return cfg diff --git a/samples/client/petstore/go/go-petstore/configuration.go b/samples/client/petstore/go/go-petstore/configuration.go index e3159c328b..4a35e84083 100644 --- a/samples/client/petstore/go/go-petstore/configuration.go +++ b/samples/client/petstore/go/go-petstore/configuration.go @@ -86,10 +86,11 @@ func NewConfiguration() *Configuration { DefaultHeader: make(map[string]string), UserAgent: "OpenAPI-Generator/1.0.0/go", Debug: false, - Servers: []ServerConfiguration{{ - Url: "http://petstore.swagger.io:80/v2", - Description: "No description provided", - }, + Servers: []ServerConfiguration{ + { + Url: "http://petstore.swagger.io:80/v2", + Description: "No description provided", + }, }, } return cfg diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go index 4716060a6b..58f47a4968 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/configuration.go @@ -100,44 +100,44 @@ func NewConfiguration() *Configuration { UserAgent: "OpenAPI-Generator/1.0.0/go", Debug: false, Servers: ServerConfigurations{ - { - URL: "http://{server}.swagger.io:{port}/v2", - Description: "petstore server", - Variables: map[string]ServerVariable{ - "server": ServerVariable{ - Description: "No description provided", - DefaultValue: "petstore", - EnumValues: []string{ - "petstore", - "qa-petstore", - "dev-petstore", + { + URL: "http://{server}.swagger.io:{port}/v2", + Description: "petstore server", + Variables: map[string]ServerVariable{ + "server": ServerVariable{ + Description: "No description provided", + DefaultValue: "petstore", + EnumValues: []string{ + "petstore", + "qa-petstore", + "dev-petstore", + }, }, - }, - "port": ServerVariable{ - Description: "No description provided", - DefaultValue: "80", - EnumValues: []string{ - "80", - "8080", + "port": ServerVariable{ + Description: "No description provided", + DefaultValue: "80", + EnumValues: []string{ + "80", + "8080", + }, }, }, }, - }, - { - URL: "https://localhost:8080/{version}", - Description: "The local server", - Variables: map[string]ServerVariable{ - "version": ServerVariable{ - Description: "No description provided", - DefaultValue: "v2", - EnumValues: []string{ - "v1", - "v2", + { + URL: "https://localhost:8080/{version}", + Description: "The local server", + Variables: map[string]ServerVariable{ + "version": ServerVariable{ + Description: "No description provided", + DefaultValue: "v2", + EnumValues: []string{ + "v1", + "v2", + }, }, }, }, }, - }, OperationServers: map[string]ServerConfigurations{ "PetApiService.AddPet": { { diff --git a/samples/openapi3/client/petstore/go/go-petstore/configuration.go b/samples/openapi3/client/petstore/go/go-petstore/configuration.go index c2ea841704..64ae25b466 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/configuration.go +++ b/samples/openapi3/client/petstore/go/go-petstore/configuration.go @@ -86,43 +86,45 @@ func NewConfiguration() *Configuration { DefaultHeader: make(map[string]string), UserAgent: "OpenAPI-Generator/1.0.0/go", Debug: false, - Servers: []ServerConfiguration{{ - Url: "http://{server}.swagger.io:{port}/v2", - Description: "petstore server", - Variables: map[string]ServerVariable{ - "server": ServerVariable{ - Description: "No description provided", - DefaultValue: "petstore", - EnumValues: []string{ - "petstore", - "qa-petstore", - "dev-petstore", + Servers: []ServerConfiguration{ + { + Url: "http://{server}.swagger.io:{port}/v2", + Description: "petstore server", + Variables: map[string]ServerVariable{ + "server": ServerVariable{ + Description: "No description provided", + DefaultValue: "petstore", + EnumValues: []string{ + "petstore", + "qa-petstore", + "dev-petstore", + }, }, - }, - "port": ServerVariable{ - Description: "No description provided", - DefaultValue: "80", - EnumValues: []string{ - "80", - "8080", + "port": ServerVariable{ + Description: "No description provided", + DefaultValue: "80", + EnumValues: []string{ + "80", + "8080", + }, }, }, }, - }, - Url: "https://localhost:8080/{version}", - Description: "The local server", - Variables: map[string]ServerVariable{ - "version": ServerVariable{ - Description: "No description provided", - DefaultValue: "v2", - EnumValues: []string{ - "v1", - "v2", + { + Url: "https://localhost:8080/{version}", + Description: "The local server", + Variables: map[string]ServerVariable{ + "version": ServerVariable{ + Description: "No description provided", + DefaultValue: "v2", + EnumValues: []string{ + "v1", + "v2", + }, }, }, }, }, - }, } return cfg } From 9d53ee4b69eb7f03289098ff8882643b6cb9942a Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@users.noreply.github.com> Date: Thu, 2 Jan 2020 05:46:49 +0000 Subject: [PATCH 11/82] [kotlin][client] make Request date converter toJson as default (#4884) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix for Issue #2205 Because when we have tags on OpenAPI Specification, there can be more than 1 Feign Beans being generated and the title field is share by all the clients. This makes the code to stop working in runtime. Here is a PR which uses the classVarName instead, which follows the standards and should be enough to solve this issue. For more info please refer to: https://github.com/OpenAPITools/openapi-generator/issues/2205 * fix java feign parameter request name (#4883) * update sprign cloud feign sample * [JAVA][SPRING][2195] added missing getter for enum value (#2346) * [2195] added missing getter for enum value * updated samples * re-generate spring samples * Removed @JsonValue from toString and regenerated samples * re-generate spring samples Co-authored-by: Esteban Gehring * update samples * [kotlin][client] make Request date converter toJson as default * [kotlin][client] update windows scripts * [kotlin][client] update docs * [kotlin][client] update scripts * [kotlin][client] update scripts Co-authored-by: Filipe Manuel Couto Pinheiro Co-authored-by: William Cheng Co-authored-by: Lukáš Vasek Co-authored-by: Esteban Gehring --- bin/ci/kotlin-client-string.json | 4 +++- bin/kotlin-client-all.sh | 2 +- ...h => kotlin-client-json-request-string.sh} | 2 +- bin/windows/kotlin-client-all.bat | 2 +- .../kotlin-client-json-request-date.bat | 10 -------- .../kotlin-client-json-request-string.bat | 10 ++++++++ docs/generators/kotlin.md | 2 +- .../languages/KotlinClientCodegen.java | 6 ++--- .../Java/libraries/feign/api.mustache | 4 ++-- .../resources/JavaSpring/enumClass.mustache | 8 ++++++- .../JavaSpring/enumOuterClass.mustache | 8 ++++++- .../libraries/spring-cloud/apiClient.mustache | 4 ++-- pom.xml | 2 +- .../org/openapitools/client/api/FakeApi.java | 10 ++++---- .../org/openapitools/client/api/PetApi.java | 2 +- .../org/openapitools/client/api/StoreApi.java | 4 ++-- .../org/openapitools/client/api/FakeApi.java | 10 ++++---- .../org/openapitools/client/api/PetApi.java | 2 +- .../org/openapitools/client/api/StoreApi.java | 4 ++-- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../kotlin-json-request-date/settings.gradle | 2 -- .../.openapi-generator-ignore | 0 .../.openapi-generator/VERSION | 0 .../README.md | 0 .../build.gradle | 0 .../docs/ApiResponse.md | 0 .../docs/Category.md | 0 .../docs/Order.md | 0 .../docs/Pet.md | 0 .../docs/PetApi.md | 0 .../docs/StoreApi.md | 0 .../docs/Tag.md | 0 .../docs/User.md | 0 .../docs/UserApi.md | 0 .../pom.xml | 2 +- .../settings.gradle | 2 ++ .../org/openapitools/client/apis/PetApi.kt | 0 .../org/openapitools/client/apis/StoreApi.kt | 0 .../org/openapitools/client/apis/UserApi.kt | 0 .../client/infrastructure/ApiAbstractions.kt | 0 .../client/infrastructure/ApiClient.kt | 8 +------ .../ApiInfrastructureResponse.kt | 0 .../infrastructure/ApplicationDelegates.kt | 0 .../client/infrastructure/ByteArrayAdapter.kt | 0 .../client/infrastructure/Errors.kt | 0 .../client/infrastructure/LocalDateAdapter.kt | 0 .../infrastructure/LocalDateTimeAdapter.kt | 0 .../infrastructure/OffsetDateTimeAdapter.kt | 0 .../client/infrastructure/RequestConfig.kt | 0 .../client/infrastructure/RequestMethod.kt | 0 .../infrastructure/ResponseExtensions.kt | 0 .../client/infrastructure/Serializer.kt | 0 .../client/infrastructure/UUIDAdapter.kt | 0 .../openapitools/client/models/ApiResponse.kt | 0 .../openapitools/client/models/Category.kt | 0 .../org/openapitools/client/models/Order.kt | 0 .../org/openapitools/client/models/Pet.kt | 0 .../org/openapitools/client/models/Tag.kt | 0 .../org/openapitools/client/models/User.kt | 0 .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../client/infrastructure/ApiClient.kt | 8 ++++++- .../org/openapitools/api/PetApiClient.java | 4 ++-- .../org/openapitools/api/StoreApiClient.java | 4 ++-- .../org/openapitools/api/UserApiClient.java | 4 ++-- .../java/org/openapitools/model/Order.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../org/openapitools/api/PetApiClient.java | 4 ++-- .../org/openapitools/api/StoreApiClient.java | 4 ++-- .../org/openapitools/api/UserApiClient.java | 4 ++-- .../java/org/openapitools/model/Order.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- .../openapitools/virtualan/model/BigCat.java | 6 ++++- .../virtualan/model/BigCatAllOf.java | 6 ++++- .../virtualan/model/EnumArrays.java | 12 ++++++++-- .../virtualan/model/EnumClass.java | 6 ++++- .../virtualan/model/EnumTest.java | 24 +++++++++++++++---- .../openapitools/virtualan/model/MapTest.java | 6 ++++- .../openapitools/virtualan/model/Order.java | 6 ++++- .../virtualan/model/OuterEnum.java | 6 ++++- .../org/openapitools/virtualan/model/Pet.java | 6 ++++- .../java/org/openapitools/model/BigCat.java | 6 ++++- .../org/openapitools/model/BigCatAllOf.java | 6 ++++- .../org/openapitools/model/EnumArrays.java | 12 ++++++++-- .../org/openapitools/model/EnumClass.java | 6 ++++- .../java/org/openapitools/model/EnumTest.java | 24 +++++++++++++++---- .../java/org/openapitools/model/MapTest.java | 6 ++++- .../java/org/openapitools/model/Order.java | 6 ++++- .../org/openapitools/model/OuterEnum.java | 6 ++++- .../main/java/org/openapitools/model/Pet.java | 6 ++++- 177 files changed, 872 insertions(+), 220 deletions(-) rename bin/{kotlin-client-json-request-date.sh => kotlin-client-json-request-string.sh} (86%) delete mode 100644 bin/windows/kotlin-client-json-request-date.bat create mode 100644 bin/windows/kotlin-client-json-request-string.bat delete mode 100644 samples/client/petstore/kotlin-json-request-date/settings.gradle rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/.openapi-generator-ignore (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/.openapi-generator/VERSION (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/README.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/build.gradle (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/ApiResponse.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/Category.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/Order.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/Pet.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/PetApi.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/StoreApi.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/Tag.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/User.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/docs/UserApi.md (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/pom.xml (96%) create mode 100644 samples/client/petstore/kotlin-json-request-string/settings.gradle rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/apis/PetApi.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/apis/UserApi.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt (94%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/Category.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/Order.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/Pet.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/Tag.kt (100%) rename samples/client/petstore/{kotlin-json-request-date => kotlin-json-request-string}/src/main/kotlin/org/openapitools/client/models/User.kt (100%) diff --git a/bin/ci/kotlin-client-string.json b/bin/ci/kotlin-client-string.json index 52f68e53b4..cceb366c2c 100644 --- a/bin/ci/kotlin-client-string.json +++ b/bin/ci/kotlin-client-string.json @@ -6,6 +6,8 @@ "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", "additionalProperties": { "dateLibrary": "string", - "serializableModel": "true" + "serializableModel": "true", + "sortParamsByRequiredFlag": "false", + "sortModelPropertiesByRequiredFlag": "false" } } \ No newline at end of file diff --git a/bin/kotlin-client-all.sh b/bin/kotlin-client-all.sh index 9fa9ee7de0..8663752ab5 100755 --- a/bin/kotlin-client-all.sh +++ b/bin/kotlin-client-all.sh @@ -10,4 +10,4 @@ ./bin/kotlin-client-threetenbp.sh ./bin/kotlin-client-nullable.sh ./bin/kotlin-client-retrofit2.sh -./bin/kotlin-client-json-request-date.sh +./bin/kotlin-client-json-request-string.sh diff --git a/bin/kotlin-client-json-request-date.sh b/bin/kotlin-client-json-request-string.sh similarity index 86% rename from bin/kotlin-client-json-request-date.sh rename to bin/kotlin-client-json-request-string.sh index 84ee2b7485..2e32eed675 100755 --- a/bin/kotlin-client-json-request-date.sh +++ b/bin/kotlin-client-json-request-string.sh @@ -27,6 +27,6 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml -g kotlin --artifact-id kotlin-petstore-json-request-date --additional-properties requestDateConverter=toJson -o samples/client/petstore/kotlin-json-request-date $@" +ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml -g kotlin --artifact-id kotlin-petstore-json-request-string --additional-properties requestDateConverter=toString -o samples/client/petstore/kotlin-json-request-string $@" java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/windows/kotlin-client-all.bat b/bin/windows/kotlin-client-all.bat index 3833a95c7d..d4dd27a9f6 100644 --- a/bin/windows/kotlin-client-all.bat +++ b/bin/windows/kotlin-client-all.bat @@ -7,5 +7,5 @@ call powershell -command "& '%~dp0\kotlin-client-petstore.bat'" call powershell -command "& '%~dp0\kotlin-client-string.bat'" call powershell -command "& '%~dp0\kotlin-client-threetenbp.bat'" call powershell -command "& '%~dp0\kotlin-client-nullable.bat'" -call powershell -command "& '%~dp0\kotlin-client-json-request-date.bat'" +call powershell -command "& '%~dp0\kotlin-client-json-request-string.bat'" call powershell -command "& '%~dp0\kotlin-client-retrofit2.bat'" \ No newline at end of file diff --git a/bin/windows/kotlin-client-json-request-date.bat b/bin/windows/kotlin-client-json-request-date.bat deleted file mode 100644 index 47fd16af7a..0000000000 --- a/bin/windows/kotlin-client-json-request-date.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-json-request-date" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-date-field.yaml -g kotlin --additional-properties requestDateConverter=toJson -o samples\client\petstore\kotlin-json-request-date - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-json-request-string.bat b/bin/windows/kotlin-client-json-request-string.bat new file mode 100644 index 0000000000..1b257af020 --- /dev/null +++ b/bin/windows/kotlin-client-json-request-string.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties +set ags=generate --artifact-id "kotlin-petstore-json-request-string" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-date-field.yaml -g kotlin --additional-properties requestDateConverter=toString -o samples\client\petstore\kotlin-json-request-string + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 5c8f71e679..f65a17b964 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -21,4 +21,4 @@ sidebar_label: kotlin |dateLibrary|Option. Date library to use|
**threetenbp-localdatetime**
Threetenbp - Backport of JSR310 (jvm only, for legacy app only)
**string**
String
**java8-localdatetime**
Java 8 native JSR310 (jvm only, for legacy app only)
**java8**
Java 8 native JSR310 (jvm only, preferred for jdk 1.8+)
**threetenbp**
Threetenbp - Backport of JSR310 (jvm only, preferred for jdk < 1.8)
|java8| |collectionType|Option. Collection type to use|
**array**
kotlin.Array
**list**
kotlin.collections.List
|array| |library|Library template (sub-template) to use|
**jvm-okhttp4**
[DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
**jvm-okhttp3**
Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
**jvm-retrofit2**
Platform: Java Virtual Machine. HTTP client: Retrofit 2.6.2.
**multiplatform**
Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.
|jvm-okhttp4| -|requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|
**toJson**
Date formater option using a json converter.
**toString**
[DEFAULT] Use the 'toString'-method of the date-time object to retrieve the related string representation.
|toString| +|requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|
**toJson**
[DEFAULT] Date formater option using a json converter.
**toString**
Use the 'toString'-method of the date-time object to retrieve the related string representation.
|toJson| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 85bffe3f05..b1d4de7a9b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -50,7 +50,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { protected static final String VENDOR_EXTENSION_BASE_NAME_LITERAL = "x-base-name-literal"; protected String dateLibrary = DateLibrary.JAVA8.value; - protected String requestDateConverter = RequestDateConverter.TO_STRING.value; + protected String requestDateConverter = RequestDateConverter.TO_JSON.value; protected String collectionType = CollectionType.ARRAY.value; public enum DateLibrary { @@ -143,8 +143,8 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { CliOption requestDateConverter = new CliOption(REQUEST_DATE_CONVERTER, "JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)"); Map requestDateConverterOptions = new HashMap<>(); - requestDateConverterOptions.put(RequestDateConverter.TO_STRING.value, "[DEFAULT] Use the 'toString'-method of the date-time object to retrieve the related string representation."); - requestDateConverterOptions.put(RequestDateConverter.TO_JSON.value, "Date formater option using a json converter."); + requestDateConverterOptions.put(RequestDateConverter.TO_JSON.value, "[DEFAULT] Date formater option using a json converter."); + requestDateConverterOptions.put(RequestDateConverter.TO_STRING.value, "Use the 'toString'-method of the date-time object to retrieve the related string representation."); requestDateConverter.setEnum(requestDateConverterOptions); requestDateConverter.setDefault(this.requestDateConverter); cliOptions.add(requestDateConverter); diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache index b446223ba5..238079ca27 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/api.mustache @@ -42,7 +42,7 @@ public interface {{classname}} extends ApiClient.Api { "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, {{/hasMore}}{{/headerParams}} }) - {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{baseName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{#hasQueryParams}} /** @@ -80,7 +80,7 @@ public interface {{classname}} extends ApiClient.Api { "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{#hasMore}}, {{/hasMore}}{{/headerParams}} }) - {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map queryParams); + {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{baseName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{baseName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache index 2e90275477..c1d813aa80 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumClass.mustache @@ -26,8 +26,14 @@ this.value = value; } - @Override + {{#jackson}} @JsonValue + {{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache index 60d13571cb..baa6d54d70 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/enumOuterClass.mustache @@ -24,8 +24,14 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum this.value = value; } - @Override + {{#jackson}} @JsonValue + {{/jackson}} + public {{{dataType}}} getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache index 2a3e72fb1c..f00a6c3b6f 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/apiClient.mustache @@ -4,7 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient; import {{configPackage}}.ClientConfiguration; {{=<% %>=}} -@FeignClient(name="${<%title%>.name:<%title%>}", url="${<%title%>.url:<%basePath%>}", configuration = ClientConfiguration.class) +@FeignClient(name="${<%classVarName%>.name:<%classVarName%>}", url="${<%classVarName%>.url:<%basePath%>}", configuration = ClientConfiguration.class) <%={{ }}=%> public interface {{classname}}Client extends {{classname}} { -} \ No newline at end of file +} diff --git a/pom.xml b/pom.xml index f1bf09338b..8a68e9ce2a 100644 --- a/pom.xml +++ b/pom.xml @@ -1260,7 +1260,7 @@ samples/client/petstore/kotlin-threetenbp/ samples/client/petstore/kotlin-string/ samples/client/petstore/kotlin-moshi-codegen/ - samples/client/petstore/kotlin-json-request-date/ + samples/client/petstore/kotlin-json-request-string/ samples/server/petstore/erlang-server samples/server/petstore/jaxrs/jersey2 diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java index 601e2527ee..17404af4c5 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java @@ -181,7 +181,7 @@ public interface FakeApi extends ApiClient.Api { "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", }) - void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback); + void testEndpointParameters(@Param("number") BigDecimal number, @Param("double") Double _double, @Param("pattern_without_delimiter") String patternWithoutDelimiter, @Param("byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("callback") String paramCallback); /** * To test enum parameters @@ -203,7 +203,7 @@ public interface FakeApi extends ApiClient.Api { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_query_string_array") List enumQueryStringArray, @Param("enum_query_string") String enumQueryString, @Param("enum_query_integer") Integer enumQueryInteger, @Param("enum_query_double") Double enumQueryDouble, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString); /** * To test enum parameters @@ -234,7 +234,7 @@ public interface FakeApi extends ApiClient.Api { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map queryParams); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the @@ -276,7 +276,7 @@ public interface FakeApi extends ApiClient.Api { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); + void testGroupParameters(@Param("required_string_group") Integer requiredStringGroup, @Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("required_int64_group") Long requiredInt64Group, @Param("string_group") Integer stringGroup, @Param("boolean_group") Boolean booleanGroup, @Param("int64_group") Long int64Group); /** * Fake endpoint to test group parameters (optional) @@ -304,7 +304,7 @@ public interface FakeApi extends ApiClient.Api { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); + void testGroupParameters(@Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("boolean_group") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java index 4996156d28..5226f76408 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java @@ -40,7 +40,7 @@ public interface PetApi extends ApiClient.Api { "Accept: application/json", "api_key: {apiKey}" }) - void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey); + void deletePet(@Param("petId") Long petId, @Param("api_key") String apiKey); /** * Finds Pets by status diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java index 30757ed573..2dba62319d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java @@ -24,7 +24,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - void deleteOrder(@Param("orderId") String orderId); + void deleteOrder(@Param("order_id") String orderId); /** * Returns pet inventories by status @@ -47,7 +47,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - Order getOrderById(@Param("orderId") Long orderId); + Order getOrderById(@Param("order_id") Long orderId); /** * Place an order for a pet diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java index 601e2527ee..17404af4c5 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java @@ -181,7 +181,7 @@ public interface FakeApi extends ApiClient.Api { "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", }) - void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback); + void testEndpointParameters(@Param("number") BigDecimal number, @Param("double") Double _double, @Param("pattern_without_delimiter") String patternWithoutDelimiter, @Param("byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("callback") String paramCallback); /** * To test enum parameters @@ -203,7 +203,7 @@ public interface FakeApi extends ApiClient.Api { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_query_string_array") List enumQueryStringArray, @Param("enum_query_string") String enumQueryString, @Param("enum_query_integer") Integer enumQueryInteger, @Param("enum_query_double") Double enumQueryDouble, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString); /** * To test enum parameters @@ -234,7 +234,7 @@ public interface FakeApi extends ApiClient.Api { "enum_header_string: {enumHeaderString}" }) - void testEnumParameters(@Param("enumHeaderStringArray") List enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map queryParams); + void testEnumParameters(@Param("enum_header_string_array") List enumHeaderStringArray, @Param("enum_header_string") String enumHeaderString, @Param("enum_form_string_array") List enumFormStringArray, @Param("enum_form_string") String enumFormString, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the @@ -276,7 +276,7 @@ public interface FakeApi extends ApiClient.Api { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); + void testGroupParameters(@Param("required_string_group") Integer requiredStringGroup, @Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("required_int64_group") Long requiredInt64Group, @Param("string_group") Integer stringGroup, @Param("boolean_group") Boolean booleanGroup, @Param("int64_group") Long int64Group); /** * Fake endpoint to test group parameters (optional) @@ -304,7 +304,7 @@ public interface FakeApi extends ApiClient.Api { "boolean_group: {booleanGroup}" }) - void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); + void testGroupParameters(@Param("required_boolean_group") Boolean requiredBooleanGroup, @Param("boolean_group") Boolean booleanGroup, @QueryMap(encoded=true) Map queryParams); /** * A convenience class for generating query parameters for the diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java index 4996156d28..5226f76408 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/PetApi.java @@ -40,7 +40,7 @@ public interface PetApi extends ApiClient.Api { "Accept: application/json", "api_key: {apiKey}" }) - void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey); + void deletePet(@Param("petId") Long petId, @Param("api_key") String apiKey); /** * Finds Pets by status diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java index 30757ed573..2dba62319d 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java @@ -24,7 +24,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - void deleteOrder(@Param("orderId") String orderId); + void deleteOrder(@Param("order_id") String orderId); /** * Returns pet inventories by status @@ -47,7 +47,7 @@ public interface StoreApi extends ApiClient.Api { @Headers({ "Accept: application/json", }) - Order getOrderById(@Param("orderId") Long orderId); + Order getOrderById(@Param("order_id") Long orderId); /** * Place an order for a pet diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 8528940692..5dcfe38608 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.gson.toJson(value, T::class.java).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-json-request-date/settings.gradle b/samples/client/petstore/kotlin-json-request-date/settings.gradle deleted file mode 100644 index 6dde48f725..0000000000 --- a/samples/client/petstore/kotlin-json-request-date/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ - -rootProject.name = 'kotlin-petstore-json-request-date' \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-date/.openapi-generator-ignore b/samples/client/petstore/kotlin-json-request-string/.openapi-generator-ignore similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/.openapi-generator-ignore rename to samples/client/petstore/kotlin-json-request-string/.openapi-generator-ignore diff --git a/samples/client/petstore/kotlin-json-request-date/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/.openapi-generator/VERSION rename to samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION diff --git a/samples/client/petstore/kotlin-json-request-date/README.md b/samples/client/petstore/kotlin-json-request-string/README.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/README.md rename to samples/client/petstore/kotlin-json-request-string/README.md diff --git a/samples/client/petstore/kotlin-json-request-date/build.gradle b/samples/client/petstore/kotlin-json-request-string/build.gradle similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/build.gradle rename to samples/client/petstore/kotlin-json-request-string/build.gradle diff --git a/samples/client/petstore/kotlin-json-request-date/docs/ApiResponse.md b/samples/client/petstore/kotlin-json-request-string/docs/ApiResponse.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/ApiResponse.md rename to samples/client/petstore/kotlin-json-request-string/docs/ApiResponse.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/Category.md b/samples/client/petstore/kotlin-json-request-string/docs/Category.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/Category.md rename to samples/client/petstore/kotlin-json-request-string/docs/Category.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/Order.md b/samples/client/petstore/kotlin-json-request-string/docs/Order.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/Order.md rename to samples/client/petstore/kotlin-json-request-string/docs/Order.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/Pet.md b/samples/client/petstore/kotlin-json-request-string/docs/Pet.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/Pet.md rename to samples/client/petstore/kotlin-json-request-string/docs/Pet.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/PetApi.md b/samples/client/petstore/kotlin-json-request-string/docs/PetApi.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/PetApi.md rename to samples/client/petstore/kotlin-json-request-string/docs/PetApi.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/StoreApi.md b/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/StoreApi.md rename to samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/Tag.md b/samples/client/petstore/kotlin-json-request-string/docs/Tag.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/Tag.md rename to samples/client/petstore/kotlin-json-request-string/docs/Tag.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/User.md b/samples/client/petstore/kotlin-json-request-string/docs/User.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/User.md rename to samples/client/petstore/kotlin-json-request-string/docs/User.md diff --git a/samples/client/petstore/kotlin-json-request-date/docs/UserApi.md b/samples/client/petstore/kotlin-json-request-string/docs/UserApi.md similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/docs/UserApi.md rename to samples/client/petstore/kotlin-json-request-string/docs/UserApi.md diff --git a/samples/client/petstore/kotlin-json-request-date/pom.xml b/samples/client/petstore/kotlin-json-request-string/pom.xml similarity index 96% rename from samples/client/petstore/kotlin-json-request-date/pom.xml rename to samples/client/petstore/kotlin-json-request-string/pom.xml index 27124bdb90..947997039a 100644 --- a/samples/client/petstore/kotlin-json-request-date/pom.xml +++ b/samples/client/petstore/kotlin-json-request-string/pom.xml @@ -1,7 +1,7 @@ 4.0.0 io.swagger - KotlinJsonRequestDateClientTests + KotlinJsonRequestStringClientTests pom 1.0-SNAPSHOT Kotlin Moshi Petstore Client diff --git a/samples/client/petstore/kotlin-json-request-string/settings.gradle b/samples/client/petstore/kotlin-json-request-string/settings.gradle new file mode 100644 index 0000000000..24764e682e --- /dev/null +++ b/samples/client/petstore/kotlin-json-request-string/settings.gradle @@ -0,0 +1,2 @@ + +rootProject.name = 'kotlin-petstore-json-request-string' \ No newline at end of file diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/PetApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/PetApi.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/PetApi.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/UserApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/apis/UserApi.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/UserApi.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt similarity index 94% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 5670d3c132..de65b44cd9 100644 --- a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,12 +172,6 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - /* - .replace("\"", "") converts the json object string to an actual string for the query parameter. - The moshi or gson adapter allows a more generic solution instead of trying to use a native - formatter. It also easily allows to provide a simple way to define a custom date format pattern - inside a gson/moshi adapter. - */ - return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") + return value.toString() } } diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiInfrastructureResponse.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ApplicationDelegates.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/ApiResponse.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Category.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Category.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Category.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Order.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Order.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Order.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Pet.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Pet.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Pet.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Tag.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/Tag.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/Tag.kt diff --git a/samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/User.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt similarity index 100% rename from samples/client/petstore/kotlin-json-request-date/src/main/kotlin/org/openapitools/client/models/User.kt rename to samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/models/User.kt diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index de65b44cd9..5670d3c132 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 048c7f724a..f786e8d0f2 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ internal open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index de65b44cd9..5670d3c132 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index 4cd4486575..9551a3a0c9 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -170,6 +170,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index de65b44cd9..5670d3c132 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index de65b44cd9..5670d3c132 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt index de65b44cd9..5670d3c132 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt @@ -172,6 +172,12 @@ open class ApiClient(val baseUrl: String) { } protected inline fun parseDateToQueryString(value : T): String { - return value.toString() + /* + .replace("\"", "") converts the json object string to an actual string for the query parameter. + The moshi or gson adapter allows a more generic solution instead of trying to use a native + formatter. It also easily allows to provide a simple way to define a custom date format pattern + inside a gson/moshi adapter. + */ + return Serializer.moshi.adapter(T::class.java).toJson(value).replace("\"", "") } } diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java index ac33f94332..f80fe4ddc6 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${pet.name:pet}", url="${pet.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface PetApiClient extends PetApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java index 0943d58135..71d613a871 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${store.name:store}", url="${store.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface StoreApiClient extends StoreApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java index 1933bd82d3..1db4598108 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${user.name:user}", url="${user.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface UserApiClient extends UserApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java index 0878b2dfe7..74afafe555 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Order.java @@ -45,8 +45,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index 0700123586..d14c54e6ab 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -53,8 +53,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java index ac33f94332..f80fe4ddc6 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${pet.name:pet}", url="${pet.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface PetApiClient extends PetApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java index 0943d58135..71d613a871 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${store.name:store}", url="${store.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface StoreApiClient extends StoreApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java index 1933bd82d3..1db4598108 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApiClient.java @@ -3,6 +3,6 @@ package org.openapitools.api; import org.springframework.cloud.openfeign.FeignClient; import org.openapitools.configuration.ClientConfiguration; -@FeignClient(name="${openAPIPetstore.name:openAPIPetstore}", url="${openAPIPetstore.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) +@FeignClient(name="${user.name:user}", url="${user.url:http://petstore.swagger.io/v2}", configuration = ClientConfiguration.class) public interface UserApiClient extends UserApi { -} \ No newline at end of file +} diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java index 0878b2dfe7..74afafe555 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Order.java @@ -45,8 +45,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 0700123586..d14c54e6ab 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -53,8 +53,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java index 0878b2dfe7..74afafe555 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Order.java @@ -45,8 +45,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index 0700123586..d14c54e6ab 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -53,8 +53,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java index 87bc2feb92..dcc367e50e 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java index 9592f35f25..d57bb6c1de 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java index 7a4421206d..c9b418c690 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java index 85e3c108d4..26b38944e1 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java index 1fab3a2e12..e91bc5697c 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java index 9592f35f25..d57bb6c1de 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java index 7a4421206d..c9b418c690 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java index 85e3c108d4..26b38944e1 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index 1fab3a2e12..e91bc5697c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java index 9592f35f25..d57bb6c1de 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java index 7a4421206d..c9b418c690 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java index 85e3c108d4..26b38944e1 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 1fab3a2e12..e91bc5697c 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java index dbf4216195..aad86c6048 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java index 89cbe6c4ca..b98ba1e2fa 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java index 25585cdced..d2346d758a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java index 31286ef24f..02adc43755 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java index e5b7493db1..cc61c7818a 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java index d2d385b401..0e2354891e 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java index 4075aecc8f..2df7246dbb 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java index a0dbf4671d..ef0bba51c5 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index 78398cd43a..052fdc5308 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java index 21a2f37430..9bc946d6cc 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCat.java @@ -35,8 +35,12 @@ public class BigCat extends Cat { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java index 6e595fd476..9a57d85eec 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/BigCatAllOf.java @@ -33,8 +33,12 @@ public class BigCatAllOf { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java index 3c0ea1ea75..7ee6a98161 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumArrays.java @@ -31,8 +31,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -65,8 +69,12 @@ public class EnumArrays { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java index fd156263f3..ef4719c757 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumClass.java @@ -25,8 +25,12 @@ public enum EnumClass { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java index 7c93e03bbb..8eff3e0c49 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/EnumTest.java @@ -32,8 +32,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -68,8 +72,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -102,8 +110,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Integer getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } @@ -136,8 +148,12 @@ public class EnumTest { this.value = value; } - @Override @JsonValue + public Double getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java index 19a6db9cb1..80195fc3d4 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/MapTest.java @@ -36,8 +36,12 @@ public class MapTest { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java index c45d3e5450..e91680a724 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Order.java @@ -44,8 +44,12 @@ public class Order { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java index 59c416ba0f..6b5abc576b 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/OuterEnum.java @@ -25,8 +25,12 @@ public enum OuterEnum { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 5bea5f27a1..c30fc1653d 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -52,8 +52,12 @@ public class Pet { this.value = value; } - @Override @JsonValue + public String getValue() { + return value; + } + + @Override public String toString() { return String.valueOf(value); } From 39ba6bbfb17237b702ba9da62cfe54de1198044d Mon Sep 17 00:00:00 2001 From: Josh Burton Date: Thu, 2 Jan 2020 19:03:37 +1300 Subject: [PATCH 12/82] [dart-dio] Adds support for multipart form data post body (#4797) * [dart-dio] Adds support for multipart form data post body * [dart-dio] Fixes issues around formData --- .../languages/DartDioClientCodegen.java | 7 ++++ .../src/main/resources/dart-dio/api.mustache | 39 +++++++++++++------ .../main/resources/dart-dio/api_util.mustache | 18 +++++++++ 3 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index f5e82b6c2b..29c81b823c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -232,6 +232,8 @@ public class DartDioClientCodegen extends DartClientCodegen { supportingFiles.add(new SupportingFile("pubspec.mustache", "", "pubspec.yaml")); supportingFiles.add(new SupportingFile("analysis_options.mustache", "", "analysis_options.yaml")); supportingFiles.add(new SupportingFile("apilib.mustache", libFolder, "api.dart")); + supportingFiles.add(new SupportingFile("api_util.mustache", libFolder, "api_util.dart")); + supportingFiles.add(new SupportingFile("serializers.mustache", libFolder, "serializers.dart")); supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); @@ -346,6 +348,10 @@ public class DartDioClientCodegen extends DartClientCodegen { op.vendorExtensions.put("isForm", isForm); op.vendorExtensions.put("isMultipart", isMultipart); + if (op.getHasFormParams()) { + fullImports.add("package:" + pubName + "/api_util.dart"); + } + Set imports = new HashSet<>(); for (String item : op.imports) { if (!modelToIgnore.contains(item.toLowerCase(Locale.ROOT))) { @@ -356,6 +362,7 @@ public class DartDioClientCodegen extends DartClientCodegen { } modelImports.addAll(imports); op.imports = imports; + } objs.put("modelImports", modelImports); diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index d09a767408..e25eb930e8 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -25,10 +25,9 @@ class {{classname}} { String path = "{{{path}}}"{{#pathParams}}.replaceAll("{" + "{{baseName}}" + "}", {{{paramName}}}.toString()){{/pathParams}}; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; {{#headerParams}} headerParams["{{baseName}}"] = {{paramName}}; @@ -36,12 +35,29 @@ class {{classname}} { {{#queryParams}} queryParams["{{baseName}}"] = {{paramName}}; {{/queryParams}} - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); - List contentTypes = [{{#consumes}} - "{{{mediaType}}}"{{#hasMore}},{{/hasMore}}{{/consumes}}]; + List contentTypes = [{{#consumes}}"{{{mediaType}}}"{{#hasMore}},{{/hasMore}}{{/consumes}}]; + + {{#hasFormParams}} + Map formData = {}; + {{#formParams}} + {{#isMultipart}} + {{^isFile}} + if ({{paramName}} != null) { + formData['{{baseName}}'] = parameterToString({{paramName}}); + } + {{/isFile}} + {{#isFile}} + if ({{paramName}} != null) { + formData['{{baseName}}'] = MultipartFile.fromBytes({{paramName}}, filename: "{{baseName}}"); + } + {{/isFile}} + {{/isMultipart}} + {{/formParams}} + bodyData = FormData.fromMap(formData); + {{/hasFormParams}} {{#bodyParam}} {{#isListContainer}} @@ -52,14 +68,13 @@ class {{classname}} { var serializedBody = _serializers.serialize({{paramName}}); {{/isListContainer}} var json{{paramName}} = json.encode(serializedBody); + bodyData = json{{paramName}}; {{/bodyParam}} return _dio.request( path, queryParameters: queryParams, - {{#bodyParam}} - data: json{{paramName}}, - {{/bodyParam}} + data: bodyData, options: Options( method: '{{httpMethod}}'.toUpperCase(), headers: headerParams, diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache new file mode 100644 index 0000000000..eedad9166f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache @@ -0,0 +1,18 @@ +/// Format the given parameter object into string. +String parameterToString(dynamic value) { + if (value == null) { + return ''; + } else if (value is DateTime) { + return value.toUtc().toIso8601String(); + {{#models}} + {{#model}} + {{#isEnum}} + } else if (value is {{classname}}) { + return {{classname}}TypeTransformer().encode(value).toString(); + {{/isEnum}} + {{/model}} + {{/models}} + } else { + return value.toString(); + } +} \ No newline at end of file From 5cc5fbe76a03bdb8db4ba9b36bbbca96e2bd1c92 Mon Sep 17 00:00:00 2001 From: Bruno Coelho <4brunu@users.noreply.github.com> Date: Thu, 2 Jan 2020 12:21:45 +0000 Subject: [PATCH 13/82] New generator swift5 (#4086) * [swift5] introduce new generator * [swift5] add Swift Package Manager integration and update dependencies * [swift5] run petstore * [swift] update Swift 5 generator with Swift 4 changes * [swift] update Swift 5 generator with Swift 4 changes * [swift] make CodableHelper more customizable * [swift] update pet projects * [swift] update pet projects * [swift] add nullable support * [swift] make enums conform to CaseIterable * [swift] date formatter add support for ISO8601 with and without milliseconds * [swift] add urlsession support * [swift] remove unecessary sample unwrapRequired * [swift] rename JSONEncodableEncoding.swift to JSONDataEncoding.swift * [swift] use result in generator internals * [swift] cocoapods remove deprecated docset_url and add watchos deployment target * [swift] Add ability to pass in a dedicated queue for processing network response (Fix for 230) * [swift] update pet projects * [swift] update docs * [swift] add support for combine * [swift] update docs * [swift] update windows bat scripts * [swift] update windows bat scripts * [swift] update swift pet project tests * [swift] update depencies * [swift] make urlsession the default http client * [swift] add urlsession sample project * [swift] add urlsession sample project * [swift] update docs * [swift] improve combine unit tests * [swift] update docs --- CI/bitrise.yml | 19 + bin/swift5-all.sh | 4 + bin/swift5-petstore-alamofire.json | 7 + bin/swift5-petstore-alamofire.sh | 42 + bin/swift5-petstore-all.sh | 12 + bin/swift5-petstore-combine.json | 7 + bin/swift5-petstore-combine.sh | 42 + bin/swift5-petstore-nonPublicApi.json | 8 + bin/swift5-petstore-nonPublicApi.sh | 42 + bin/swift5-petstore-objcCompatible.json | 7 + bin/swift5-petstore-objcCompatible.sh | 42 + bin/swift5-petstore-promisekit.json | 7 + bin/swift5-petstore-promisekit.sh | 42 + bin/swift5-petstore-result.json | 7 + bin/swift5-petstore-result.sh | 42 + bin/swift5-petstore-rxswift.json | 7 + bin/swift5-petstore-rxswift.sh | 42 + bin/swift5-petstore-urlsession.json | 7 + bin/swift5-petstore-urlsession.sh | 42 + bin/swift5-petstore.json | 6 + bin/swift5-petstore.sh | 42 + bin/swift5-test.json | 6 + bin/swift5-test.sh | 42 + bin/windows/swift5-all.bat | 2 + bin/windows/swift5-petstore-alamofire.bat | 10 + bin/windows/swift5-petstore-all.bat | 9 + bin/windows/swift5-petstore-combine.bat | 10 + bin/windows/swift5-petstore-nonPublicApi.bat | 10 + .../swift5-petstore-objcCompatible.bat | 10 + bin/windows/swift5-petstore-promisekit.bat | 10 + bin/windows/swift5-petstore-result.bat | 10 + bin/windows/swift5-petstore-rxswift.bat | 10 + bin/windows/swift5-petstore-urlSession.bat | 10 + bin/windows/swift5-petstore.bat | 10 + bin/windows/swift5-test.bat | 10 + docs/generators.md | 1 + docs/generators/swift5.md | 31 + .../codegen/languages/Swift5Codegen.java | 1069 +++++++++++++++++ .../org.openapitools.codegen.CodegenConfig | 1 + .../main/resources/swift5/APIHelper.mustache | 71 ++ .../src/main/resources/swift5/APIs.mustache | 65 + .../main/resources/swift5/Cartfile.mustache | 3 + .../resources/swift5/CodableHelper.mustache | 48 + .../resources/swift5/Configuration.mustache | 16 + .../main/resources/swift5/Extensions.mustache | 189 +++ .../swift5/JSONDataEncoding.mustache | 53 + .../swift5/JSONEncodingHelper.mustache | 45 + .../src/main/resources/swift5/Models.mustache | 52 + .../swift5/OpenISO8601DateFormatter.mustache | 44 + .../resources/swift5/Package.swift.mustache | 40 + .../main/resources/swift5/Podspec.mustache | 38 + .../src/main/resources/swift5/README.mustache | 69 ++ .../swift5/SynchronizedDictionary.mustache | 36 + .../main/resources/swift5/XcodeGen.mustache | 17 + .../src/main/resources/swift5/_param.mustache | 1 + .../src/main/resources/swift5/api.mustache | 252 ++++ .../main/resources/swift5/api_doc.mustache | 97 ++ .../resources/swift5/git_push.sh.mustache | 58 + .../main/resources/swift5/gitignore.mustache | 63 + .../AlamofireImplementations.mustache | 378 ++++++ .../URLSessionImplementations.mustache | 544 +++++++++ .../src/main/resources/swift5/model.mustache | 24 + .../main/resources/swift5/modelArray.mustache | 1 + .../main/resources/swift5/modelEnum.mustache | 7 + .../modelInlineEnumDeclaration.mustache | 7 + .../resources/swift5/modelObject.mustache | 84 ++ .../main/resources/swift5/model_doc.mustache | 11 + .../options/Swift5OptionsProvider.java | 89 ++ .../codegen/swift5/Swift5CodegenTest.java | 147 +++ .../codegen/swift5/Swift5ModelEnumTest.java | 133 ++ .../codegen/swift5/Swift5ModelTest.java | 132 ++ .../codegen/swift5/Swift5OptionsTest.java | 61 + .../src/test/resources/2_0/swift5Test.json | 466 +++++++ pom.xml | 3 + .../Classes/OpenAPIs/APIHelper.swift | 12 +- .../Classes/OpenAPIs/APIs.swift | 29 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 96 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 52 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 94 +- .../OpenAPIs/AlamofireImplementations.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 6 +- .../Classes/OpenAPIs/Models.swift | 40 +- .../Classes/OpenAPIs/Models/Category.swift | 5 +- .../Classes/OpenAPIs/Models/Order.swift | 7 +- .../Classes/OpenAPIs/Models/Pet.swift | 7 +- .../Classes/OpenAPIs/Models/Tag.swift | 5 +- .../Classes/OpenAPIs/Models/User.swift | 5 +- .../SwaggerClient/AppDelegate.swift | 3 - .../SwaggerClient/ViewController.swift | 2 - .../SwaggerClientTests/ISOFullDateTests.swift | 4 +- .../SwaggerClientTests/PetAPITests.swift | 30 +- .../SwaggerClientTests/StoreAPITests.swift | 30 +- .../Classes/OpenAPIs/APIHelper.swift | 12 +- .../Classes/OpenAPIs/APIs.swift | 29 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 88 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 54 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 88 +- .../OpenAPIs/AlamofireImplementations.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 6 +- .../Classes/OpenAPIs/Models.swift | 40 +- .../Classes/OpenAPIs/Models/Category.swift | 5 +- .../Classes/OpenAPIs/Models/Order.swift | 7 +- .../Classes/OpenAPIs/Models/Pet.swift | 7 +- .../Classes/OpenAPIs/Models/Tag.swift | 5 +- .../Classes/OpenAPIs/Models/User.swift | 5 +- .../Pods/Alamofire/Source/Alamofire.swift | 24 +- .../Pods/Alamofire/Source/Download.swift | 15 +- .../Pods/Alamofire/Source/Manager.swift | 42 +- .../Alamofire/Source/MultipartFormData.swift | 21 +- .../Source/NetworkReachabilityManager.swift | 6 +- .../Alamofire/Source/ParameterEncoding.swift | 8 +- .../Pods/Alamofire/Source/Request.swift | 36 +- .../Pods/Alamofire/Source/Response.swift | 3 +- .../Source/ResponseSerialization.swift | 27 +- .../Alamofire/Source/ServerTrustPolicy.swift | 6 +- .../Pods/Alamofire/Source/Stream.swift | 3 +- .../Pods/Alamofire/Source/Timeline.swift | 3 +- .../Pods/Alamofire/Source/Upload.swift | 18 +- .../Pods/Alamofire/Source/Validation.swift | 9 +- .../SwaggerClient/AppDelegate.swift | 3 - .../SwaggerClient/ViewController.swift | 2 - .../SwaggerClientTests/PetAPITests.swift | 14 +- .../SwaggerClientTests/StoreAPITests.swift | 10 +- .../SwaggerClientTests/UserAPITests.swift | 12 +- .../Classes/OpenAPIs/APIHelper.swift | 12 +- .../Classes/OpenAPIs/APIs.swift | 29 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 88 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 52 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 88 +- .../OpenAPIs/AlamofireImplementations.swift | 2 +- .../Classes/OpenAPIs/Extensions.swift | 6 +- .../Classes/OpenAPIs/Models.swift | 40 +- .../Classes/OpenAPIs/Models/Category.swift | 5 +- .../Classes/OpenAPIs/Models/Order.swift | 7 +- .../Classes/OpenAPIs/Models/Pet.swift | 7 +- .../Classes/OpenAPIs/Models/Tag.swift | 5 +- .../Classes/OpenAPIs/Models/User.swift | 5 +- .../SwaggerClient/AppDelegate.swift | 2 - .../SwaggerClient/ViewController.swift | 1 - .../SwaggerClientTests/PetAPITests.swift | 4 +- .../SwaggerClientTests/StoreAPITests.swift | 4 +- .../SwaggerClientTests/UserAPITests.swift | 2 +- samples/client/petstore/swift5/.gitignore | 63 + .../swift5/alamofireLibrary/.gitignore | 63 + .../.openapi-generator-ignore | 6 +- .../.openapi-generator/VERSION | 1 + .../petstore/swift5/alamofireLibrary/Cartfile | 1 + .../swift5/alamofireLibrary/Info.plist | 22 + .../swift5/alamofireLibrary/Package.resolved | 16 + .../swift5/alamofireLibrary/Package.swift | 32 + .../alamofireLibrary/PetstoreClient.podspec | 15 + .../PetstoreClient.xcodeproj/project.pbxproj | 584 +++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/PetstoreClient.xcscheme | 99 ++ .../Classes/OpenAPIs/APIHelper.swift | 70 ++ .../Classes/OpenAPIs/APIs.swift | 62 + .../OpenAPIs/APIs/AnotherFakeAPI.swift | 48 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 619 ++++++++++ .../APIs/FakeClassnameTags123API.swift | 51 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 431 +++++++ .../Classes/OpenAPIs/APIs/StoreAPI.swift | 165 +++ .../Classes/OpenAPIs/APIs/UserAPI.swift | 318 +++++ .../OpenAPIs/AlamofireImplementations.swift | 377 ++++++ .../Classes/OpenAPIs/CodableHelper.swift | 48 + .../Classes/OpenAPIs/Configuration.swift | 16 + .../Classes/OpenAPIs/Extensions.swift | 173 +++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 + .../Classes/OpenAPIs/Models.swift | 51 + .../Models/AdditionalPropertiesClass.swift | 25 + .../Classes/OpenAPIs/Models/Animal.swift | 20 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 10 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 22 + .../Models/ArrayOfArrayOfNumberOnly.swift | 22 + .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/ArrayTest.swift | 28 + .../OpenAPIs/Models/Capitalization.swift | 38 + .../Classes/OpenAPIs/Models/Cat.swift | 22 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 18 + .../Classes/OpenAPIs/Models/Category.swift | 20 + .../Classes/OpenAPIs/Models/ClassModel.swift | 19 + .../Classes/OpenAPIs/Models/Client.swift | 18 + .../Classes/OpenAPIs/Models/Dog.swift | 22 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 18 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 33 + .../Classes/OpenAPIs/Models/EnumClass.swift | 14 + .../Classes/OpenAPIs/Models/EnumTest.swift | 52 + .../Classes/OpenAPIs/Models/File.swift | 20 + .../OpenAPIs/Models/FileSchemaTestClass.swift | 20 + .../Classes/OpenAPIs/Models/FormatTest.swift | 42 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 20 + .../Classes/OpenAPIs/Models/List.swift | 22 + .../Classes/OpenAPIs/Models/MapTest.swift | 35 + ...opertiesAndAdditionalPropertiesClass.swift | 22 + .../OpenAPIs/Models/Model200Response.swift | 26 + .../Classes/OpenAPIs/Models/Name.swift | 32 + .../Classes/OpenAPIs/Models/NumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/Order.swift | 34 + .../OpenAPIs/Models/OuterComposite.swift | 28 + .../Classes/OpenAPIs/Models/OuterEnum.swift | 14 + .../Classes/OpenAPIs/Models/Pet.swift | 34 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 20 + .../Classes/OpenAPIs/Models/Return.swift | 23 + .../OpenAPIs/Models/SpecialModelName.swift | 22 + .../OpenAPIs/Models/StringBooleanMap.swift | 45 + .../Classes/OpenAPIs/Models/Tag.swift | 20 + .../OpenAPIs/Models/TypeHolderDefault.swift | 34 + .../OpenAPIs/Models/TypeHolderExample.swift | 34 + .../Classes/OpenAPIs/Models/User.swift | 33 + .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 + .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../swift5/alamofireLibrary/README.md | 141 +++ .../SwaggerClientTests/.gitignore | 72 ++ .../SwaggerClientTests/Podfile | 13 + .../SwaggerClientTests/Podfile.lock | 23 + .../SwaggerClient.xcodeproj/project.pbxproj | 556 +++++++++ .../xcschemes/SwaggerClient.xcscheme | 97 ++ .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../SwaggerClient/AppDelegate.swift | 43 + .../AppIcon.appiconset/Contents.json | 93 ++ .../Base.lproj/LaunchScreen.storyboard | 27 + .../SwaggerClient/Base.lproj/Main.storyboard | 25 + .../SwaggerClient/Info.plist | 59 + .../SwaggerClient/ViewController.swift | 23 + .../SwaggerClientTests/DateFormatTests.swift | 114 ++ .../SwaggerClientTests/Info.plist | 36 + .../SwaggerClientTests/PetAPITests.swift | 80 ++ .../SwaggerClientTests/StoreAPITests.swift | 120 ++ .../SwaggerClientTests/UserAPITests.swift | 67 ++ .../SwaggerClientTests/pom.xml | 43 + .../SwaggerClientTests/run_xcodebuild.sh | 5 + .../docs/AdditionalPropertiesClass.md | 11 + .../swift5/alamofireLibrary/docs/Animal.md | 11 + .../alamofireLibrary/docs/AnimalFarm.md | 9 + .../alamofireLibrary/docs/AnotherFakeAPI.md | 59 + .../alamofireLibrary/docs/ApiResponse.md | 12 + .../docs/ArrayOfArrayOfNumberOnly.md | 10 + .../docs/ArrayOfNumberOnly.md | 10 + .../swift5/alamofireLibrary/docs/ArrayTest.md | 12 + .../alamofireLibrary/docs/Capitalization.md | 15 + .../swift5/alamofireLibrary/docs/Cat.md | 10 + .../swift5/alamofireLibrary/docs/CatAllOf.md | 10 + .../swift5/alamofireLibrary/docs/Category.md | 11 + .../alamofireLibrary/docs/ClassModel.md | 10 + .../swift5/alamofireLibrary/docs/Client.md | 10 + .../swift5/alamofireLibrary/docs/Dog.md | 10 + .../swift5/alamofireLibrary/docs/DogAllOf.md | 10 + .../alamofireLibrary/docs/EnumArrays.md | 11 + .../swift5/alamofireLibrary/docs/EnumClass.md | 9 + .../swift5/alamofireLibrary/docs/EnumTest.md | 14 + .../swift5/alamofireLibrary/docs/FakeAPI.md | 662 ++++++++++ .../docs/FakeClassnameTags123API.md | 59 + .../swift5/alamofireLibrary/docs/File.md | 10 + .../docs/FileSchemaTestClass.md | 11 + .../alamofireLibrary/docs/FormatTest.md | 22 + .../alamofireLibrary/docs/HasOnlyReadOnly.md | 11 + .../swift5/alamofireLibrary/docs/List.md | 10 + .../swift5/alamofireLibrary/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../alamofireLibrary/docs/Model200Response.md | 11 + .../swift5/alamofireLibrary/docs/Name.md | 13 + .../alamofireLibrary/docs/NumberOnly.md | 10 + .../swift5/alamofireLibrary/docs/Order.md | 15 + .../alamofireLibrary/docs/OuterComposite.md | 12 + .../swift5/alamofireLibrary/docs/OuterEnum.md | 9 + .../swift5/alamofireLibrary/docs/Pet.md | 15 + .../swift5/alamofireLibrary/docs/PetAPI.md | 469 ++++++++ .../alamofireLibrary/docs/ReadOnlyFirst.md | 11 + .../swift5/alamofireLibrary/docs/Return.md | 10 + .../alamofireLibrary/docs/SpecialModelName.md | 10 + .../swift5/alamofireLibrary/docs/StoreAPI.md | 206 ++++ .../alamofireLibrary/docs/StringBooleanMap.md | 9 + .../swift5/alamofireLibrary/docs/Tag.md | 11 + .../docs/TypeHolderDefault.md | 14 + .../docs/TypeHolderExample.md | 14 + .../swift5/alamofireLibrary/docs/User.md | 17 + .../swift5/alamofireLibrary/docs/UserAPI.md | 406 +++++++ .../swift5/alamofireLibrary/git_push.sh | 58 + .../petstore/swift5/alamofireLibrary/pom.xml | 43 + .../swift5/alamofireLibrary/project.yml | 15 + .../swift5/alamofireLibrary/run_spmbuild.sh | 3 + .../petstore/swift5/combineLibrary/.gitignore | 63 + .../combineLibrary/.openapi-generator-ignore | 23 + .../combineLibrary/.openapi-generator/VERSION | 1 + .../petstore/swift5/combineLibrary/Cartfile | 1 + .../petstore/swift5/combineLibrary/Info.plist | 22 + .../swift5/combineLibrary/Package.swift | 31 + .../combineLibrary/PetstoreClient.podspec | 14 + .../PetstoreClient.xcodeproj/project.pbxproj | 536 +++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/PetstoreClient.xcscheme | 99 ++ .../Classes/OpenAPIs/APIHelper.swift | 70 ++ .../Classes/OpenAPIs/APIs.swift | 64 + .../OpenAPIs/APIs/AnotherFakeAPI.swift | 52 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 656 ++++++++++ .../APIs/FakeClassnameTags123API.swift | 55 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 459 +++++++ .../Classes/OpenAPIs/APIs/StoreAPI.swift | 178 +++ .../Classes/OpenAPIs/APIs/UserAPI.swift | 343 ++++++ .../Classes/OpenAPIs/CodableHelper.swift | 48 + .../Classes/OpenAPIs/Configuration.swift | 16 + .../Classes/OpenAPIs/Extensions.swift | 173 +++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 + .../Classes/OpenAPIs/Models.swift | 51 + .../Models/AdditionalPropertiesClass.swift | 25 + .../Classes/OpenAPIs/Models/Animal.swift | 20 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 10 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 22 + .../Models/ArrayOfArrayOfNumberOnly.swift | 22 + .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/ArrayTest.swift | 28 + .../OpenAPIs/Models/Capitalization.swift | 38 + .../Classes/OpenAPIs/Models/Cat.swift | 22 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 18 + .../Classes/OpenAPIs/Models/Category.swift | 20 + .../Classes/OpenAPIs/Models/ClassModel.swift | 19 + .../Classes/OpenAPIs/Models/Client.swift | 18 + .../Classes/OpenAPIs/Models/Dog.swift | 22 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 18 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 33 + .../Classes/OpenAPIs/Models/EnumClass.swift | 14 + .../Classes/OpenAPIs/Models/EnumTest.swift | 52 + .../Classes/OpenAPIs/Models/File.swift | 20 + .../OpenAPIs/Models/FileSchemaTestClass.swift | 20 + .../Classes/OpenAPIs/Models/FormatTest.swift | 42 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 20 + .../Classes/OpenAPIs/Models/List.swift | 22 + .../Classes/OpenAPIs/Models/MapTest.swift | 35 + ...opertiesAndAdditionalPropertiesClass.swift | 22 + .../OpenAPIs/Models/Model200Response.swift | 26 + .../Classes/OpenAPIs/Models/Name.swift | 32 + .../Classes/OpenAPIs/Models/NumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/Order.swift | 34 + .../OpenAPIs/Models/OuterComposite.swift | 28 + .../Classes/OpenAPIs/Models/OuterEnum.swift | 14 + .../Classes/OpenAPIs/Models/Pet.swift | 34 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 20 + .../Classes/OpenAPIs/Models/Return.swift | 23 + .../OpenAPIs/Models/SpecialModelName.swift | 22 + .../OpenAPIs/Models/StringBooleanMap.swift | 45 + .../Classes/OpenAPIs/Models/Tag.swift | 20 + .../OpenAPIs/Models/TypeHolderDefault.swift | 34 + .../OpenAPIs/Models/TypeHolderExample.swift | 34 + .../Classes/OpenAPIs/Models/User.swift | 33 + .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 + .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../OpenAPIs/URLSessionImplementations.swift | 544 +++++++++ .../petstore/swift5/combineLibrary/README.md | 141 +++ .../SwaggerClientTests/.gitignore | 72 ++ .../combineLibrary/SwaggerClientTests/Podfile | 13 + .../SwaggerClientTests/Podfile.lock | 16 + .../SwaggerClient.xcodeproj/project.pbxproj | 549 +++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/SwaggerClient.xcscheme | 97 ++ .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../SwaggerClient/AppDelegate.swift | 43 + .../AppIcon.appiconset/Contents.json | 48 + .../Base.lproj/LaunchScreen.storyboard | 27 + .../SwaggerClient/Base.lproj/Main.storyboard | 25 + .../SwaggerClient/Info.plist | 58 + .../SwaggerClient/ViewController.swift | 23 + .../SwaggerClientTests/APIHelperTests.swift | 55 + .../SwaggerClientTests/Info.plist | 35 + .../SwaggerClientTests/PetAPITests.swift | 102 ++ .../SwaggerClientTests/StoreAPITests.swift | 107 ++ .../SwaggerClientTests/UserAPITests.swift | 149 +++ .../combineLibrary/SwaggerClientTests/pom.xml | 43 + .../SwaggerClientTests/run_xcodebuild.sh | 5 + .../docs/AdditionalPropertiesClass.md | 11 + .../swift5/combineLibrary/docs/Animal.md | 11 + .../swift5/combineLibrary/docs/AnimalFarm.md | 9 + .../combineLibrary/docs/AnotherFakeAPI.md | 59 + .../swift5/combineLibrary/docs/ApiResponse.md | 12 + .../docs/ArrayOfArrayOfNumberOnly.md | 10 + .../combineLibrary/docs/ArrayOfNumberOnly.md | 10 + .../swift5/combineLibrary/docs/ArrayTest.md | 12 + .../combineLibrary/docs/Capitalization.md | 15 + .../swift5/combineLibrary/docs/Cat.md | 10 + .../swift5/combineLibrary/docs/CatAllOf.md | 10 + .../swift5/combineLibrary/docs/Category.md | 11 + .../swift5/combineLibrary/docs/ClassModel.md | 10 + .../swift5/combineLibrary/docs/Client.md | 10 + .../swift5/combineLibrary/docs/Dog.md | 10 + .../swift5/combineLibrary/docs/DogAllOf.md | 10 + .../swift5/combineLibrary/docs/EnumArrays.md | 11 + .../swift5/combineLibrary/docs/EnumClass.md | 9 + .../swift5/combineLibrary/docs/EnumTest.md | 14 + .../swift5/combineLibrary/docs/FakeAPI.md | 662 ++++++++++ .../docs/FakeClassnameTags123API.md | 59 + .../swift5/combineLibrary/docs/File.md | 10 + .../docs/FileSchemaTestClass.md | 11 + .../swift5/combineLibrary/docs/FormatTest.md | 22 + .../combineLibrary/docs/HasOnlyReadOnly.md | 11 + .../swift5/combineLibrary/docs/List.md | 10 + .../swift5/combineLibrary/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../combineLibrary/docs/Model200Response.md | 11 + .../swift5/combineLibrary/docs/Name.md | 13 + .../swift5/combineLibrary/docs/NumberOnly.md | 10 + .../swift5/combineLibrary/docs/Order.md | 15 + .../combineLibrary/docs/OuterComposite.md | 12 + .../swift5/combineLibrary/docs/OuterEnum.md | 9 + .../swift5/combineLibrary/docs/Pet.md | 15 + .../swift5/combineLibrary/docs/PetAPI.md | 469 ++++++++ .../combineLibrary/docs/ReadOnlyFirst.md | 11 + .../swift5/combineLibrary/docs/Return.md | 10 + .../combineLibrary/docs/SpecialModelName.md | 10 + .../swift5/combineLibrary/docs/StoreAPI.md | 206 ++++ .../combineLibrary/docs/StringBooleanMap.md | 9 + .../swift5/combineLibrary/docs/Tag.md | 11 + .../combineLibrary/docs/TypeHolderDefault.md | 14 + .../combineLibrary/docs/TypeHolderExample.md | 14 + .../swift5/combineLibrary/docs/User.md | 17 + .../swift5/combineLibrary/docs/UserAPI.md | 406 +++++++ .../swift5/combineLibrary/git_push.sh | 58 + .../petstore/swift5/combineLibrary/pom.xml | 43 + .../swift5/combineLibrary/project.yml | 14 + .../swift5/combineLibrary/run_spmbuild.sh | 3 + .../client/petstore/swift5/default/.gitignore | 63 + .../swift5/default/.openapi-generator-ignore | 23 + .../swift5/default/.openapi-generator/VERSION | 1 + .../contents.xcworkspacedata | 7 + .../client/petstore/swift5/default/Cartfile | 1 + .../client/petstore/swift5/default/Info.plist | 22 + .../petstore/swift5/default/Package.swift | 31 + .../swift5/default/PetstoreClient.podspec | 14 + .../PetstoreClient.xcodeproj/project.pbxproj | 536 +++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcschemes/PetstoreClient.xcscheme | 99 ++ .../Classes/OpenAPIs/APIHelper.swift | 70 ++ .../Classes/OpenAPIs/APIs.swift | 64 + .../OpenAPIs/APIs/AnotherFakeAPI.swift | 48 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 619 ++++++++++ .../APIs/FakeClassnameTags123API.swift | 51 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 431 +++++++ .../Classes/OpenAPIs/APIs/StoreAPI.swift | 165 +++ .../Classes/OpenAPIs/APIs/UserAPI.swift | 318 +++++ .../Classes/OpenAPIs/CodableHelper.swift | 48 + .../Classes/OpenAPIs/Configuration.swift | 16 + .../Classes/OpenAPIs/Extensions.swift | 173 +++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 + .../Classes/OpenAPIs/Models.swift | 51 + .../Models/AdditionalPropertiesClass.swift | 25 + .../Classes/OpenAPIs/Models/Animal.swift | 20 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 10 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 22 + .../Models/ArrayOfArrayOfNumberOnly.swift | 22 + .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/ArrayTest.swift | 28 + .../OpenAPIs/Models/Capitalization.swift | 38 + .../Classes/OpenAPIs/Models/Cat.swift | 22 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 18 + .../Classes/OpenAPIs/Models/Category.swift | 20 + .../Classes/OpenAPIs/Models/ClassModel.swift | 19 + .../Classes/OpenAPIs/Models/Client.swift | 18 + .../Classes/OpenAPIs/Models/Dog.swift | 22 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 18 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 33 + .../Classes/OpenAPIs/Models/EnumClass.swift | 14 + .../Classes/OpenAPIs/Models/EnumTest.swift | 52 + .../Classes/OpenAPIs/Models/File.swift | 20 + .../OpenAPIs/Models/FileSchemaTestClass.swift | 20 + .../Classes/OpenAPIs/Models/FormatTest.swift | 42 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 20 + .../Classes/OpenAPIs/Models/List.swift | 22 + .../Classes/OpenAPIs/Models/MapTest.swift | 35 + ...opertiesAndAdditionalPropertiesClass.swift | 22 + .../OpenAPIs/Models/Model200Response.swift | 26 + .../Classes/OpenAPIs/Models/Name.swift | 32 + .../Classes/OpenAPIs/Models/NumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/Order.swift | 34 + .../OpenAPIs/Models/OuterComposite.swift | 28 + .../Classes/OpenAPIs/Models/OuterEnum.swift | 14 + .../Classes/OpenAPIs/Models/Pet.swift | 34 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 20 + .../Classes/OpenAPIs/Models/Return.swift | 23 + .../OpenAPIs/Models/SpecialModelName.swift | 22 + .../OpenAPIs/Models/StringBooleanMap.swift | 45 + .../Classes/OpenAPIs/Models/Tag.swift | 20 + .../OpenAPIs/Models/TypeHolderDefault.swift | 34 + .../OpenAPIs/Models/TypeHolderExample.swift | 34 + .../Classes/OpenAPIs/Models/User.swift | 33 + .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 + .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../OpenAPIs/URLSessionImplementations.swift | 544 +++++++++ .../client/petstore/swift5/default/README.md | 141 +++ .../default/SwaggerClientTests/.gitignore | 72 ++ .../swift5/default/SwaggerClientTests/Podfile | 13 + .../default/SwaggerClientTests/Podfile.lock | 16 + .../SwaggerClient.xcodeproj/project.pbxproj | 554 +++++++++ .../xcschemes/SwaggerClient.xcscheme | 97 ++ .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../SwaggerClient/AppDelegate.swift | 43 + .../AppIcon.appiconset/Contents.json | 93 ++ .../Base.lproj/LaunchScreen.storyboard | 27 + .../SwaggerClient/Base.lproj/Main.storyboard | 25 + .../SwaggerClient/Info.plist | 59 + .../SwaggerClient/ViewController.swift | 23 + .../SwaggerClientTests/DateFormatTests.swift | 114 ++ .../SwaggerClientTests/Info.plist | 36 + .../SwaggerClientTests/PetAPITests.swift | 80 ++ .../SwaggerClientTests/StoreAPITests.swift | 120 ++ .../SwaggerClientTests/UserAPITests.swift | 67 ++ .../swift5/default/SwaggerClientTests/pom.xml | 43 + .../SwaggerClientTests/run_xcodebuild.sh | 5 + .../default/docs/AdditionalPropertiesClass.md | 11 + .../petstore/swift5/default/docs/Animal.md | 11 + .../swift5/default/docs/AnimalFarm.md | 9 + .../swift5/default/docs/AnotherFakeAPI.md | 59 + .../swift5/default/docs/ApiResponse.md | 12 + .../default/docs/ArrayOfArrayOfNumberOnly.md | 10 + .../swift5/default/docs/ArrayOfNumberOnly.md | 10 + .../petstore/swift5/default/docs/ArrayTest.md | 12 + .../swift5/default/docs/Capitalization.md | 15 + .../petstore/swift5/default/docs/Cat.md | 10 + .../petstore/swift5/default/docs/CatAllOf.md | 10 + .../petstore/swift5/default/docs/Category.md | 11 + .../swift5/default/docs/ClassModel.md | 10 + .../petstore/swift5/default/docs/Client.md | 10 + .../petstore/swift5/default/docs/Dog.md | 10 + .../petstore/swift5/default/docs/DogAllOf.md | 10 + .../swift5/default/docs/EnumArrays.md | 11 + .../petstore/swift5/default/docs/EnumClass.md | 9 + .../petstore/swift5/default/docs/EnumTest.md | 14 + .../petstore/swift5/default/docs/FakeAPI.md | 662 ++++++++++ .../default/docs/FakeClassnameTags123API.md | 59 + .../petstore/swift5/default/docs/File.md | 10 + .../default/docs/FileSchemaTestClass.md | 11 + .../swift5/default/docs/FormatTest.md | 22 + .../swift5/default/docs/HasOnlyReadOnly.md | 11 + .../petstore/swift5/default/docs/List.md | 10 + .../petstore/swift5/default/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../swift5/default/docs/Model200Response.md | 11 + .../petstore/swift5/default/docs/Name.md | 13 + .../swift5/default/docs/NumberOnly.md | 10 + .../petstore/swift5/default/docs/Order.md | 15 + .../swift5/default/docs/OuterComposite.md | 12 + .../petstore/swift5/default/docs/OuterEnum.md | 9 + .../petstore/swift5/default/docs/Pet.md | 15 + .../petstore/swift5/default/docs/PetAPI.md | 469 ++++++++ .../swift5/default/docs/ReadOnlyFirst.md | 11 + .../petstore/swift5/default/docs/Return.md | 10 + .../swift5/default/docs/SpecialModelName.md | 10 + .../petstore/swift5/default/docs/StoreAPI.md | 206 ++++ .../swift5/default/docs/StringBooleanMap.md | 9 + .../petstore/swift5/default/docs/Tag.md | 11 + .../swift5/default/docs/TypeHolderDefault.md | 14 + .../swift5/default/docs/TypeHolderExample.md | 14 + .../petstore/swift5/default/docs/User.md | 17 + .../petstore/swift5/default/docs/UserAPI.md | 406 +++++++ .../petstore/swift5/default/git_push.sh | 58 + .../client/petstore/swift5/default/pom.xml | 43 + .../petstore/swift5/default/project.yml | 14 + .../petstore/swift5/default/run_spmbuild.sh | 3 + .../petstore/swift5/nonPublicApi/.gitignore | 63 + .../nonPublicApi/.openapi-generator-ignore | 23 + .../nonPublicApi/.openapi-generator/VERSION | 1 + .../contents.xcworkspacedata | 7 + .../petstore/swift5/nonPublicApi/Cartfile | 1 + .../petstore/swift5/nonPublicApi/Info.plist | 22 + .../swift5/nonPublicApi/Package.swift | 31 + .../nonPublicApi/PetstoreClient.podspec | 14 + .../PetstoreClient.xcodeproj/project.pbxproj | 536 +++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcschemes/PetstoreClient.xcscheme | 99 ++ .../Classes/OpenAPIs/APIHelper.swift | 70 ++ .../Classes/OpenAPIs/APIs.swift | 64 + .../OpenAPIs/APIs/AnotherFakeAPI.swift | 48 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 619 ++++++++++ .../APIs/FakeClassnameTags123API.swift | 51 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 431 +++++++ .../Classes/OpenAPIs/APIs/StoreAPI.swift | 165 +++ .../Classes/OpenAPIs/APIs/UserAPI.swift | 318 +++++ .../Classes/OpenAPIs/CodableHelper.swift | 48 + .../Classes/OpenAPIs/Configuration.swift | 16 + .../Classes/OpenAPIs/Extensions.swift | 173 +++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 + .../Classes/OpenAPIs/Models.swift | 51 + .../Models/AdditionalPropertiesClass.swift | 25 + .../Classes/OpenAPIs/Models/Animal.swift | 20 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 10 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 22 + .../Models/ArrayOfArrayOfNumberOnly.swift | 22 + .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/ArrayTest.swift | 28 + .../OpenAPIs/Models/Capitalization.swift | 38 + .../Classes/OpenAPIs/Models/Cat.swift | 22 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 18 + .../Classes/OpenAPIs/Models/Category.swift | 20 + .../Classes/OpenAPIs/Models/ClassModel.swift | 19 + .../Classes/OpenAPIs/Models/Client.swift | 18 + .../Classes/OpenAPIs/Models/Dog.swift | 22 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 18 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 33 + .../Classes/OpenAPIs/Models/EnumClass.swift | 14 + .../Classes/OpenAPIs/Models/EnumTest.swift | 52 + .../Classes/OpenAPIs/Models/File.swift | 20 + .../OpenAPIs/Models/FileSchemaTestClass.swift | 20 + .../Classes/OpenAPIs/Models/FormatTest.swift | 42 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 20 + .../Classes/OpenAPIs/Models/List.swift | 22 + .../Classes/OpenAPIs/Models/MapTest.swift | 35 + ...opertiesAndAdditionalPropertiesClass.swift | 22 + .../OpenAPIs/Models/Model200Response.swift | 26 + .../Classes/OpenAPIs/Models/Name.swift | 32 + .../Classes/OpenAPIs/Models/NumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/Order.swift | 34 + .../OpenAPIs/Models/OuterComposite.swift | 28 + .../Classes/OpenAPIs/Models/OuterEnum.swift | 14 + .../Classes/OpenAPIs/Models/Pet.swift | 34 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 20 + .../Classes/OpenAPIs/Models/Return.swift | 23 + .../OpenAPIs/Models/SpecialModelName.swift | 22 + .../OpenAPIs/Models/StringBooleanMap.swift | 45 + .../Classes/OpenAPIs/Models/Tag.swift | 20 + .../OpenAPIs/Models/TypeHolderDefault.swift | 34 + .../OpenAPIs/Models/TypeHolderExample.swift | 34 + .../Classes/OpenAPIs/Models/User.swift | 33 + .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 + .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../OpenAPIs/URLSessionImplementations.swift | 544 +++++++++ .../petstore/swift5/nonPublicApi/README.md | 141 +++ .../docs/AdditionalPropertiesClass.md | 11 + .../swift5/nonPublicApi/docs/Animal.md | 11 + .../swift5/nonPublicApi/docs/AnimalFarm.md | 9 + .../nonPublicApi/docs/AnotherFakeAPI.md | 59 + .../swift5/nonPublicApi/docs/ApiResponse.md | 12 + .../docs/ArrayOfArrayOfNumberOnly.md | 10 + .../nonPublicApi/docs/ArrayOfNumberOnly.md | 10 + .../swift5/nonPublicApi/docs/ArrayTest.md | 12 + .../nonPublicApi/docs/Capitalization.md | 15 + .../petstore/swift5/nonPublicApi/docs/Cat.md | 10 + .../swift5/nonPublicApi/docs/CatAllOf.md | 10 + .../swift5/nonPublicApi/docs/Category.md | 11 + .../swift5/nonPublicApi/docs/ClassModel.md | 10 + .../swift5/nonPublicApi/docs/Client.md | 10 + .../petstore/swift5/nonPublicApi/docs/Dog.md | 10 + .../swift5/nonPublicApi/docs/DogAllOf.md | 10 + .../swift5/nonPublicApi/docs/EnumArrays.md | 11 + .../swift5/nonPublicApi/docs/EnumClass.md | 9 + .../swift5/nonPublicApi/docs/EnumTest.md | 14 + .../swift5/nonPublicApi/docs/FakeAPI.md | 662 ++++++++++ .../docs/FakeClassnameTags123API.md | 59 + .../petstore/swift5/nonPublicApi/docs/File.md | 10 + .../nonPublicApi/docs/FileSchemaTestClass.md | 11 + .../swift5/nonPublicApi/docs/FormatTest.md | 22 + .../nonPublicApi/docs/HasOnlyReadOnly.md | 11 + .../petstore/swift5/nonPublicApi/docs/List.md | 10 + .../swift5/nonPublicApi/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../nonPublicApi/docs/Model200Response.md | 11 + .../petstore/swift5/nonPublicApi/docs/Name.md | 13 + .../swift5/nonPublicApi/docs/NumberOnly.md | 10 + .../swift5/nonPublicApi/docs/Order.md | 15 + .../nonPublicApi/docs/OuterComposite.md | 12 + .../swift5/nonPublicApi/docs/OuterEnum.md | 9 + .../petstore/swift5/nonPublicApi/docs/Pet.md | 15 + .../swift5/nonPublicApi/docs/PetAPI.md | 469 ++++++++ .../swift5/nonPublicApi/docs/ReadOnlyFirst.md | 11 + .../swift5/nonPublicApi/docs/Return.md | 10 + .../nonPublicApi/docs/SpecialModelName.md | 10 + .../swift5/nonPublicApi/docs/StoreAPI.md | 206 ++++ .../nonPublicApi/docs/StringBooleanMap.md | 9 + .../petstore/swift5/nonPublicApi/docs/Tag.md | 11 + .../nonPublicApi/docs/TypeHolderDefault.md | 14 + .../nonPublicApi/docs/TypeHolderExample.md | 14 + .../petstore/swift5/nonPublicApi/docs/User.md | 17 + .../swift5/nonPublicApi/docs/UserAPI.md | 406 +++++++ .../petstore/swift5/nonPublicApi/git_push.sh | 58 + .../petstore/swift5/nonPublicApi/pom.xml | 43 + .../petstore/swift5/nonPublicApi/project.yml | 14 + .../swift5/nonPublicApi/run_spmbuild.sh | 3 + .../petstore/swift5/objcCompatible/.gitignore | 63 + .../objcCompatible/.openapi-generator-ignore | 23 + .../objcCompatible/.openapi-generator/VERSION | 1 + .../contents.xcworkspacedata | 7 + .../petstore/swift5/objcCompatible/Cartfile | 1 + .../petstore/swift5/objcCompatible/Info.plist | 22 + .../swift5/objcCompatible/Package.swift | 31 + .../objcCompatible/PetstoreClient.podspec | 14 + .../PetstoreClient.xcodeproj/project.pbxproj | 536 +++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/PetstoreClient.xcscheme | 99 ++ .../Classes/OpenAPIs/APIHelper.swift | 70 ++ .../Classes/OpenAPIs/APIs.swift | 64 + .../OpenAPIs/APIs/AnotherFakeAPI.swift | 48 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 619 ++++++++++ .../APIs/FakeClassnameTags123API.swift | 51 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 431 +++++++ .../Classes/OpenAPIs/APIs/StoreAPI.swift | 165 +++ .../Classes/OpenAPIs/APIs/UserAPI.swift | 318 +++++ .../Classes/OpenAPIs/CodableHelper.swift | 48 + .../Classes/OpenAPIs/Configuration.swift | 16 + .../Classes/OpenAPIs/Extensions.swift | 173 +++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 + .../Classes/OpenAPIs/Models.swift | 51 + .../Models/AdditionalPropertiesClass.swift | 25 + .../Classes/OpenAPIs/Models/Animal.swift | 20 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 10 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 22 + .../Models/ArrayOfArrayOfNumberOnly.swift | 22 + .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/ArrayTest.swift | 28 + .../OpenAPIs/Models/Capitalization.swift | 38 + .../Classes/OpenAPIs/Models/Cat.swift | 27 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 18 + .../Classes/OpenAPIs/Models/Category.swift | 25 + .../Classes/OpenAPIs/Models/ClassModel.swift | 19 + .../Classes/OpenAPIs/Models/Client.swift | 18 + .../Classes/OpenAPIs/Models/Dog.swift | 22 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 18 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 33 + .../Classes/OpenAPIs/Models/EnumClass.swift | 14 + .../Classes/OpenAPIs/Models/EnumTest.swift | 52 + .../Classes/OpenAPIs/Models/File.swift | 20 + .../OpenAPIs/Models/FileSchemaTestClass.swift | 20 + .../Classes/OpenAPIs/Models/FormatTest.swift | 42 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 20 + .../Classes/OpenAPIs/Models/List.swift | 22 + .../Classes/OpenAPIs/Models/MapTest.swift | 35 + ...opertiesAndAdditionalPropertiesClass.swift | 22 + .../OpenAPIs/Models/Model200Response.swift | 26 + .../Classes/OpenAPIs/Models/Name.swift | 32 + .../Classes/OpenAPIs/Models/NumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/Order.swift | 43 + .../OpenAPIs/Models/OuterComposite.swift | 28 + .../Classes/OpenAPIs/Models/OuterEnum.swift | 14 + .../Classes/OpenAPIs/Models/Pet.swift | 43 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 20 + .../Classes/OpenAPIs/Models/Return.swift | 23 + .../OpenAPIs/Models/SpecialModelName.swift | 22 + .../OpenAPIs/Models/StringBooleanMap.swift | 45 + .../Classes/OpenAPIs/Models/Tag.swift | 25 + .../OpenAPIs/Models/TypeHolderDefault.swift | 34 + .../OpenAPIs/Models/TypeHolderExample.swift | 34 + .../Classes/OpenAPIs/Models/User.swift | 44 + .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 + .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../OpenAPIs/URLSessionImplementations.swift | 544 +++++++++ .../petstore/swift5/objcCompatible/README.md | 141 +++ .../docs/AdditionalPropertiesClass.md | 11 + .../swift5/objcCompatible/docs/Animal.md | 11 + .../swift5/objcCompatible/docs/AnimalFarm.md | 9 + .../objcCompatible/docs/AnotherFakeAPI.md | 59 + .../swift5/objcCompatible/docs/ApiResponse.md | 12 + .../docs/ArrayOfArrayOfNumberOnly.md | 10 + .../objcCompatible/docs/ArrayOfNumberOnly.md | 10 + .../swift5/objcCompatible/docs/ArrayTest.md | 12 + .../objcCompatible/docs/Capitalization.md | 15 + .../swift5/objcCompatible/docs/Cat.md | 10 + .../swift5/objcCompatible/docs/CatAllOf.md | 10 + .../swift5/objcCompatible/docs/Category.md | 11 + .../swift5/objcCompatible/docs/ClassModel.md | 10 + .../swift5/objcCompatible/docs/Client.md | 10 + .../swift5/objcCompatible/docs/Dog.md | 10 + .../swift5/objcCompatible/docs/DogAllOf.md | 10 + .../swift5/objcCompatible/docs/EnumArrays.md | 11 + .../swift5/objcCompatible/docs/EnumClass.md | 9 + .../swift5/objcCompatible/docs/EnumTest.md | 14 + .../swift5/objcCompatible/docs/FakeAPI.md | 662 ++++++++++ .../docs/FakeClassnameTags123API.md | 59 + .../swift5/objcCompatible/docs/File.md | 10 + .../docs/FileSchemaTestClass.md | 11 + .../swift5/objcCompatible/docs/FormatTest.md | 22 + .../objcCompatible/docs/HasOnlyReadOnly.md | 11 + .../swift5/objcCompatible/docs/List.md | 10 + .../swift5/objcCompatible/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../objcCompatible/docs/Model200Response.md | 11 + .../swift5/objcCompatible/docs/Name.md | 13 + .../swift5/objcCompatible/docs/NumberOnly.md | 10 + .../swift5/objcCompatible/docs/Order.md | 15 + .../objcCompatible/docs/OuterComposite.md | 12 + .../swift5/objcCompatible/docs/OuterEnum.md | 9 + .../swift5/objcCompatible/docs/Pet.md | 15 + .../swift5/objcCompatible/docs/PetAPI.md | 469 ++++++++ .../objcCompatible/docs/ReadOnlyFirst.md | 11 + .../swift5/objcCompatible/docs/Return.md | 10 + .../objcCompatible/docs/SpecialModelName.md | 10 + .../swift5/objcCompatible/docs/StoreAPI.md | 206 ++++ .../objcCompatible/docs/StringBooleanMap.md | 9 + .../swift5/objcCompatible/docs/Tag.md | 11 + .../objcCompatible/docs/TypeHolderDefault.md | 14 + .../objcCompatible/docs/TypeHolderExample.md | 14 + .../swift5/objcCompatible/docs/User.md | 17 + .../swift5/objcCompatible/docs/UserAPI.md | 406 +++++++ .../swift5/objcCompatible/git_push.sh | 58 + .../petstore/swift5/objcCompatible/pom.xml | 43 + .../swift5/objcCompatible/project.yml | 14 + .../swift5/objcCompatible/run_spmbuild.sh | 3 + .../swift5/promisekitLibrary/.gitignore | 63 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/VERSION | 1 + .../contents.xcworkspacedata | 7 + .../swift5/promisekitLibrary/Cartfile | 2 + .../swift5/promisekitLibrary/Info.plist | 22 + .../swift5/promisekitLibrary/Package.resolved | 16 + .../swift5/promisekitLibrary/Package.swift | 32 + .../promisekitLibrary/PetstoreClient.podspec | 15 + .../PetstoreClient.xcodeproj/project.pbxproj | 584 +++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/PetstoreClient.xcscheme | 99 ++ .../Classes/OpenAPIs/APIHelper.swift | 70 ++ .../Classes/OpenAPIs/APIs.swift | 64 + .../OpenAPIs/APIs/AnotherFakeAPI.swift | 51 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 644 ++++++++++ .../APIs/FakeClassnameTags123API.swift | 54 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 450 +++++++ .../Classes/OpenAPIs/APIs/StoreAPI.swift | 174 +++ .../Classes/OpenAPIs/APIs/UserAPI.swift | 335 ++++++ .../Classes/OpenAPIs/CodableHelper.swift | 48 + .../Classes/OpenAPIs/Configuration.swift | 16 + .../Classes/OpenAPIs/Extensions.swift | 189 +++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 + .../Classes/OpenAPIs/Models.swift | 51 + .../Models/AdditionalPropertiesClass.swift | 25 + .../Classes/OpenAPIs/Models/Animal.swift | 20 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 10 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 22 + .../Models/ArrayOfArrayOfNumberOnly.swift | 22 + .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/ArrayTest.swift | 28 + .../OpenAPIs/Models/Capitalization.swift | 38 + .../Classes/OpenAPIs/Models/Cat.swift | 22 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 18 + .../Classes/OpenAPIs/Models/Category.swift | 20 + .../Classes/OpenAPIs/Models/ClassModel.swift | 19 + .../Classes/OpenAPIs/Models/Client.swift | 18 + .../Classes/OpenAPIs/Models/Dog.swift | 22 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 18 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 33 + .../Classes/OpenAPIs/Models/EnumClass.swift | 14 + .../Classes/OpenAPIs/Models/EnumTest.swift | 52 + .../Classes/OpenAPIs/Models/File.swift | 20 + .../OpenAPIs/Models/FileSchemaTestClass.swift | 20 + .../Classes/OpenAPIs/Models/FormatTest.swift | 42 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 20 + .../Classes/OpenAPIs/Models/List.swift | 22 + .../Classes/OpenAPIs/Models/MapTest.swift | 35 + ...opertiesAndAdditionalPropertiesClass.swift | 22 + .../OpenAPIs/Models/Model200Response.swift | 26 + .../Classes/OpenAPIs/Models/Name.swift | 32 + .../Classes/OpenAPIs/Models/NumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/Order.swift | 34 + .../OpenAPIs/Models/OuterComposite.swift | 28 + .../Classes/OpenAPIs/Models/OuterEnum.swift | 14 + .../Classes/OpenAPIs/Models/Pet.swift | 34 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 20 + .../Classes/OpenAPIs/Models/Return.swift | 23 + .../OpenAPIs/Models/SpecialModelName.swift | 22 + .../OpenAPIs/Models/StringBooleanMap.swift | 45 + .../Classes/OpenAPIs/Models/Tag.swift | 20 + .../OpenAPIs/Models/TypeHolderDefault.swift | 34 + .../OpenAPIs/Models/TypeHolderExample.swift | 34 + .../Classes/OpenAPIs/Models/User.swift | 33 + .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 + .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../OpenAPIs/URLSessionImplementations.swift | 544 +++++++++ .../swift5/promisekitLibrary/README.md | 141 +++ .../SwaggerClientTests/.gitignore | 72 ++ .../SwaggerClientTests/Podfile | 13 + .../SwaggerClientTests/Podfile.lock | 23 + .../SwaggerClient.xcodeproj/project.pbxproj | 544 +++++++++ .../xcschemes/SwaggerClient.xcscheme | 97 ++ .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../SwaggerClient/AppDelegate.swift | 43 + .../AppIcon.appiconset/Contents.json | 93 ++ .../Base.lproj/LaunchScreen.storyboard | 27 + .../SwaggerClient/Base.lproj/Main.storyboard | 25 + .../SwaggerClient/Info.plist | 59 + .../SwaggerClient/ViewController.swift | 23 + .../SwaggerClientTests/Info.plist | 36 + .../SwaggerClientTests/PetAPITests.swift | 63 + .../SwaggerClientTests/StoreAPITests.swift | 80 ++ .../SwaggerClientTests/UserAPITests.swift | 37 + .../SwaggerClientTests/pom.xml | 43 + .../SwaggerClientTests/run_xcodebuild.sh | 5 + .../docs/AdditionalPropertiesClass.md | 11 + .../swift5/promisekitLibrary/docs/Animal.md | 11 + .../promisekitLibrary/docs/AnimalFarm.md | 9 + .../promisekitLibrary/docs/AnotherFakeAPI.md | 56 + .../promisekitLibrary/docs/ApiResponse.md | 12 + .../docs/ArrayOfArrayOfNumberOnly.md | 10 + .../docs/ArrayOfNumberOnly.md | 10 + .../promisekitLibrary/docs/ArrayTest.md | 12 + .../promisekitLibrary/docs/Capitalization.md | 15 + .../swift5/promisekitLibrary/docs/Cat.md | 10 + .../swift5/promisekitLibrary/docs/CatAllOf.md | 10 + .../swift5/promisekitLibrary/docs/Category.md | 11 + .../promisekitLibrary/docs/ClassModel.md | 10 + .../swift5/promisekitLibrary/docs/Client.md | 10 + .../swift5/promisekitLibrary/docs/Dog.md | 10 + .../swift5/promisekitLibrary/docs/DogAllOf.md | 10 + .../promisekitLibrary/docs/EnumArrays.md | 11 + .../promisekitLibrary/docs/EnumClass.md | 9 + .../swift5/promisekitLibrary/docs/EnumTest.md | 14 + .../swift5/promisekitLibrary/docs/FakeAPI.md | 626 ++++++++++ .../docs/FakeClassnameTags123API.md | 56 + .../swift5/promisekitLibrary/docs/File.md | 10 + .../docs/FileSchemaTestClass.md | 11 + .../promisekitLibrary/docs/FormatTest.md | 22 + .../promisekitLibrary/docs/HasOnlyReadOnly.md | 11 + .../swift5/promisekitLibrary/docs/List.md | 10 + .../swift5/promisekitLibrary/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../docs/Model200Response.md | 11 + .../swift5/promisekitLibrary/docs/Name.md | 13 + .../promisekitLibrary/docs/NumberOnly.md | 10 + .../swift5/promisekitLibrary/docs/Order.md | 15 + .../promisekitLibrary/docs/OuterComposite.md | 12 + .../promisekitLibrary/docs/OuterEnum.md | 9 + .../swift5/promisekitLibrary/docs/Pet.md | 15 + .../swift5/promisekitLibrary/docs/PetAPI.md | 442 +++++++ .../promisekitLibrary/docs/ReadOnlyFirst.md | 11 + .../swift5/promisekitLibrary/docs/Return.md | 10 + .../docs/SpecialModelName.md | 10 + .../swift5/promisekitLibrary/docs/StoreAPI.md | 194 +++ .../docs/StringBooleanMap.md | 9 + .../swift5/promisekitLibrary/docs/Tag.md | 11 + .../docs/TypeHolderDefault.md | 14 + .../docs/TypeHolderExample.md | 14 + .../swift5/promisekitLibrary/docs/User.md | 17 + .../swift5/promisekitLibrary/docs/UserAPI.md | 382 ++++++ .../swift5/promisekitLibrary/git_push.sh | 58 + .../petstore/swift5/promisekitLibrary/pom.xml | 43 + .../swift5/promisekitLibrary/project.yml | 15 + .../swift5/promisekitLibrary/run_spmbuild.sh | 3 + .../petstore/swift5/resultLibrary/.gitignore | 63 + .../resultLibrary/.openapi-generator-ignore | 23 + .../resultLibrary/.openapi-generator/VERSION | 1 + .../contents.xcworkspacedata | 7 + .../petstore/swift5/resultLibrary/Cartfile | 1 + .../petstore/swift5/resultLibrary/Info.plist | 22 + .../swift5/resultLibrary/Package.swift | 31 + .../resultLibrary/PetstoreClient.podspec | 14 + .../PetstoreClient.xcodeproj/project.pbxproj | 536 +++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/PetstoreClient.xcscheme | 99 ++ .../Classes/OpenAPIs/APIHelper.swift | 70 ++ .../Classes/OpenAPIs/APIs.swift | 64 + .../OpenAPIs/APIs/AnotherFakeAPI.swift | 48 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 619 ++++++++++ .../APIs/FakeClassnameTags123API.swift | 51 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 431 +++++++ .../Classes/OpenAPIs/APIs/StoreAPI.swift | 165 +++ .../Classes/OpenAPIs/APIs/UserAPI.swift | 318 +++++ .../Classes/OpenAPIs/CodableHelper.swift | 48 + .../Classes/OpenAPIs/Configuration.swift | 16 + .../Classes/OpenAPIs/Extensions.swift | 173 +++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 + .../Classes/OpenAPIs/Models.swift | 51 + .../Models/AdditionalPropertiesClass.swift | 25 + .../Classes/OpenAPIs/Models/Animal.swift | 20 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 10 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 22 + .../Models/ArrayOfArrayOfNumberOnly.swift | 22 + .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/ArrayTest.swift | 28 + .../OpenAPIs/Models/Capitalization.swift | 38 + .../Classes/OpenAPIs/Models/Cat.swift | 22 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 18 + .../Classes/OpenAPIs/Models/Category.swift | 20 + .../Classes/OpenAPIs/Models/ClassModel.swift | 19 + .../Classes/OpenAPIs/Models/Client.swift | 18 + .../Classes/OpenAPIs/Models/Dog.swift | 22 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 18 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 33 + .../Classes/OpenAPIs/Models/EnumClass.swift | 14 + .../Classes/OpenAPIs/Models/EnumTest.swift | 52 + .../Classes/OpenAPIs/Models/File.swift | 20 + .../OpenAPIs/Models/FileSchemaTestClass.swift | 20 + .../Classes/OpenAPIs/Models/FormatTest.swift | 42 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 20 + .../Classes/OpenAPIs/Models/List.swift | 22 + .../Classes/OpenAPIs/Models/MapTest.swift | 35 + ...opertiesAndAdditionalPropertiesClass.swift | 22 + .../OpenAPIs/Models/Model200Response.swift | 26 + .../Classes/OpenAPIs/Models/Name.swift | 32 + .../Classes/OpenAPIs/Models/NumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/Order.swift | 34 + .../OpenAPIs/Models/OuterComposite.swift | 28 + .../Classes/OpenAPIs/Models/OuterEnum.swift | 14 + .../Classes/OpenAPIs/Models/Pet.swift | 34 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 20 + .../Classes/OpenAPIs/Models/Return.swift | 23 + .../OpenAPIs/Models/SpecialModelName.swift | 22 + .../OpenAPIs/Models/StringBooleanMap.swift | 45 + .../Classes/OpenAPIs/Models/Tag.swift | 20 + .../OpenAPIs/Models/TypeHolderDefault.swift | 34 + .../OpenAPIs/Models/TypeHolderExample.swift | 34 + .../Classes/OpenAPIs/Models/User.swift | 33 + .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 + .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../OpenAPIs/URLSessionImplementations.swift | 544 +++++++++ .../petstore/swift5/resultLibrary/README.md | 141 +++ .../docs/AdditionalPropertiesClass.md | 11 + .../swift5/resultLibrary/docs/Animal.md | 11 + .../swift5/resultLibrary/docs/AnimalFarm.md | 9 + .../resultLibrary/docs/AnotherFakeAPI.md | 59 + .../swift5/resultLibrary/docs/ApiResponse.md | 12 + .../docs/ArrayOfArrayOfNumberOnly.md | 10 + .../resultLibrary/docs/ArrayOfNumberOnly.md | 10 + .../swift5/resultLibrary/docs/ArrayTest.md | 12 + .../resultLibrary/docs/Capitalization.md | 15 + .../petstore/swift5/resultLibrary/docs/Cat.md | 10 + .../swift5/resultLibrary/docs/CatAllOf.md | 10 + .../swift5/resultLibrary/docs/Category.md | 11 + .../swift5/resultLibrary/docs/ClassModel.md | 10 + .../swift5/resultLibrary/docs/Client.md | 10 + .../petstore/swift5/resultLibrary/docs/Dog.md | 10 + .../swift5/resultLibrary/docs/DogAllOf.md | 10 + .../swift5/resultLibrary/docs/EnumArrays.md | 11 + .../swift5/resultLibrary/docs/EnumClass.md | 9 + .../swift5/resultLibrary/docs/EnumTest.md | 14 + .../swift5/resultLibrary/docs/FakeAPI.md | 662 ++++++++++ .../docs/FakeClassnameTags123API.md | 59 + .../swift5/resultLibrary/docs/File.md | 10 + .../resultLibrary/docs/FileSchemaTestClass.md | 11 + .../swift5/resultLibrary/docs/FormatTest.md | 22 + .../resultLibrary/docs/HasOnlyReadOnly.md | 11 + .../swift5/resultLibrary/docs/List.md | 10 + .../swift5/resultLibrary/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../resultLibrary/docs/Model200Response.md | 11 + .../swift5/resultLibrary/docs/Name.md | 13 + .../swift5/resultLibrary/docs/NumberOnly.md | 10 + .../swift5/resultLibrary/docs/Order.md | 15 + .../resultLibrary/docs/OuterComposite.md | 12 + .../swift5/resultLibrary/docs/OuterEnum.md | 9 + .../petstore/swift5/resultLibrary/docs/Pet.md | 15 + .../swift5/resultLibrary/docs/PetAPI.md | 469 ++++++++ .../resultLibrary/docs/ReadOnlyFirst.md | 11 + .../swift5/resultLibrary/docs/Return.md | 10 + .../resultLibrary/docs/SpecialModelName.md | 10 + .../swift5/resultLibrary/docs/StoreAPI.md | 206 ++++ .../resultLibrary/docs/StringBooleanMap.md | 9 + .../petstore/swift5/resultLibrary/docs/Tag.md | 11 + .../resultLibrary/docs/TypeHolderDefault.md | 14 + .../resultLibrary/docs/TypeHolderExample.md | 14 + .../swift5/resultLibrary/docs/User.md | 17 + .../swift5/resultLibrary/docs/UserAPI.md | 406 +++++++ .../petstore/swift5/resultLibrary/git_push.sh | 58 + .../petstore/swift5/resultLibrary/pom.xml | 43 + .../petstore/swift5/resultLibrary/project.yml | 14 + .../swift5/resultLibrary/run_spmbuild.sh | 3 + .../petstore/swift5/rxswiftLibrary/.gitignore | 63 + .../rxswiftLibrary/.openapi-generator-ignore | 23 + .../rxswiftLibrary/.openapi-generator/VERSION | 1 + .../petstore/swift5/rxswiftLibrary/Cartfile | 2 + .../petstore/swift5/rxswiftLibrary/Info.plist | 22 + .../swift5/rxswiftLibrary/Package.resolved | 16 + .../swift5/rxswiftLibrary/Package.swift | 32 + .../rxswiftLibrary/PetstoreClient.podspec | 15 + .../PetstoreClient.xcodeproj/project.pbxproj | 584 +++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/PetstoreClient.xcscheme | 99 ++ .../Classes/OpenAPIs/APIHelper.swift | 70 ++ .../Classes/OpenAPIs/APIs.swift | 64 + .../OpenAPIs/APIs/AnotherFakeAPI.swift | 53 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 668 ++++++++++ .../APIs/FakeClassnameTags123API.swift | 56 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 468 ++++++++ .../Classes/OpenAPIs/APIs/StoreAPI.swift | 182 +++ .../Classes/OpenAPIs/APIs/UserAPI.swift | 351 ++++++ .../Classes/OpenAPIs/CodableHelper.swift | 48 + .../Classes/OpenAPIs/Configuration.swift | 16 + .../Classes/OpenAPIs/Extensions.swift | 173 +++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 + .../Classes/OpenAPIs/Models.swift | 51 + .../Models/AdditionalPropertiesClass.swift | 25 + .../Classes/OpenAPIs/Models/Animal.swift | 20 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 10 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 22 + .../Models/ArrayOfArrayOfNumberOnly.swift | 22 + .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/ArrayTest.swift | 28 + .../OpenAPIs/Models/Capitalization.swift | 38 + .../Classes/OpenAPIs/Models/Cat.swift | 22 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 18 + .../Classes/OpenAPIs/Models/Category.swift | 20 + .../Classes/OpenAPIs/Models/ClassModel.swift | 19 + .../Classes/OpenAPIs/Models/Client.swift | 18 + .../Classes/OpenAPIs/Models/Dog.swift | 22 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 18 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 33 + .../Classes/OpenAPIs/Models/EnumClass.swift | 14 + .../Classes/OpenAPIs/Models/EnumTest.swift | 52 + .../Classes/OpenAPIs/Models/File.swift | 20 + .../OpenAPIs/Models/FileSchemaTestClass.swift | 20 + .../Classes/OpenAPIs/Models/FormatTest.swift | 42 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 20 + .../Classes/OpenAPIs/Models/List.swift | 22 + .../Classes/OpenAPIs/Models/MapTest.swift | 35 + ...opertiesAndAdditionalPropertiesClass.swift | 22 + .../OpenAPIs/Models/Model200Response.swift | 26 + .../Classes/OpenAPIs/Models/Name.swift | 32 + .../Classes/OpenAPIs/Models/NumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/Order.swift | 34 + .../OpenAPIs/Models/OuterComposite.swift | 28 + .../Classes/OpenAPIs/Models/OuterEnum.swift | 14 + .../Classes/OpenAPIs/Models/Pet.swift | 34 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 20 + .../Classes/OpenAPIs/Models/Return.swift | 23 + .../OpenAPIs/Models/SpecialModelName.swift | 22 + .../OpenAPIs/Models/StringBooleanMap.swift | 45 + .../Classes/OpenAPIs/Models/Tag.swift | 20 + .../OpenAPIs/Models/TypeHolderDefault.swift | 34 + .../OpenAPIs/Models/TypeHolderExample.swift | 34 + .../Classes/OpenAPIs/Models/User.swift | 33 + .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 + .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../OpenAPIs/URLSessionImplementations.swift | 544 +++++++++ .../petstore/swift5/rxswiftLibrary/README.md | 141 +++ .../SwaggerClientTests/.gitignore | 72 ++ .../rxswiftLibrary/SwaggerClientTests/Podfile | 13 + .../SwaggerClientTests/Podfile.lock | 23 + .../SwaggerClient.xcodeproj/project.pbxproj | 551 +++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/SwaggerClient.xcscheme | 97 ++ .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../SwaggerClient/AppDelegate.swift | 43 + .../AppIcon.appiconset/Contents.json | 48 + .../Base.lproj/LaunchScreen.storyboard | 27 + .../SwaggerClient/Base.lproj/Main.storyboard | 25 + .../SwaggerClient/Info.plist | 58 + .../SwaggerClient/ViewController.swift | 23 + .../SwaggerClientTests/APIHelperTests.swift | 55 + .../SwaggerClientTests/Info.plist | 35 + .../SwaggerClientTests/PetAPITests.swift | 88 ++ .../SwaggerClientTests/StoreAPITests.swift | 93 ++ .../SwaggerClientTests/UserAPITests.swift | 125 ++ .../rxswiftLibrary/SwaggerClientTests/pom.xml | 43 + .../SwaggerClientTests/run_xcodebuild.sh | 5 + .../docs/AdditionalPropertiesClass.md | 11 + .../swift5/rxswiftLibrary/docs/Animal.md | 11 + .../swift5/rxswiftLibrary/docs/AnimalFarm.md | 9 + .../rxswiftLibrary/docs/AnotherFakeAPI.md | 49 + .../swift5/rxswiftLibrary/docs/ApiResponse.md | 12 + .../docs/ArrayOfArrayOfNumberOnly.md | 10 + .../rxswiftLibrary/docs/ArrayOfNumberOnly.md | 10 + .../swift5/rxswiftLibrary/docs/ArrayTest.md | 12 + .../rxswiftLibrary/docs/Capitalization.md | 15 + .../swift5/rxswiftLibrary/docs/Cat.md | 10 + .../swift5/rxswiftLibrary/docs/CatAllOf.md | 10 + .../swift5/rxswiftLibrary/docs/Category.md | 11 + .../swift5/rxswiftLibrary/docs/ClassModel.md | 10 + .../swift5/rxswiftLibrary/docs/Client.md | 10 + .../swift5/rxswiftLibrary/docs/Dog.md | 10 + .../swift5/rxswiftLibrary/docs/DogAllOf.md | 10 + .../swift5/rxswiftLibrary/docs/EnumArrays.md | 11 + .../swift5/rxswiftLibrary/docs/EnumClass.md | 9 + .../swift5/rxswiftLibrary/docs/EnumTest.md | 14 + .../swift5/rxswiftLibrary/docs/FakeAPI.md | 548 +++++++++ .../docs/FakeClassnameTags123API.md | 49 + .../swift5/rxswiftLibrary/docs/File.md | 10 + .../docs/FileSchemaTestClass.md | 11 + .../swift5/rxswiftLibrary/docs/FormatTest.md | 22 + .../rxswiftLibrary/docs/HasOnlyReadOnly.md | 11 + .../swift5/rxswiftLibrary/docs/List.md | 10 + .../swift5/rxswiftLibrary/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../rxswiftLibrary/docs/Model200Response.md | 11 + .../swift5/rxswiftLibrary/docs/Name.md | 13 + .../swift5/rxswiftLibrary/docs/NumberOnly.md | 10 + .../swift5/rxswiftLibrary/docs/Order.md | 15 + .../rxswiftLibrary/docs/OuterComposite.md | 12 + .../swift5/rxswiftLibrary/docs/OuterEnum.md | 9 + .../swift5/rxswiftLibrary/docs/Pet.md | 15 + .../swift5/rxswiftLibrary/docs/PetAPI.md | 379 ++++++ .../rxswiftLibrary/docs/ReadOnlyFirst.md | 11 + .../swift5/rxswiftLibrary/docs/Return.md | 10 + .../rxswiftLibrary/docs/SpecialModelName.md | 10 + .../swift5/rxswiftLibrary/docs/StoreAPI.md | 166 +++ .../rxswiftLibrary/docs/StringBooleanMap.md | 9 + .../swift5/rxswiftLibrary/docs/Tag.md | 11 + .../rxswiftLibrary/docs/TypeHolderDefault.md | 14 + .../rxswiftLibrary/docs/TypeHolderExample.md | 14 + .../swift5/rxswiftLibrary/docs/User.md | 17 + .../swift5/rxswiftLibrary/docs/UserAPI.md | 326 +++++ .../swift5/rxswiftLibrary/git_push.sh | 58 + .../petstore/swift5/rxswiftLibrary/pom.xml | 43 + .../swift5/rxswiftLibrary/project.yml | 15 + .../swift5/rxswiftLibrary/run_spmbuild.sh | 3 + .../client/petstore/swift5/swift5_test_all.sh | 24 + .../swift5/urlsessionLibrary/.gitignore | 63 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/VERSION | 1 + .../swift5/urlsessionLibrary/Cartfile | 1 + .../swift5/urlsessionLibrary/Info.plist | 22 + .../swift5/urlsessionLibrary/Package.swift | 31 + .../urlsessionLibrary/PetstoreClient.podspec | 14 + .../PetstoreClient.xcodeproj/project.pbxproj | 536 +++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/PetstoreClient.xcscheme | 99 ++ .../Classes/OpenAPIs/APIHelper.swift | 70 ++ .../Classes/OpenAPIs/APIs.swift | 64 + .../OpenAPIs/APIs/AnotherFakeAPI.swift | 48 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 619 ++++++++++ .../APIs/FakeClassnameTags123API.swift | 51 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 431 +++++++ .../Classes/OpenAPIs/APIs/StoreAPI.swift | 165 +++ .../Classes/OpenAPIs/APIs/UserAPI.swift | 318 +++++ .../Classes/OpenAPIs/CodableHelper.swift | 48 + .../Classes/OpenAPIs/Configuration.swift | 16 + .../Classes/OpenAPIs/Extensions.swift | 173 +++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 + .../Classes/OpenAPIs/Models.swift | 51 + .../Models/AdditionalPropertiesClass.swift | 25 + .../Classes/OpenAPIs/Models/Animal.swift | 20 + .../Classes/OpenAPIs/Models/AnimalFarm.swift | 10 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 22 + .../Models/ArrayOfArrayOfNumberOnly.swift | 22 + .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/ArrayTest.swift | 28 + .../OpenAPIs/Models/Capitalization.swift | 38 + .../Classes/OpenAPIs/Models/Cat.swift | 22 + .../Classes/OpenAPIs/Models/CatAllOf.swift | 18 + .../Classes/OpenAPIs/Models/Category.swift | 20 + .../Classes/OpenAPIs/Models/ClassModel.swift | 19 + .../Classes/OpenAPIs/Models/Client.swift | 18 + .../Classes/OpenAPIs/Models/Dog.swift | 22 + .../Classes/OpenAPIs/Models/DogAllOf.swift | 18 + .../Classes/OpenAPIs/Models/EnumArrays.swift | 33 + .../Classes/OpenAPIs/Models/EnumClass.swift | 14 + .../Classes/OpenAPIs/Models/EnumTest.swift | 52 + .../Classes/OpenAPIs/Models/File.swift | 20 + .../OpenAPIs/Models/FileSchemaTestClass.swift | 20 + .../Classes/OpenAPIs/Models/FormatTest.swift | 42 + .../OpenAPIs/Models/HasOnlyReadOnly.swift | 20 + .../Classes/OpenAPIs/Models/List.swift | 22 + .../Classes/OpenAPIs/Models/MapTest.swift | 35 + ...opertiesAndAdditionalPropertiesClass.swift | 22 + .../OpenAPIs/Models/Model200Response.swift | 26 + .../Classes/OpenAPIs/Models/Name.swift | 32 + .../Classes/OpenAPIs/Models/NumberOnly.swift | 22 + .../Classes/OpenAPIs/Models/Order.swift | 34 + .../OpenAPIs/Models/OuterComposite.swift | 28 + .../Classes/OpenAPIs/Models/OuterEnum.swift | 14 + .../Classes/OpenAPIs/Models/Pet.swift | 34 + .../OpenAPIs/Models/ReadOnlyFirst.swift | 20 + .../Classes/OpenAPIs/Models/Return.swift | 23 + .../OpenAPIs/Models/SpecialModelName.swift | 22 + .../OpenAPIs/Models/StringBooleanMap.swift | 45 + .../Classes/OpenAPIs/Models/Tag.swift | 20 + .../OpenAPIs/Models/TypeHolderDefault.swift | 34 + .../OpenAPIs/Models/TypeHolderExample.swift | 34 + .../Classes/OpenAPIs/Models/User.swift | 33 + .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 + .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../OpenAPIs/URLSessionImplementations.swift | 544 +++++++++ .../swift5/urlsessionLibrary/README.md | 141 +++ .../SwaggerClientTests/.gitignore | 72 ++ .../SwaggerClientTests/Podfile | 13 + .../SwaggerClientTests/Podfile.lock | 16 + .../SwaggerClient.xcodeproj/project.pbxproj | 554 +++++++++ .../xcschemes/SwaggerClient.xcscheme | 97 ++ .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../SwaggerClient/AppDelegate.swift | 43 + .../AppIcon.appiconset/Contents.json | 93 ++ .../Base.lproj/LaunchScreen.storyboard | 27 + .../SwaggerClient/Base.lproj/Main.storyboard | 25 + .../SwaggerClient/Info.plist | 59 + .../SwaggerClient/ViewController.swift | 23 + .../SwaggerClientTests/DateFormatTests.swift | 114 ++ .../SwaggerClientTests/Info.plist | 36 + .../SwaggerClientTests/PetAPITests.swift | 80 ++ .../SwaggerClientTests/StoreAPITests.swift | 120 ++ .../SwaggerClientTests/UserAPITests.swift | 67 ++ .../SwaggerClientTests/pom.xml | 43 + .../SwaggerClientTests/run_xcodebuild.sh | 5 + .../docs/AdditionalPropertiesClass.md | 11 + .../swift5/urlsessionLibrary/docs/Animal.md | 11 + .../urlsessionLibrary/docs/AnimalFarm.md | 9 + .../urlsessionLibrary/docs/AnotherFakeAPI.md | 59 + .../urlsessionLibrary/docs/ApiResponse.md | 12 + .../docs/ArrayOfArrayOfNumberOnly.md | 10 + .../docs/ArrayOfNumberOnly.md | 10 + .../urlsessionLibrary/docs/ArrayTest.md | 12 + .../urlsessionLibrary/docs/Capitalization.md | 15 + .../swift5/urlsessionLibrary/docs/Cat.md | 10 + .../swift5/urlsessionLibrary/docs/CatAllOf.md | 10 + .../swift5/urlsessionLibrary/docs/Category.md | 11 + .../urlsessionLibrary/docs/ClassModel.md | 10 + .../swift5/urlsessionLibrary/docs/Client.md | 10 + .../swift5/urlsessionLibrary/docs/Dog.md | 10 + .../swift5/urlsessionLibrary/docs/DogAllOf.md | 10 + .../urlsessionLibrary/docs/EnumArrays.md | 11 + .../urlsessionLibrary/docs/EnumClass.md | 9 + .../swift5/urlsessionLibrary/docs/EnumTest.md | 14 + .../swift5/urlsessionLibrary/docs/FakeAPI.md | 662 ++++++++++ .../docs/FakeClassnameTags123API.md | 59 + .../swift5/urlsessionLibrary/docs/File.md | 10 + .../docs/FileSchemaTestClass.md | 11 + .../urlsessionLibrary/docs/FormatTest.md | 22 + .../urlsessionLibrary/docs/HasOnlyReadOnly.md | 11 + .../swift5/urlsessionLibrary/docs/List.md | 10 + .../swift5/urlsessionLibrary/docs/MapTest.md | 13 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + .../docs/Model200Response.md | 11 + .../swift5/urlsessionLibrary/docs/Name.md | 13 + .../urlsessionLibrary/docs/NumberOnly.md | 10 + .../swift5/urlsessionLibrary/docs/Order.md | 15 + .../urlsessionLibrary/docs/OuterComposite.md | 12 + .../urlsessionLibrary/docs/OuterEnum.md | 9 + .../swift5/urlsessionLibrary/docs/Pet.md | 15 + .../swift5/urlsessionLibrary/docs/PetAPI.md | 469 ++++++++ .../urlsessionLibrary/docs/ReadOnlyFirst.md | 11 + .../swift5/urlsessionLibrary/docs/Return.md | 10 + .../docs/SpecialModelName.md | 10 + .../swift5/urlsessionLibrary/docs/StoreAPI.md | 206 ++++ .../docs/StringBooleanMap.md | 9 + .../swift5/urlsessionLibrary/docs/Tag.md | 11 + .../docs/TypeHolderDefault.md | 14 + .../docs/TypeHolderExample.md | 14 + .../swift5/urlsessionLibrary/docs/User.md | 17 + .../swift5/urlsessionLibrary/docs/UserAPI.md | 406 +++++++ .../swift5/urlsessionLibrary/git_push.sh | 58 + .../petstore/swift5/urlsessionLibrary/pom.xml | 43 + .../swift5/urlsessionLibrary/project.yml | 14 + .../swift5/urlsessionLibrary/run_spmbuild.sh | 3 + samples/client/test/swift5/default/.gitignore | 63 + .../swift5/default/.openapi-generator-ignore | 23 + .../swift5/default/.openapi-generator/VERSION | 1 + .../contents.xcworkspacedata | 7 + samples/client/test/swift5/default/Cartfile | 1 + samples/client/test/swift5/default/Info.plist | 22 + .../client/test/swift5/default/Package.swift | 31 + samples/client/test/swift5/default/README.md | 63 + .../test/swift5/default/TestClient.podspec | 14 + .../TestClient.xcodeproj/project.pbxproj | 432 +++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcschemes/TestClient.xcscheme | 99 ++ .../Classes/OpenAPIs/APIHelper.swift | 70 ++ .../TestClient/Classes/OpenAPIs/APIs.swift | 64 + .../Classes/OpenAPIs/APIs/Swift5TestAPI.swift | 51 + .../Classes/OpenAPIs/CodableHelper.swift | 48 + .../Classes/OpenAPIs/Configuration.swift | 16 + .../Classes/OpenAPIs/Extensions.swift | 173 +++ .../Classes/OpenAPIs/JSONDataEncoding.swift | 53 + .../Classes/OpenAPIs/JSONEncodingHelper.swift | 45 + .../TestClient/Classes/OpenAPIs/Models.swift | 51 + .../OpenAPIs/Models/AllPrimitives.swift | 72 ++ .../Classes/OpenAPIs/Models/BaseCard.swift | 19 + .../Classes/OpenAPIs/Models/ErrorInfo.swift | 23 + .../OpenAPIs/Models/GetAllModelsResult.swift | 23 + .../OpenAPIs/Models/ModelDoubleArray.swift | 11 + .../OpenAPIs/Models/ModelErrorInfoArray.swift | 11 + .../OpenAPIs/Models/ModelStringArray.swift | 11 + ...ModelWithIntAdditionalPropertiesOnly.swift | 46 + ...ithPropertiesAndAdditionalProperties.swift | 89 ++ ...elWithStringAdditionalPropertiesOnly.swift | 46 + .../Classes/OpenAPIs/Models/PersonCard.swift | 23 + .../OpenAPIs/Models/PersonCardAllOf.swift | 20 + .../Classes/OpenAPIs/Models/PlaceCard.swift | 23 + .../OpenAPIs/Models/PlaceCardAllOf.swift | 20 + .../Classes/OpenAPIs/Models/SampleBase.swift | 21 + .../OpenAPIs/Models/SampleSubClass.swift | 25 + .../OpenAPIs/Models/SampleSubClassAllOf.swift | 20 + .../Classes/OpenAPIs/Models/StringEnum.swift | 14 + .../OpenAPIs/Models/VariableNameTest.swift | 32 + .../OpenAPIs/OpenISO8601DateFormatter.swift | 44 + .../OpenAPIs/SynchronizedDictionary.swift | 36 + .../OpenAPIs/URLSessionImplementations.swift | 544 +++++++++ .../test/swift5/default/TestClientApp/Podfile | 13 + .../swift5/default/TestClientApp/Podfile.lock | 16 + .../Local Podspecs/TestClient.podspec.json | 19 + .../default/TestClientApp/Pods/Manifest.lock | 16 + .../Pods/Pods.xcodeproj/project.pbxproj | 946 +++++++++++++++ .../Pods-TestClientApp-Info.plist | 26 + ...ds-TestClientApp-acknowledgements.markdown | 3 + .../Pods-TestClientApp-acknowledgements.plist | 29 + .../Pods-TestClientApp-dummy.m | 5 + .../Pods-TestClientApp-frameworks.sh | 171 +++ .../Pods-TestClientApp-umbrella.h | 16 + .../Pods-TestClientApp.debug.xcconfig | 12 + .../Pods-TestClientApp.modulemap | 6 + .../Pods-TestClientApp.release.xcconfig | 12 + .../Pods-TestClientAppTests-Info.plist | 26 + ...stClientAppTests-acknowledgements.markdown | 3 + ...-TestClientAppTests-acknowledgements.plist | 29 + .../Pods-TestClientAppTests-dummy.m | 5 + .../Pods-TestClientAppTests-umbrella.h | 16 + .../Pods-TestClientAppTests.debug.xcconfig | 9 + .../Pods-TestClientAppTests.modulemap | 6 + .../Pods-TestClientAppTests.release.xcconfig | 9 + .../TestClient/TestClient-Info.plist | 26 + .../TestClient/TestClient-dummy.m | 5 + .../TestClient/TestClient-prefix.pch | 12 + .../TestClient/TestClient-umbrella.h | 16 + .../TestClient/TestClient.modulemap | 6 + .../TestClient/TestClient.xcconfig | 10 + .../TestClientApp.xcodeproj/project.pbxproj | 546 +++++++++ .../contents.xcworkspacedata | 7 + .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../TestClientApp/AppDelegate.swift | 43 + .../AppIcon.appiconset/Contents.json | 93 ++ .../Base.lproj/LaunchScreen.storyboard | 25 + .../TestClientApp/Base.lproj/Main.storyboard | 24 + .../TestClientApp/TestClientApp/Info.plist | 45 + .../TestClientApp/ViewController.swift | 23 + .../TestClientAppTests/Info.plist | 22 + .../TestClientAppTests.swift | 35 + .../test/swift5/default/TestClientApp/pom.xml | 43 + .../default/TestClientApp/run_xcodebuild.sh | 5 + .../test/swift5/default/docs/AllPrimitives.md | 34 + .../test/swift5/default/docs/BaseCard.md | 10 + .../test/swift5/default/docs/ErrorInfo.md | 12 + .../swift5/default/docs/GetAllModelsResult.md | 12 + .../swift5/default/docs/ModelDoubleArray.md | 9 + .../default/docs/ModelErrorInfoArray.md | 9 + .../swift5/default/docs/ModelStringArray.md | 9 + .../ModelWithIntAdditionalPropertiesOnly.md | 9 + ...elWithPropertiesAndAdditionalProperties.md | 17 + ...ModelWithStringAdditionalPropertiesOnly.md | 9 + .../test/swift5/default/docs/PersonCard.md | 11 + .../swift5/default/docs/PersonCardAllOf.md | 11 + .../test/swift5/default/docs/PlaceCard.md | 11 + .../swift5/default/docs/PlaceCardAllOf.md | 11 + .../test/swift5/default/docs/SampleBase.md | 11 + .../swift5/default/docs/SampleSubClass.md | 13 + .../default/docs/SampleSubClassAllOf.md | 11 + .../test/swift5/default/docs/StringEnum.md | 9 + .../test/swift5/default/docs/Swift5TestAPI.md | 59 + .../swift5/default/docs/VariableNameTest.md | 12 + .../client/test/swift5/default/git_push.sh | 58 + samples/client/test/swift5/default/pom.xml | 43 + .../client/test/swift5/default/project.yml | 14 + .../test/swift5/default/run_spmbuild.sh | 3 + samples/client/test/swift5/swift5_test_all.sh | 11 + 1448 files changed, 84540 insertions(+), 781 deletions(-) create mode 100755 bin/swift5-all.sh create mode 100644 bin/swift5-petstore-alamofire.json create mode 100755 bin/swift5-petstore-alamofire.sh create mode 100755 bin/swift5-petstore-all.sh create mode 100644 bin/swift5-petstore-combine.json create mode 100755 bin/swift5-petstore-combine.sh create mode 100644 bin/swift5-petstore-nonPublicApi.json create mode 100755 bin/swift5-petstore-nonPublicApi.sh create mode 100644 bin/swift5-petstore-objcCompatible.json create mode 100755 bin/swift5-petstore-objcCompatible.sh create mode 100644 bin/swift5-petstore-promisekit.json create mode 100755 bin/swift5-petstore-promisekit.sh create mode 100644 bin/swift5-petstore-result.json create mode 100755 bin/swift5-petstore-result.sh create mode 100644 bin/swift5-petstore-rxswift.json create mode 100755 bin/swift5-petstore-rxswift.sh create mode 100644 bin/swift5-petstore-urlsession.json create mode 100755 bin/swift5-petstore-urlsession.sh create mode 100644 bin/swift5-petstore.json create mode 100755 bin/swift5-petstore.sh create mode 100644 bin/swift5-test.json create mode 100755 bin/swift5-test.sh create mode 100755 bin/windows/swift5-all.bat create mode 100755 bin/windows/swift5-petstore-alamofire.bat create mode 100755 bin/windows/swift5-petstore-all.bat create mode 100755 bin/windows/swift5-petstore-combine.bat create mode 100755 bin/windows/swift5-petstore-nonPublicApi.bat create mode 100755 bin/windows/swift5-petstore-objcCompatible.bat create mode 100755 bin/windows/swift5-petstore-promisekit.bat create mode 100755 bin/windows/swift5-petstore-result.bat create mode 100755 bin/windows/swift5-petstore-rxswift.bat create mode 100755 bin/windows/swift5-petstore-urlSession.bat create mode 100755 bin/windows/swift5-petstore.bat create mode 100755 bin/windows/swift5-test.bat create mode 100644 docs/generators/swift5.md create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5Codegen.java create mode 100644 modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/APIs.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/CodableHelper.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/Configuration.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/Extensions.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/JSONEncodingHelper.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/Models.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/OpenISO8601DateFormatter.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/Podspec.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/README.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/SynchronizedDictionary.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/_param.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/api.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/api_doc.mustache create mode 100755 modules/openapi-generator/src/main/resources/swift5/git_push.sh.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/gitignore.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/model.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/modelArray.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/modelEnum.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/modelInlineEnumDeclaration.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/modelObject.mustache create mode 100644 modules/openapi-generator/src/main/resources/swift5/model_doc.mustache create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5CodegenTest.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelTest.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java create mode 100644 modules/openapi-generator/src/test/resources/2_0/swift5Test.json create mode 100644 samples/client/petstore/swift5/.gitignore create mode 100644 samples/client/petstore/swift5/alamofireLibrary/.gitignore rename samples/client/petstore/{swift-promisekit => swift5/alamofireLibrary}/.openapi-generator-ignore (78%) create mode 100644 samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION create mode 100644 samples/client/petstore/swift5/alamofireLibrary/Cartfile create mode 100644 samples/client/petstore/swift5/alamofireLibrary/Info.plist create mode 100644 samples/client/petstore/swift5/alamofireLibrary/Package.resolved create mode 100644 samples/client/petstore/swift5/alamofireLibrary/Package.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/README.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/.gitignore create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile.lock create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Info.plist create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift create mode 100644 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/pom.xml create mode 100755 samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/run_xcodebuild.sh create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Animal.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/AnimalFarm.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/AnotherFakeAPI.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/ApiResponse.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/ArrayTest.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Capitalization.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Cat.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/CatAllOf.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Category.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/ClassModel.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Client.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Dog.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/DogAllOf.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/EnumArrays.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/EnumClass.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/EnumTest.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/FakeClassnameTags123API.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/File.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/FormatTest.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/List.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/MapTest.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Model200Response.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Name.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/NumberOnly.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Order.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/OuterComposite.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/OuterEnum.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Pet.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Return.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/SpecialModelName.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/Tag.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/TypeHolderDefault.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/TypeHolderExample.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/User.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/docs/UserAPI.md create mode 100644 samples/client/petstore/swift5/alamofireLibrary/git_push.sh create mode 100644 samples/client/petstore/swift5/alamofireLibrary/pom.xml create mode 100644 samples/client/petstore/swift5/alamofireLibrary/project.yml create mode 100755 samples/client/petstore/swift5/alamofireLibrary/run_spmbuild.sh create mode 100644 samples/client/petstore/swift5/combineLibrary/.gitignore create mode 100644 samples/client/petstore/swift5/combineLibrary/.openapi-generator-ignore create mode 100644 samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION create mode 100644 samples/client/petstore/swift5/combineLibrary/Cartfile create mode 100644 samples/client/petstore/swift5/combineLibrary/Info.plist create mode 100644 samples/client/petstore/swift5/combineLibrary/Package.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient.podspec create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/README.md create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/.gitignore create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/Podfile create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/Podfile.lock create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Info.plist create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift create mode 100644 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/pom.xml create mode 100755 samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/run_xcodebuild.sh create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Animal.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/AnimalFarm.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/AnotherFakeAPI.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/ApiResponse.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/ArrayTest.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Capitalization.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Cat.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/CatAllOf.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Category.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/ClassModel.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Client.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Dog.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/DogAllOf.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/EnumArrays.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/EnumClass.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/EnumTest.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/FakeClassnameTags123API.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/File.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/FormatTest.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/List.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/MapTest.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Model200Response.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Name.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/NumberOnly.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Order.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/OuterComposite.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/OuterEnum.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Pet.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Return.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/SpecialModelName.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/Tag.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/TypeHolderDefault.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/TypeHolderExample.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/User.md create mode 100644 samples/client/petstore/swift5/combineLibrary/docs/UserAPI.md create mode 100644 samples/client/petstore/swift5/combineLibrary/git_push.sh create mode 100644 samples/client/petstore/swift5/combineLibrary/pom.xml create mode 100644 samples/client/petstore/swift5/combineLibrary/project.yml create mode 100755 samples/client/petstore/swift5/combineLibrary/run_spmbuild.sh create mode 100644 samples/client/petstore/swift5/default/.gitignore create mode 100644 samples/client/petstore/swift5/default/.openapi-generator-ignore create mode 100644 samples/client/petstore/swift5/default/.openapi-generator/VERSION create mode 100644 samples/client/petstore/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/default/Cartfile create mode 100644 samples/client/petstore/swift5/default/Info.plist create mode 100644 samples/client/petstore/swift5/default/Package.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient.podspec create mode 100644 samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift create mode 100644 samples/client/petstore/swift5/default/README.md create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/.gitignore create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/Podfile create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/Podfile.lock create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Info.plist create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/ViewController.swift create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/Info.plist create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift create mode 100644 samples/client/petstore/swift5/default/SwaggerClientTests/pom.xml create mode 100755 samples/client/petstore/swift5/default/SwaggerClientTests/run_xcodebuild.sh create mode 100644 samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/default/docs/Animal.md create mode 100644 samples/client/petstore/swift5/default/docs/AnimalFarm.md create mode 100644 samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md create mode 100644 samples/client/petstore/swift5/default/docs/ApiResponse.md create mode 100644 samples/client/petstore/swift5/default/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/default/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/default/docs/ArrayTest.md create mode 100644 samples/client/petstore/swift5/default/docs/Capitalization.md create mode 100644 samples/client/petstore/swift5/default/docs/Cat.md create mode 100644 samples/client/petstore/swift5/default/docs/CatAllOf.md create mode 100644 samples/client/petstore/swift5/default/docs/Category.md create mode 100644 samples/client/petstore/swift5/default/docs/ClassModel.md create mode 100644 samples/client/petstore/swift5/default/docs/Client.md create mode 100644 samples/client/petstore/swift5/default/docs/Dog.md create mode 100644 samples/client/petstore/swift5/default/docs/DogAllOf.md create mode 100644 samples/client/petstore/swift5/default/docs/EnumArrays.md create mode 100644 samples/client/petstore/swift5/default/docs/EnumClass.md create mode 100644 samples/client/petstore/swift5/default/docs/EnumTest.md create mode 100644 samples/client/petstore/swift5/default/docs/FakeAPI.md create mode 100644 samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md create mode 100644 samples/client/petstore/swift5/default/docs/File.md create mode 100644 samples/client/petstore/swift5/default/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/swift5/default/docs/FormatTest.md create mode 100644 samples/client/petstore/swift5/default/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/swift5/default/docs/List.md create mode 100644 samples/client/petstore/swift5/default/docs/MapTest.md create mode 100644 samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/default/docs/Model200Response.md create mode 100644 samples/client/petstore/swift5/default/docs/Name.md create mode 100644 samples/client/petstore/swift5/default/docs/NumberOnly.md create mode 100644 samples/client/petstore/swift5/default/docs/Order.md create mode 100644 samples/client/petstore/swift5/default/docs/OuterComposite.md create mode 100644 samples/client/petstore/swift5/default/docs/OuterEnum.md create mode 100644 samples/client/petstore/swift5/default/docs/Pet.md create mode 100644 samples/client/petstore/swift5/default/docs/PetAPI.md create mode 100644 samples/client/petstore/swift5/default/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/swift5/default/docs/Return.md create mode 100644 samples/client/petstore/swift5/default/docs/SpecialModelName.md create mode 100644 samples/client/petstore/swift5/default/docs/StoreAPI.md create mode 100644 samples/client/petstore/swift5/default/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/swift5/default/docs/Tag.md create mode 100644 samples/client/petstore/swift5/default/docs/TypeHolderDefault.md create mode 100644 samples/client/petstore/swift5/default/docs/TypeHolderExample.md create mode 100644 samples/client/petstore/swift5/default/docs/User.md create mode 100644 samples/client/petstore/swift5/default/docs/UserAPI.md create mode 100644 samples/client/petstore/swift5/default/git_push.sh create mode 100644 samples/client/petstore/swift5/default/pom.xml create mode 100644 samples/client/petstore/swift5/default/project.yml create mode 100755 samples/client/petstore/swift5/default/run_spmbuild.sh create mode 100644 samples/client/petstore/swift5/nonPublicApi/.gitignore create mode 100644 samples/client/petstore/swift5/nonPublicApi/.openapi-generator-ignore create mode 100644 samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION create mode 100644 samples/client/petstore/swift5/nonPublicApi/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/nonPublicApi/Cartfile create mode 100644 samples/client/petstore/swift5/nonPublicApi/Info.plist create mode 100644 samples/client/petstore/swift5/nonPublicApi/Package.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient.podspec create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift create mode 100644 samples/client/petstore/swift5/nonPublicApi/README.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Animal.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/AnimalFarm.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/AnotherFakeAPI.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/ApiResponse.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/ArrayTest.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Capitalization.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Cat.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/CatAllOf.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Category.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/ClassModel.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Client.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Dog.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/DogAllOf.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/EnumArrays.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/EnumClass.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/EnumTest.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/FakeClassnameTags123API.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/File.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/FormatTest.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/List.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/MapTest.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Model200Response.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Name.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/NumberOnly.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Order.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/OuterComposite.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/OuterEnum.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Pet.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Return.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/SpecialModelName.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/Tag.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/TypeHolderDefault.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/TypeHolderExample.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/User.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/docs/UserAPI.md create mode 100644 samples/client/petstore/swift5/nonPublicApi/git_push.sh create mode 100644 samples/client/petstore/swift5/nonPublicApi/pom.xml create mode 100644 samples/client/petstore/swift5/nonPublicApi/project.yml create mode 100755 samples/client/petstore/swift5/nonPublicApi/run_spmbuild.sh create mode 100644 samples/client/petstore/swift5/objcCompatible/.gitignore create mode 100644 samples/client/petstore/swift5/objcCompatible/.openapi-generator-ignore create mode 100644 samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION create mode 100644 samples/client/petstore/swift5/objcCompatible/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/objcCompatible/Cartfile create mode 100644 samples/client/petstore/swift5/objcCompatible/Info.plist create mode 100644 samples/client/petstore/swift5/objcCompatible/Package.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient.podspec create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift create mode 100644 samples/client/petstore/swift5/objcCompatible/README.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Animal.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/AnimalFarm.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/AnotherFakeAPI.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/ApiResponse.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/ArrayTest.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Capitalization.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Cat.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/CatAllOf.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Category.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/ClassModel.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Client.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Dog.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/DogAllOf.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/EnumArrays.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/EnumClass.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/EnumTest.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/FakeClassnameTags123API.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/File.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/FormatTest.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/List.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/MapTest.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Model200Response.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Name.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/NumberOnly.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Order.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/OuterComposite.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/OuterEnum.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Pet.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Return.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/SpecialModelName.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/Tag.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/TypeHolderDefault.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/TypeHolderExample.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/User.md create mode 100644 samples/client/petstore/swift5/objcCompatible/docs/UserAPI.md create mode 100644 samples/client/petstore/swift5/objcCompatible/git_push.sh create mode 100644 samples/client/petstore/swift5/objcCompatible/pom.xml create mode 100644 samples/client/petstore/swift5/objcCompatible/project.yml create mode 100755 samples/client/petstore/swift5/objcCompatible/run_spmbuild.sh create mode 100644 samples/client/petstore/swift5/promisekitLibrary/.gitignore create mode 100644 samples/client/petstore/swift5/promisekitLibrary/.openapi-generator-ignore create mode 100644 samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION create mode 100644 samples/client/petstore/swift5/promisekitLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/promisekitLibrary/Cartfile create mode 100644 samples/client/petstore/swift5/promisekitLibrary/Info.plist create mode 100644 samples/client/petstore/swift5/promisekitLibrary/Package.resolved create mode 100644 samples/client/petstore/swift5/promisekitLibrary/Package.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/README.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/.gitignore create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile.lock create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Info.plist create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift create mode 100644 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/pom.xml create mode 100755 samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/run_xcodebuild.sh create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Animal.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/AnimalFarm.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/AnotherFakeAPI.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/ApiResponse.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/ArrayTest.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Capitalization.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Cat.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/CatAllOf.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Category.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/ClassModel.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Client.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Dog.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/DogAllOf.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/EnumArrays.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/EnumClass.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/EnumTest.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/FakeClassnameTags123API.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/File.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/FormatTest.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/List.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/MapTest.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Model200Response.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Name.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/NumberOnly.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Order.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/OuterComposite.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/OuterEnum.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Pet.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Return.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/SpecialModelName.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/Tag.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/TypeHolderDefault.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/TypeHolderExample.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/User.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/docs/UserAPI.md create mode 100644 samples/client/petstore/swift5/promisekitLibrary/git_push.sh create mode 100644 samples/client/petstore/swift5/promisekitLibrary/pom.xml create mode 100644 samples/client/petstore/swift5/promisekitLibrary/project.yml create mode 100755 samples/client/petstore/swift5/promisekitLibrary/run_spmbuild.sh create mode 100644 samples/client/petstore/swift5/resultLibrary/.gitignore create mode 100644 samples/client/petstore/swift5/resultLibrary/.openapi-generator-ignore create mode 100644 samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION create mode 100644 samples/client/petstore/swift5/resultLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/resultLibrary/Cartfile create mode 100644 samples/client/petstore/swift5/resultLibrary/Info.plist create mode 100644 samples/client/petstore/swift5/resultLibrary/Package.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient.podspec create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift create mode 100644 samples/client/petstore/swift5/resultLibrary/README.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Animal.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/AnimalFarm.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/AnotherFakeAPI.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/ApiResponse.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/ArrayTest.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Capitalization.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Cat.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/CatAllOf.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Category.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/ClassModel.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Client.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Dog.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/DogAllOf.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/EnumArrays.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/EnumClass.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/EnumTest.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/FakeClassnameTags123API.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/File.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/FormatTest.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/List.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/MapTest.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Model200Response.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Name.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/NumberOnly.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Order.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/OuterComposite.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/OuterEnum.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Pet.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Return.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/SpecialModelName.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/Tag.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/TypeHolderDefault.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/TypeHolderExample.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/User.md create mode 100644 samples/client/petstore/swift5/resultLibrary/docs/UserAPI.md create mode 100644 samples/client/petstore/swift5/resultLibrary/git_push.sh create mode 100644 samples/client/petstore/swift5/resultLibrary/pom.xml create mode 100644 samples/client/petstore/swift5/resultLibrary/project.yml create mode 100755 samples/client/petstore/swift5/resultLibrary/run_spmbuild.sh create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/.gitignore create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator-ignore create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/Cartfile create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/Info.plist create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/Package.resolved create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/Package.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/README.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/.gitignore create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile.lock create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Info.plist create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/pom.xml create mode 100755 samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/run_xcodebuild.sh create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Animal.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/AnimalFarm.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/AnotherFakeAPI.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/ApiResponse.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayTest.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Capitalization.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Cat.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/CatAllOf.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Category.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/ClassModel.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Client.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Dog.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/DogAllOf.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/EnumArrays.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/EnumClass.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/EnumTest.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/FakeClassnameTags123API.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/File.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/FormatTest.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/List.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/MapTest.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Model200Response.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Name.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/NumberOnly.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Order.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/OuterComposite.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/OuterEnum.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Pet.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Return.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/SpecialModelName.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/Tag.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/TypeHolderDefault.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/TypeHolderExample.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/User.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/docs/UserAPI.md create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/git_push.sh create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/pom.xml create mode 100644 samples/client/petstore/swift5/rxswiftLibrary/project.yml create mode 100755 samples/client/petstore/swift5/rxswiftLibrary/run_spmbuild.sh create mode 100755 samples/client/petstore/swift5/swift5_test_all.sh create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/.gitignore create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator-ignore create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/Cartfile create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/Info.plist create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/Package.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.podspec create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/README.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/.gitignore create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/Podfile create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/Podfile.lock create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Info.plist create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/pom.xml create mode 100755 samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/run_xcodebuild.sh create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Animal.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/AnimalFarm.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/AnotherFakeAPI.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/ApiResponse.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayTest.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Capitalization.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Cat.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/CatAllOf.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Category.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/ClassModel.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Client.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Dog.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/DogAllOf.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/EnumArrays.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/EnumClass.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/EnumTest.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/FakeClassnameTags123API.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/File.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/FileSchemaTestClass.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/FormatTest.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/List.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/MapTest.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Model200Response.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Name.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/NumberOnly.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Order.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/OuterComposite.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/OuterEnum.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Pet.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Return.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/SpecialModelName.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/StringBooleanMap.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/Tag.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/TypeHolderDefault.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/TypeHolderExample.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/User.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/docs/UserAPI.md create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/git_push.sh create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/pom.xml create mode 100644 samples/client/petstore/swift5/urlsessionLibrary/project.yml create mode 100755 samples/client/petstore/swift5/urlsessionLibrary/run_spmbuild.sh create mode 100644 samples/client/test/swift5/default/.gitignore create mode 100644 samples/client/test/swift5/default/.openapi-generator-ignore create mode 100644 samples/client/test/swift5/default/.openapi-generator/VERSION create mode 100644 samples/client/test/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/test/swift5/default/Cartfile create mode 100644 samples/client/test/swift5/default/Info.plist create mode 100644 samples/client/test/swift5/default/Package.swift create mode 100644 samples/client/test/swift5/default/README.md create mode 100644 samples/client/test/swift5/default/TestClient.podspec create mode 100644 samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj create mode 100644 samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 samples/client/test/swift5/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIHelper.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs/Swift5TestAPI.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/CodableHelper.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Configuration.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Extensions.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONDataEncoding.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/SynchronizedDictionary.swift create mode 100644 samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift create mode 100644 samples/client/test/swift5/default/TestClientApp/Podfile create mode 100644 samples/client/test/swift5/default/TestClientApp/Podfile.lock create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Local Podspecs/TestClient.podspec.json create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Manifest.lock create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Pods.xcodeproj/project.pbxproj create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-Info.plist create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-acknowledgements.markdown create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-acknowledgements.plist create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-dummy.m create mode 100755 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-umbrella.h create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.modulemap create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-Info.plist create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-acknowledgements.markdown create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-acknowledgements.plist create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-dummy.m create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-umbrella.h create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.modulemap create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-Info.plist create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-dummy.m create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-prefix.pch create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-umbrella.h create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.modulemap create mode 100644 samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.xcconfig create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/AppDelegate.swift create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/Info.plist create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientApp/ViewController.swift create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientAppTests/Info.plist create mode 100644 samples/client/test/swift5/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift create mode 100644 samples/client/test/swift5/default/TestClientApp/pom.xml create mode 100755 samples/client/test/swift5/default/TestClientApp/run_xcodebuild.sh create mode 100644 samples/client/test/swift5/default/docs/AllPrimitives.md create mode 100644 samples/client/test/swift5/default/docs/BaseCard.md create mode 100644 samples/client/test/swift5/default/docs/ErrorInfo.md create mode 100644 samples/client/test/swift5/default/docs/GetAllModelsResult.md create mode 100644 samples/client/test/swift5/default/docs/ModelDoubleArray.md create mode 100644 samples/client/test/swift5/default/docs/ModelErrorInfoArray.md create mode 100644 samples/client/test/swift5/default/docs/ModelStringArray.md create mode 100644 samples/client/test/swift5/default/docs/ModelWithIntAdditionalPropertiesOnly.md create mode 100644 samples/client/test/swift5/default/docs/ModelWithPropertiesAndAdditionalProperties.md create mode 100644 samples/client/test/swift5/default/docs/ModelWithStringAdditionalPropertiesOnly.md create mode 100644 samples/client/test/swift5/default/docs/PersonCard.md create mode 100644 samples/client/test/swift5/default/docs/PersonCardAllOf.md create mode 100644 samples/client/test/swift5/default/docs/PlaceCard.md create mode 100644 samples/client/test/swift5/default/docs/PlaceCardAllOf.md create mode 100644 samples/client/test/swift5/default/docs/SampleBase.md create mode 100644 samples/client/test/swift5/default/docs/SampleSubClass.md create mode 100644 samples/client/test/swift5/default/docs/SampleSubClassAllOf.md create mode 100644 samples/client/test/swift5/default/docs/StringEnum.md create mode 100644 samples/client/test/swift5/default/docs/Swift5TestAPI.md create mode 100644 samples/client/test/swift5/default/docs/VariableNameTest.md create mode 100644 samples/client/test/swift5/default/git_push.sh create mode 100644 samples/client/test/swift5/default/pom.xml create mode 100644 samples/client/test/swift5/default/project.yml create mode 100755 samples/client/test/swift5/default/run_spmbuild.sh create mode 100755 samples/client/test/swift5/swift5_test_all.sh diff --git a/CI/bitrise.yml b/CI/bitrise.yml index 8a572ab864..cfdb8601ec 100644 --- a/CI/bitrise.yml +++ b/CI/bitrise.yml @@ -49,6 +49,25 @@ workflows: ./samples/client/petstore/swift4/swift4_test_all.sh ./samples/client/test/swift4/swift4_test_all.sh + - script@1.1.5: + title: Update Swift5 samples + inputs: + - content: | + #!/usr/bin/env bash + + set -e + + sh bin/swift5-all.sh + - script@1.1.5: + title: Run Swift5 tests + inputs: + - content: | + #!/usr/bin/env bash + + set -e + + ./samples/client/petstore/swift5/swift5_test_all.sh + ./samples/client/test/swift5/swift5_test_all.sh - script@1.1.5: title: Run all bin scripts inputs: diff --git a/bin/swift5-all.sh b/bin/swift5-all.sh new file mode 100755 index 0000000000..0fabcabab4 --- /dev/null +++ b/bin/swift5-all.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +./bin/swift5-petstore-all.sh +./bin/swift5-test.sh diff --git a/bin/swift5-petstore-alamofire.json b/bin/swift5-petstore-alamofire.json new file mode 100644 index 0000000000..f6cc7270be --- /dev/null +++ b/bin/swift5-petstore-alamofire.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "library": "alamofire" +} diff --git a/bin/swift5-petstore-alamofire.sh b/bin/swift5-petstore-alamofire.sh new file mode 100755 index 0000000000..6c8ef2c5f8 --- /dev/null +++ b/bin/swift5-petstore-alamofire.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-alamofire.json -o samples/client/petstore/swift5/alamofireLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/alamofireLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/alamofireLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-all.sh b/bin/swift5-petstore-all.sh new file mode 100755 index 0000000000..bce216fcb4 --- /dev/null +++ b/bin/swift5-petstore-all.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +./bin/swift5-petstore.sh +./bin/swift5-petstore-promisekit.sh +./bin/swift5-petstore-result.sh +./bin/swift5-petstore-rxswift.sh +./bin/swift5-petstore-objcCompatible.sh +./bin/swift5-petstore-nonPublicApi.sh +./bin/swift5-petstore-urlsession.sh +./bin/swift5-petstore-alamofire.sh +./bin/swift5-petstore-combine.sh + \ No newline at end of file diff --git a/bin/swift5-petstore-combine.json b/bin/swift5-petstore-combine.json new file mode 100644 index 0000000000..ef420f56e2 --- /dev/null +++ b/bin/swift5-petstore-combine.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "responseAs": "Combine" +} diff --git a/bin/swift5-petstore-combine.sh b/bin/swift5-petstore-combine.sh new file mode 100755 index 0000000000..71ca667a9a --- /dev/null +++ b/bin/swift5-petstore-combine.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-combine.json -o samples/client/petstore/swift5/combineLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/combineLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/combineLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-nonPublicApi.json b/bin/swift5-petstore-nonPublicApi.json new file mode 100644 index 0000000000..f20305dec0 --- /dev/null +++ b/bin/swift5-petstore-nonPublicApi.json @@ -0,0 +1,8 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "nonPublicApi": true, + "sortParamsByRequiredFlag": false +} diff --git a/bin/swift5-petstore-nonPublicApi.sh b/bin/swift5-petstore-nonPublicApi.sh new file mode 100755 index 0000000000..fc4035bfca --- /dev/null +++ b/bin/swift5-petstore-nonPublicApi.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-nonPublicApi.json -o samples/client/petstore/swift5/nonPublicApi --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/nonPublicApi + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/nonPublicApi + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-objcCompatible.json b/bin/swift5-petstore-objcCompatible.json new file mode 100644 index 0000000000..c24c7abf69 --- /dev/null +++ b/bin/swift5-petstore-objcCompatible.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "objcCompatible": true +} diff --git a/bin/swift5-petstore-objcCompatible.sh b/bin/swift5-petstore-objcCompatible.sh new file mode 100755 index 0000000000..39d53ff8e6 --- /dev/null +++ b/bin/swift5-petstore-objcCompatible.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-objcCompatible.json -o samples/client/petstore/swift5/objcCompatible --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/objcCompatible + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/objcCompatible + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-promisekit.json b/bin/swift5-petstore-promisekit.json new file mode 100644 index 0000000000..48137f1f28 --- /dev/null +++ b/bin/swift5-petstore-promisekit.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "responseAs": "PromiseKit" +} diff --git a/bin/swift5-petstore-promisekit.sh b/bin/swift5-petstore-promisekit.sh new file mode 100755 index 0000000000..f864088e9b --- /dev/null +++ b/bin/swift5-petstore-promisekit.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-promisekit.json -o samples/client/petstore/swift5/promisekitLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/promisekitLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/promisekitLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-result.json b/bin/swift5-petstore-result.json new file mode 100644 index 0000000000..3154338678 --- /dev/null +++ b/bin/swift5-petstore-result.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "responseAs": "Result" +} diff --git a/bin/swift5-petstore-result.sh b/bin/swift5-petstore-result.sh new file mode 100755 index 0000000000..803c79a4f7 --- /dev/null +++ b/bin/swift5-petstore-result.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-result.json -o samples/client/petstore/swift5/resultLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/resultLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/resultLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-rxswift.json b/bin/swift5-petstore-rxswift.json new file mode 100644 index 0000000000..eb8b11dde5 --- /dev/null +++ b/bin/swift5-petstore-rxswift.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "responseAs": "RxSwift" +} diff --git a/bin/swift5-petstore-rxswift.sh b/bin/swift5-petstore-rxswift.sh new file mode 100755 index 0000000000..9c8398248e --- /dev/null +++ b/bin/swift5-petstore-rxswift.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-rxswift.json -o samples/client/petstore/swift5/rxswiftLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/rxswiftLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/rxswiftLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore-urlsession.json b/bin/swift5-petstore-urlsession.json new file mode 100644 index 0000000000..db0f6c9fbf --- /dev/null +++ b/bin/swift5-petstore-urlsession.json @@ -0,0 +1,7 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient", + "library": "urlsession" +} diff --git a/bin/swift5-petstore-urlsession.sh b/bin/swift5-petstore-urlsession.sh new file mode 100755 index 0000000000..76a674d431 --- /dev/null +++ b/bin/swift5-petstore-urlsession.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-urlsession.json -o samples/client/petstore/swift5/urlsessionLibrary --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/urlsessionLibrary + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/urlsessionLibrary + swiftlint autocorrect +fi \ No newline at end of file diff --git a/bin/swift5-petstore.json b/bin/swift5-petstore.json new file mode 100644 index 0000000000..59bd94f43e --- /dev/null +++ b/bin/swift5-petstore.json @@ -0,0 +1,6 @@ +{ + "podSummary": "PetstoreClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "PetstoreClient" +} diff --git a/bin/swift5-petstore.sh b/bin/swift5-petstore.sh new file mode 100755 index 0000000000..f2752acc1a --- /dev/null +++ b/bin/swift5-petstore.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore.json -o samples/client/petstore/swift5/default --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/default + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/petstore/swift5/default + swiftlint autocorrect +fi diff --git a/bin/swift5-test.json b/bin/swift5-test.json new file mode 100644 index 0000000000..9341b740a2 --- /dev/null +++ b/bin/swift5-test.json @@ -0,0 +1,6 @@ +{ + "podSummary": "TestClient", + "podHomepage": "https://github.com/openapitools/openapi-generator", + "podAuthors": "", + "projectName": "TestClient" +} diff --git a/bin/swift5-test.sh b/bin/swift5-test.sh new file mode 100755 index 0000000000..1620ea6e27 --- /dev/null +++ b/bin/swift5-test.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +SCRIPT="$0" +echo "# START SCRIPT: $SCRIPT" + +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +if [ ! -d "${APP_DIR}" ]; then + APP_DIR=`dirname "$SCRIPT"`/.. + APP_DIR=`cd "${APP_DIR}"; pwd` +fi + +executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +if [ ! -f "$executable" ] +then + mvn -B clean package +fi + +# if you've executed sbt assembly previously it will use that instead. +export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" +ags="generate -t modules/openapi-generator/src/main/resources/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift5Test.json -g swift5 -c ./bin/swift5-test.json -o samples/client/test/swift5/default --generate-alias-as-model $@" + +java $JAVA_OPTS -jar $executable $ags + +if type "xcodegen" > /dev/null 2>&1; then + cd samples/client/test/swift5/default + xcodegen generate +fi + +if type "swiftlint" > /dev/null 2>&1; then + cd samples/client/test/swift5/default + swiftlint autocorrect +fi diff --git a/bin/windows/swift5-all.bat b/bin/windows/swift5-all.bat new file mode 100755 index 0000000000..663df4e22d --- /dev/null +++ b/bin/windows/swift5-all.bat @@ -0,0 +1,2 @@ +call .\bin\windows\swift5-petstore-all.bat +call .\bin\windows\swift5-test.bat diff --git a/bin/windows/swift5-petstore-alamofire.bat b/bin/windows/swift5-petstore-alamofire.bat new file mode 100755 index 0000000000..b982ea061e --- /dev/null +++ b/bin/windows/swift5-petstore-alamofire.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-alamofire.json -o samples\client\petstore\swift5\alamofireLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-all.bat b/bin/windows/swift5-petstore-all.bat new file mode 100755 index 0000000000..1daaa1fee7 --- /dev/null +++ b/bin/windows/swift5-petstore-all.bat @@ -0,0 +1,9 @@ +call .\bin\windows\swift5-petstore.bat +call .\bin\windows\swift5-petstore-promisekit.bat +call .\bin\windows\swift5-petstore-result.bat +call .\bin\windows\swift5-petstore-rxswift.bat +call .\bin\windows\swift5-petstore-objcCompatible.bat +call .\bin\windows\swift5-petstore-nonPublicApi.bat +call .\bin\windows\swift5-petstore-urlsession.bat +call .\bin\windows\swift5-petstore-alamofire.bat +call .\bin\windows\swift5-petstore-combine.bat diff --git a/bin/windows/swift5-petstore-combine.bat b/bin/windows/swift5-petstore-combine.bat new file mode 100755 index 0000000000..5ea7cc88db --- /dev/null +++ b/bin/windows/swift5-petstore-combine.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-combine.json -o samples\client\petstore\swift5\combineLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-nonPublicApi.bat b/bin/windows/swift5-petstore-nonPublicApi.bat new file mode 100755 index 0000000000..6853336901 --- /dev/null +++ b/bin/windows/swift5-petstore-nonPublicApi.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-nonPublicApi.json -o samples\client\petstore\swift5\nonPublicApi + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-objcCompatible.bat b/bin/windows/swift5-petstore-objcCompatible.bat new file mode 100755 index 0000000000..7d9b7047b4 --- /dev/null +++ b/bin/windows/swift5-petstore-objcCompatible.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-objcCompatible.json -o samples\client\petstore\swift5\objcCompatible + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-promisekit.bat b/bin/windows/swift5-petstore-promisekit.bat new file mode 100755 index 0000000000..cfd9ff41ef --- /dev/null +++ b/bin/windows/swift5-petstore-promisekit.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-promisekit.json -o samples\client\petstore\swift5\promisekitLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-result.bat b/bin/windows/swift5-petstore-result.bat new file mode 100755 index 0000000000..4aabf28d50 --- /dev/null +++ b/bin/windows/swift5-petstore-result.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-result.json -o samples\client\petstore\swift5\resultLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-rxswift.bat b/bin/windows/swift5-petstore-rxswift.bat new file mode 100755 index 0000000000..862c182067 --- /dev/null +++ b/bin/windows/swift5-petstore-rxswift.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-rxswift.json -o samples\client\petstore\swift5\rxswiftLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-urlSession.bat b/bin/windows/swift5-petstore-urlSession.bat new file mode 100755 index 0000000000..594317a3fa --- /dev/null +++ b/bin/windows/swift5-petstore-urlSession.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-urlsession.json -o samples\client\petstore\swift5\urlsessionLibrary + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore.bat b/bin/windows/swift5-petstore.bat new file mode 100755 index 0000000000..26cee2940f --- /dev/null +++ b/bin/windows/swift5-petstore.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -o samples\client\petstore\swift5\default + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-test.bat b/bin/windows/swift5-test.bat new file mode 100755 index 0000000000..60d74aabcf --- /dev/null +++ b/bin/windows/swift5-test.bat @@ -0,0 +1,10 @@ +set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar + +If Not Exist %executable% ( + mvn clean package +) + +REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M +set ags=generate -i modules\openapi-generator\src\test\resources\2_0\swift5Test.json -g swift5 -c bin\swift5-test.json -o samples\client\test\swift5\default + +java %JAVA_OPTS% -jar %executable% %ags% diff --git a/docs/generators.md b/docs/generators.md index 59935cc3a6..eb4daced89 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -57,6 +57,7 @@ The following generators are available: * [swift2-deprecated (deprecated)](generators/swift2-deprecated.md) * [swift3-deprecated (deprecated)](generators/swift3-deprecated.md) * [swift4](generators/swift4.md) +* [swift5](generators/swift5.md) * [typescript-angular](generators/typescript-angular.md) * [typescript-angularjs](generators/typescript-angularjs.md) * [typescript-aurelia](generators/typescript-aurelia.md) diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md new file mode 100644 index 0000000000..2d3d9cff6e --- /dev/null +++ b/docs/generators/swift5.md @@ -0,0 +1,31 @@ +--- +title: Config Options for swift5 +sidebar_label: swift5 +--- + +| Option | Description | Values | Default | +| ------ | ----------- | ------ | ------- | +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|projectName|Project name in Xcode| |null| +|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine are available.| |null| +|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| +|podSource|Source information used for Podspec| |null| +|podVersion|Version used for Podspec| |null| +|podAuthors|Authors used for Podspec| |null| +|podSocialMediaURL|Social Media URL used for Podspec| |null| +|podLicense|License used for Podspec| |null| +|podHomepage|Homepage used for Podspec| |null| +|podSummary|Summary used for Podspec| |null| +|podDescription|Description used for Podspec| |null| +|podScreenshots|Screenshots used for Podspec| |null| +|podDocumentationURL|Documentation URL used for Podspec| |null| +|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|library|Library template (sub-template) to use|
**urlsession**
[DEFAULT] HTTP client: URLSession
**alamofire**
HTTP client: Alamofire
|urlsession| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5Codegen.java new file mode 100644 index 0000000000..1aa925356f --- /dev/null +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5Codegen.java @@ -0,0 +1,1069 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.languages; + +import io.swagger.v3.oas.models.media.ArraySchema; +import io.swagger.v3.oas.models.media.Schema; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.text.WordUtils; +import org.openapitools.codegen.*; +import org.openapitools.codegen.utils.ModelUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.openapitools.codegen.utils.StringUtils.camelize; + + +public class Swift5Codegen extends DefaultCodegen implements CodegenConfig { + private static final Logger LOGGER = LoggerFactory.getLogger(Swift5Codegen.class); + + public static final String PROJECT_NAME = "projectName"; + public static final String RESPONSE_AS = "responseAs"; + public static final String OBJC_COMPATIBLE = "objcCompatible"; + public static final String POD_SOURCE = "podSource"; + public static final String POD_AUTHORS = "podAuthors"; + public static final String POD_SOCIAL_MEDIA_URL = "podSocialMediaURL"; + public static final String POD_LICENSE = "podLicense"; + public static final String POD_HOMEPAGE = "podHomepage"; + public static final String POD_SUMMARY = "podSummary"; + public static final String POD_DESCRIPTION = "podDescription"; + public static final String POD_SCREENSHOTS = "podScreenshots"; + public static final String POD_DOCUMENTATION_URL = "podDocumentationURL"; + public static final String SWIFT_USE_API_NAMESPACE = "swiftUseApiNamespace"; + public static final String DEFAULT_POD_AUTHORS = "OpenAPI Generator"; + public static final String LENIENT_TYPE_CAST = "lenientTypeCast"; + protected static final String LIBRARY_ALAMOFIRE = "alamofire"; + protected static final String LIBRARY_URLSESSION = "urlsession"; + protected static final String RESPONSE_LIBRARY_PROMISE_KIT = "PromiseKit"; + protected static final String RESPONSE_LIBRARY_RX_SWIFT = "RxSwift"; + protected static final String RESPONSE_LIBRARY_RESULT = "Result"; + protected static final String RESPONSE_LIBRARY_COMBINE = "Combine"; + protected static final String[] RESPONSE_LIBRARIES = {RESPONSE_LIBRARY_PROMISE_KIT, RESPONSE_LIBRARY_RX_SWIFT, RESPONSE_LIBRARY_RESULT, RESPONSE_LIBRARY_COMBINE}; + protected String projectName = "OpenAPIClient"; + protected boolean nonPublicApi = false; + protected boolean objcCompatible = false; + protected boolean lenientTypeCast = false; + protected boolean swiftUseApiNamespace; + protected String[] responseAs = new String[0]; + protected String sourceFolder = "Classes" + File.separator + "OpenAPIs"; + protected HashSet objcReservedWords; + protected String apiDocPath = "docs/"; + protected String modelDocPath = "docs/"; + + /** + * Constructor for the swift5 language codegen module. + */ + public Swift5Codegen() { + super(); + outputFolder = "generated-code" + File.separator + "swift"; + modelTemplateFiles.put("model.mustache", ".swift"); + apiTemplateFiles.put("api.mustache", ".swift"); + embeddedTemplateDir = templateDir = "swift5"; + apiPackage = File.separator + "APIs"; + modelPackage = File.separator + "Models"; + modelDocTemplateFiles.put("model_doc.mustache", ".md"); + apiDocTemplateFiles.put("api_doc.mustache", ".md"); + + languageSpecificPrimitives = new HashSet<>( + Arrays.asList( + "Int", + "Int32", + "Int64", + "Float", + "Double", + "Bool", + "Void", + "String", + "URL", + "Data", + "Date", + "Character", + "UUID", + "URL", + "AnyObject", + "Any", + "Decimal") + ); + defaultIncludes = new HashSet<>( + Arrays.asList( + "Data", + "Date", + "URL", // for file + "UUID", + "Array", + "Dictionary", + "Set", + "Any", + "Empty", + "AnyObject", + "Any", + "Decimal") + ); + + objcReservedWords = new HashSet<>( + Arrays.asList( + // Added for Objective-C compatibility + "id", "description", "NSArray", "NSURL", "CGFloat", "NSSet", "NSString", "NSInteger", "NSUInteger", + "NSError", "NSDictionary" + ) + ); + + reservedWords = new HashSet<>( + Arrays.asList( + // name used by swift client + "ErrorResponse", "Response", + + // Swift keywords. This list is taken from here: + // https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/LexicalStructure.html#//apple_ref/doc/uid/TP40014097-CH30-ID410 + // + // Keywords used in declarations + "associatedtype", "class", "deinit", "enum", "extension", "fileprivate", "func", "import", "init", + "inout", "internal", "let", "open", "operator", "private", "protocol", "public", "static", "struct", + "subscript", "typealias", "var", + // Keywords uses in statements + "break", "case", "continue", "default", "defer", "do", "else", "fallthrough", "for", "guard", "if", + "in", "repeat", "return", "switch", "where", "while", + // Keywords used in expressions and types + "as", "Any", "catch", "false", "is", "nil", "rethrows", "super", "self", "Self", "throw", "throws", "true", "try", + // Keywords used in patterns + "_", + // Keywords that begin with a number sign + "#available", "#colorLiteral", "#column", "#else", "#elseif", "#endif", "#file", "#fileLiteral", "#function", "#if", + "#imageLiteral", "#line", "#selector", "#sourceLocation", + // Keywords reserved in particular contexts + "associativity", "convenience", "dynamic", "didSet", "final", "get", "infix", "indirect", "lazy", "left", + "mutating", "none", "nonmutating", "optional", "override", "postfix", "precedence", "prefix", "Protocol", + "required", "right", "set", "Type", "unowned", "weak", "willSet", + + // + // Swift Standard Library types + // https://developer.apple.com/documentation/swift + // + // Numbers and Basic Values + "Bool", "Int", "Double", "Float", "Range", "ClosedRange", "Error", "Optional", + // Special-Use Numeric Types + "UInt", "UInt8", "UInt16", "UInt32", "UInt64", "Int8", "Int16", "Int32", "Int64", "Float80", "Float32", "Float64", + // Strings and Text + "String", "Character", "Unicode", "StaticString", + // Collections + "Array", "Dictionary", "Set", "OptionSet", "CountableRange", "CountableClosedRange", + + // The following are commonly-used Foundation types + "URL", "Data", "Codable", "Encodable", "Decodable", + + // The following are other words we want to reserve + "Void", "AnyObject", "Class", "dynamicType", "COLUMN", "FILE", "FUNCTION", "LINE" + ) + ); + + typeMapping = new HashMap<>(); + typeMapping.put("array", "Array"); + typeMapping.put("List", "Array"); + typeMapping.put("map", "Dictionary"); + typeMapping.put("date", "Date"); + typeMapping.put("Date", "Date"); + typeMapping.put("DateTime", "Date"); + typeMapping.put("boolean", "Bool"); + typeMapping.put("string", "String"); + typeMapping.put("char", "Character"); + typeMapping.put("short", "Int"); + typeMapping.put("int", "Int"); + typeMapping.put("long", "Int64"); + typeMapping.put("integer", "Int"); + typeMapping.put("Integer", "Int"); + typeMapping.put("float", "Float"); + typeMapping.put("number", "Double"); + typeMapping.put("double", "Double"); + typeMapping.put("object", "Any"); + typeMapping.put("file", "URL"); + typeMapping.put("binary", "URL"); + typeMapping.put("ByteArray", "Data"); + typeMapping.put("UUID", "UUID"); + typeMapping.put("URI", "String"); + typeMapping.put("BigDecimal", "Decimal"); + + importMapping = new HashMap<>(); + + cliOptions.add(new CliOption(PROJECT_NAME, "Project name in Xcode")); + cliOptions.add(new CliOption(RESPONSE_AS, + "Optionally use libraries to manage response. Currently " + + StringUtils.join(RESPONSE_LIBRARIES, ", ") + + " are available.")); + cliOptions.add(new CliOption(CodegenConstants.NON_PUBLIC_API, + CodegenConstants.NON_PUBLIC_API_DESC + + "(default: false)")); + cliOptions.add(new CliOption(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, + CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC)); + cliOptions.add(new CliOption(OBJC_COMPATIBLE, + "Add additional properties and methods for Objective-C " + + "compatibility (default: false)")); + cliOptions.add(new CliOption(POD_SOURCE, "Source information used for Podspec")); + cliOptions.add(new CliOption(CodegenConstants.POD_VERSION, "Version used for Podspec")); + cliOptions.add(new CliOption(POD_AUTHORS, "Authors used for Podspec")); + cliOptions.add(new CliOption(POD_SOCIAL_MEDIA_URL, "Social Media URL used for Podspec")); + cliOptions.add(new CliOption(POD_LICENSE, "License used for Podspec")); + cliOptions.add(new CliOption(POD_HOMEPAGE, "Homepage used for Podspec")); + cliOptions.add(new CliOption(POD_SUMMARY, "Summary used for Podspec")); + cliOptions.add(new CliOption(POD_DESCRIPTION, "Description used for Podspec")); + cliOptions.add(new CliOption(POD_SCREENSHOTS, "Screenshots used for Podspec")); + cliOptions.add(new CliOption(POD_DOCUMENTATION_URL, + "Documentation URL used for Podspec")); + cliOptions.add(new CliOption(SWIFT_USE_API_NAMESPACE, + "Flag to make all the API classes inner-class " + + "of {{projectName}}API")); + cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, + CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) + .defaultValue(Boolean.TRUE.toString())); + cliOptions.add(new CliOption(LENIENT_TYPE_CAST, + "Accept and cast values for simple types (string->bool, " + + "string->int, int->string)") + .defaultValue(Boolean.FALSE.toString())); + + supportedLibraries.put(LIBRARY_URLSESSION, "[DEFAULT] HTTP client: URLSession"); + supportedLibraries.put(LIBRARY_ALAMOFIRE, "HTTP client: Alamofire"); + + CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "Library template (sub-template) to use"); + libraryOption.setEnum(supportedLibraries); + libraryOption.setDefault(LIBRARY_URLSESSION); + cliOptions.add(libraryOption); + setLibrary(LIBRARY_URLSESSION); + } + + private static CodegenModel reconcileProperties(CodegenModel codegenModel, + CodegenModel parentCodegenModel) { + // To support inheritance in this generator, we will analyze + // the parent and child models, look for properties that match, and remove + // them from the child models and leave them in the parent. + // Because the child models extend the parents, the properties + // will be available via the parent. + + // Get the properties for the parent and child models + final List parentModelCodegenProperties = parentCodegenModel.vars; + List codegenProperties = codegenModel.vars; + codegenModel.allVars = new ArrayList(codegenProperties); + codegenModel.parentVars = parentCodegenModel.allVars; + + // Iterate over all of the parent model properties + boolean removedChildProperty = false; + + for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) { + // Now that we have found a prop in the parent class, + // and search the child class for the same prop. + Iterator iterator = codegenProperties.iterator(); + while (iterator.hasNext()) { + CodegenProperty codegenProperty = iterator.next(); + if (codegenProperty.baseName.equals(parentModelCodegenProperty.baseName)) { + // We found a property in the child class that is + // a duplicate of the one in the parent, so remove it. + iterator.remove(); + removedChildProperty = true; + } + } + } + + if (removedChildProperty) { + // If we removed an entry from this model's vars, we need to ensure hasMore is updated + int count = 0; + int numVars = codegenProperties.size(); + for (CodegenProperty codegenProperty : codegenProperties) { + count += 1; + codegenProperty.hasMore = count < numVars; + } + codegenModel.vars = codegenProperties; + } + + + return codegenModel; + } + + @Override + public CodegenType getTag() { + return CodegenType.CLIENT; + } + + @Override + public String getName() { + return "swift5"; + } + + @Override + public String getHelp() { + return "Generates a Swift 5.x client library."; + } + + @Override + protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, + Schema schema) { + + final Schema additionalProperties = ModelUtils.getAdditionalProperties(schema); + + if (additionalProperties != null) { + codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); + } + } + + @Override + public void processOpts() { + super.processOpts(); + + if (StringUtils.isEmpty(System.getenv("SWIFT_POST_PROCESS_FILE"))) { + LOGGER.info("Environment variable SWIFT_POST_PROCESS_FILE not defined so the Swift code may not be properly formatted. To define it, try 'export SWIFT_POST_PROCESS_FILE=/usr/local/bin/swiftformat' (Linux/Mac)"); + LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); + } + + // Setup project name + if (additionalProperties.containsKey(PROJECT_NAME)) { + setProjectName((String) additionalProperties.get(PROJECT_NAME)); + } else { + additionalProperties.put(PROJECT_NAME, projectName); + } + sourceFolder = projectName + File.separator + sourceFolder; + + // Setup nonPublicApi option, which generates code with reduced access + // modifiers; allows embedding elsewhere without exposing non-public API calls + // to consumers + if (additionalProperties.containsKey(CodegenConstants.NON_PUBLIC_API)) { + setNonPublicApi(convertPropertyToBooleanAndWriteBack(CodegenConstants.NON_PUBLIC_API)); + } + additionalProperties.put(CodegenConstants.NON_PUBLIC_API, nonPublicApi); + + // Setup objcCompatible option, which adds additional properties + // and methods for Objective-C compatibility + if (additionalProperties.containsKey(OBJC_COMPATIBLE)) { + setObjcCompatible(convertPropertyToBooleanAndWriteBack(OBJC_COMPATIBLE)); + } + additionalProperties.put(OBJC_COMPATIBLE, objcCompatible); + + // add objc reserved words + if (Boolean.TRUE.equals(objcCompatible)) { + reservedWords.addAll(objcReservedWords); + } + + if (additionalProperties.containsKey(RESPONSE_AS)) { + Object responseAsObject = additionalProperties.get(RESPONSE_AS); + if (responseAsObject instanceof String) { + setResponseAs(((String) responseAsObject).split(",")); + } else { + setResponseAs((String[]) responseAsObject); + } + } + additionalProperties.put(RESPONSE_AS, responseAs); + if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_PROMISE_KIT)) { + additionalProperties.put("usePromiseKit", true); + } + if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_RX_SWIFT)) { + additionalProperties.put("useRxSwift", true); + } + if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_RESULT)) { + additionalProperties.put("useResult", true); + } + if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_COMBINE)) { + additionalProperties.put("useCombine", true); + } + + // Setup swiftUseApiNamespace option, which makes all the API + // classes inner-class of {{projectName}}API + if (additionalProperties.containsKey(SWIFT_USE_API_NAMESPACE)) { + setSwiftUseApiNamespace(convertPropertyToBooleanAndWriteBack(SWIFT_USE_API_NAMESPACE)); + } + + if (!additionalProperties.containsKey(POD_AUTHORS)) { + additionalProperties.put(POD_AUTHORS, DEFAULT_POD_AUTHORS); + } + + setLenientTypeCast(convertPropertyToBooleanAndWriteBack(LENIENT_TYPE_CAST)); + + // make api and model doc path available in mustache template + additionalProperties.put("apiDocPath", apiDocPath); + additionalProperties.put("modelDocPath", modelDocPath); + + supportingFiles.add(new SupportingFile("Podspec.mustache", + "", + projectName + ".podspec")); + supportingFiles.add(new SupportingFile("Cartfile.mustache", + "", + "Cartfile")); + supportingFiles.add(new SupportingFile("Package.swift.mustache", + "", + "Package.swift")); + supportingFiles.add(new SupportingFile("APIHelper.mustache", + sourceFolder, + "APIHelper.swift")); + supportingFiles.add(new SupportingFile("Configuration.mustache", + sourceFolder, + "Configuration.swift")); + supportingFiles.add(new SupportingFile("Extensions.mustache", + sourceFolder, + "Extensions.swift")); + supportingFiles.add(new SupportingFile("Models.mustache", + sourceFolder, + "Models.swift")); + supportingFiles.add(new SupportingFile("APIs.mustache", + sourceFolder, + "APIs.swift")); + supportingFiles.add(new SupportingFile("CodableHelper.mustache", + sourceFolder, + "CodableHelper.swift")); + supportingFiles.add(new SupportingFile("OpenISO8601DateFormatter.mustache", + sourceFolder, + "OpenISO8601DateFormatter.swift")); + supportingFiles.add(new SupportingFile("JSONDataEncoding.mustache", + sourceFolder, + "JSONDataEncoding.swift")); + supportingFiles.add(new SupportingFile("JSONEncodingHelper.mustache", + sourceFolder, + "JSONEncodingHelper.swift")); + supportingFiles.add(new SupportingFile("git_push.sh.mustache", + "", + "git_push.sh")); + supportingFiles.add(new SupportingFile("SynchronizedDictionary.mustache", + sourceFolder, + "SynchronizedDictionary.swift")); + supportingFiles.add(new SupportingFile("gitignore.mustache", + "", + ".gitignore")); + supportingFiles.add(new SupportingFile("README.mustache", + "", + "README.md")); + supportingFiles.add(new SupportingFile("XcodeGen.mustache", + "", + "project.yml")); + + switch (getLibrary()) { + case LIBRARY_ALAMOFIRE: + additionalProperties.put("useAlamofire", true); + supportingFiles.add(new SupportingFile("AlamofireImplementations.mustache", + sourceFolder, + "AlamofireImplementations.swift")); + break; + case LIBRARY_URLSESSION: + additionalProperties.put("useURLSession", true); + supportingFiles.add(new SupportingFile("URLSessionImplementations.mustache", + sourceFolder, + "URLSessionImplementations.swift")); + break; + default: + break; + } + + } + + @Override + protected boolean isReservedWord(String word) { + return word != null && reservedWords.contains(word); //don't lowercase as super does + } + + @Override + public String escapeReservedWord(String name) { + if (this.reservedWordsMappings().containsKey(name)) { + return this.reservedWordsMappings().get(name); + } + return "_" + name; // add an underscore to the name + } + + @Override + public String modelFileFolder() { + return outputFolder + File.separator + sourceFolder + + modelPackage().replace('.', File.separatorChar); + } + + @Override + public String apiFileFolder() { + return outputFolder + File.separator + sourceFolder + + apiPackage().replace('.', File.separatorChar); + } + + @Override + public String getTypeDeclaration(Schema p) { + if (ModelUtils.isArraySchema(p)) { + ArraySchema ap = (ArraySchema) p; + Schema inner = ap.getItems(); + return "[" + getTypeDeclaration(inner) + "]"; + } else if (ModelUtils.isMapSchema(p)) { + Schema inner = ModelUtils.getAdditionalProperties(p); + return "[String:" + getTypeDeclaration(inner) + "]"; + } + return super.getTypeDeclaration(p); + } + + @Override + public String getSchemaType(Schema p) { + String openAPIType = super.getSchemaType(p); + String type; + if (typeMapping.containsKey(openAPIType)) { + type = typeMapping.get(openAPIType); + if (languageSpecificPrimitives.contains(type) || defaultIncludes.contains(type)) { + return type; + } + } else { + type = openAPIType; + } + return toModelName(type); + } + + @Override + public boolean isDataTypeFile(String dataType) { + return dataType != null && dataType.equals("URL"); + } + + @Override + public boolean isDataTypeBinary(final String dataType) { + return dataType != null && dataType.equals("Data"); + } + + /** + * Output the proper model name (capitalized). + * + * @param name the name of the model + * @return capitalized model name + */ + @Override + public String toModelName(String name) { + // FIXME parameter should not be assigned. Also declare it as "final" + name = sanitizeName(name); + + if (!StringUtils.isEmpty(modelNameSuffix)) { // set model suffix + name = name + "_" + modelNameSuffix; + } + + if (!StringUtils.isEmpty(modelNamePrefix)) { // set model prefix + name = modelNamePrefix + "_" + name; + } + + // camelize the model name + // phone_number => PhoneNumber + name = camelize(name); + + // model name cannot use reserved keyword, e.g. return + if (isReservedWord(name)) { + String modelName = "Model" + name; + LOGGER.warn(name + " (reserved word) cannot be used as model name. Renamed to " + + modelName); + return modelName; + } + + // model name starts with number + if (name.matches("^\\d.*")) { + // e.g. 200Response => Model200Response (after camelize) + String modelName = "Model" + name; + LOGGER.warn(name + + " (model name starts with number) cannot be used as model name." + + " Renamed to " + modelName); + return modelName; + } + + return name; + } + + /** + * Return the capitalized file name of the model. + * + * @param name the model name + * @return the file name of the model + */ + @Override + public String toModelFilename(String name) { + // should be the same as the model name + return toModelName(name); + } + + @Override + public String toDefaultValue(Schema p) { + if (p.getEnum() != null && !p.getEnum().isEmpty()) { + if (p.getDefault() != null) { + if (ModelUtils.isStringSchema(p)) { + return "." + toEnumVarName(escapeText((String) p.getDefault()), p.getType()); + } else { + return "." + toEnumVarName(escapeText(p.getDefault().toString()), p.getType()); + } + } + } + if (ModelUtils.isIntegerSchema(p) || ModelUtils.isNumberSchema(p) || ModelUtils.isBooleanSchema(p)) { + if (p.getDefault() != null) { + return p.getDefault().toString(); + } + } else if (ModelUtils.isStringSchema(p)) { + if (p.getDefault() != null) { + return "\"" + escapeText((String) p.getDefault()) + "\""; + } + } + return null; + } + + @Override + public String toInstantiationType(Schema p) { + if (ModelUtils.isMapSchema(p)) { + return getSchemaType(ModelUtils.getAdditionalProperties(p)); + } else if (ModelUtils.isArraySchema(p)) { + ArraySchema ap = (ArraySchema) p; + String inner = getSchemaType(ap.getItems()); + return "[" + inner + "]"; + } + return null; + } + + @Override + public String toApiName(String name) { + if (name.length() == 0) { + return "DefaultAPI"; + } + return camelize(name) + "API"; + } + + @Override + public String apiDocFileFolder() { + return (outputFolder + "/" + apiDocPath).replace("/", File.separator); + } + + @Override + public String modelDocFileFolder() { + return (outputFolder + "/" + modelDocPath).replace("/", File.separator); + } + + @Override + public String toModelDocFilename(String name) { + return toModelName(name); + } + + @Override + public String toApiDocFilename(String name) { + return toApiName(name); + } + + @Override + public String toOperationId(String operationId) { + operationId = camelize(sanitizeName(operationId), true); + + // Throw exception if method name is empty. + // This should not happen but keep the check just in case + if (StringUtils.isEmpty(operationId)) { + throw new RuntimeException("Empty method name (operationId) not allowed"); + } + + // method name cannot use reserved keyword, e.g. return + if (isReservedWord(operationId)) { + String newOperationId = camelize(("call_" + operationId), true); + LOGGER.warn(operationId + " (reserved word) cannot be used as method name." + + " Renamed to " + newOperationId); + return newOperationId; + } + + // operationId starts with a number + if (operationId.matches("^\\d.*")) { + LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + camelize(sanitizeName("call_" + operationId), true)); + operationId = camelize(sanitizeName("call_" + operationId), true); + } + + + return operationId; + } + + @Override + public String toVarName(String name) { + // sanitize name + name = sanitizeName(name); + + // if it's all uppper case, do nothing + if (name.matches("^[A-Z_]*$")) { + return name; + } + + // camelize the variable name + // pet_id => petId + name = camelize(name, true); + + // for reserved word or word starting with number, append _ + if (isReservedWord(name) || name.matches("^\\d.*")) { + name = escapeReservedWord(name); + } + + return name; + } + + @Override + public String toParamName(String name) { + // sanitize name + name = sanitizeName(name); + + // replace - with _ e.g. created-at => created_at + name = name.replaceAll("-", "_"); + + // if it's all uppper case, do nothing + if (name.matches("^[A-Z_]*$")) { + return name; + } + + // camelize(lower) the variable name + // pet_id => petId + name = camelize(name, true); + + // for reserved word or word starting with number, append _ + if (isReservedWord(name) || name.matches("^\\d.*")) { + name = escapeReservedWord(name); + } + + return name; + } + + @Override + public CodegenModel fromModel(String name, Schema model) { + Map allDefinitions = ModelUtils.getSchemas(this.openAPI); + CodegenModel codegenModel = super.fromModel(name, model); + if (codegenModel.description != null) { + codegenModel.imports.add("ApiModel"); + } + if (allDefinitions != null) { + String parentSchema = codegenModel.parentSchema; + + // multilevel inheritance: reconcile properties of all the parents + while (parentSchema != null) { + final Schema parentModel = allDefinitions.get(parentSchema); + final CodegenModel parentCodegenModel = super.fromModel(codegenModel.parent, + parentModel); + codegenModel = Swift5Codegen.reconcileProperties(codegenModel, parentCodegenModel); + + // get the next parent + parentSchema = parentCodegenModel.parentSchema; + } + } + + return codegenModel; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public void setNonPublicApi(boolean nonPublicApi) { + this.nonPublicApi = nonPublicApi; + } + + public void setObjcCompatible(boolean objcCompatible) { + this.objcCompatible = objcCompatible; + } + + public void setLenientTypeCast(boolean lenientTypeCast) { + this.lenientTypeCast = lenientTypeCast; + } + + public void setResponseAs(String[] responseAs) { + this.responseAs = responseAs; + } + + public void setSwiftUseApiNamespace(boolean swiftUseApiNamespace) { + this.swiftUseApiNamespace = swiftUseApiNamespace; + } + + @Override + public String toEnumValue(String value, String datatype) { + // for string, array of string + if ("String".equals(datatype) || "[String]".equals(datatype) || "[String:String]".equals(datatype)) { + return "\"" + String.valueOf(value) + "\""; + } else { + return String.valueOf(value); + } + } + + @Override + public String toEnumDefaultValue(String value, String datatype) { + return datatype + "_" + value; + } + + @Override + public String toEnumVarName(String name, String datatype) { + if (name.length() == 0) { + return "empty"; + } + + Pattern startWithNumberPattern = Pattern.compile("^\\d+"); + Matcher startWithNumberMatcher = startWithNumberPattern.matcher(name); + if (startWithNumberMatcher.find()) { + String startingNumbers = startWithNumberMatcher.group(0); + String nameWithoutStartingNumbers = name.substring(startingNumbers.length()); + + return "_" + startingNumbers + camelize(nameWithoutStartingNumbers, true); + } + + // for symbol, e.g. $, # + if (getSymbolName(name) != null) { + return camelize(WordUtils.capitalizeFully(getSymbolName(name).toUpperCase(Locale.ROOT)), true); + } + + // Camelize only when we have a structure defined below + Boolean camelized = false; + if (name.matches("[A-Z][a-z0-9]+[a-zA-Z0-9]*")) { + name = camelize(name, true); + camelized = true; + } + + // Reserved Name + String nameLowercase = StringUtils.lowerCase(name); + if (isReservedWord(nameLowercase)) { + return escapeReservedWord(nameLowercase); + } + + // Check for numerical conversions + if ("Int".equals(datatype) || "Int32".equals(datatype) || "Int64".equals(datatype) + || "Float".equals(datatype) || "Double".equals(datatype)) { + String varName = "number" + camelize(name); + varName = varName.replaceAll("-", "minus"); + varName = varName.replaceAll("\\+", "plus"); + varName = varName.replaceAll("\\.", "dot"); + return varName; + } + + // If we have already camelized the word, don't progress + // any further + if (camelized) { + return name; + } + + char[] separators = {'-', '_', ' ', ':', '(', ')'}; + return camelize(WordUtils.capitalizeFully(StringUtils.lowerCase(name), separators) + .replaceAll("[-_ :\\(\\)]", ""), + true); + } + + @Override + public String toEnumName(CodegenProperty property) { + String enumName = toModelName(property.name); + + // Ensure that the enum type doesn't match a reserved word or + // the variable name doesn't match the generated enum type or the + // Swift compiler will generate an error + if (isReservedWord(property.datatypeWithEnum) + || toVarName(property.name).equals(property.datatypeWithEnum)) { + enumName = property.datatypeWithEnum + "Enum"; + } + + // TODO: toModelName already does something for names starting with number, + // so this code is probably never called + if (enumName.matches("\\d.*")) { // starts with number + return "_" + enumName; + } else { + return enumName; + } + } + + @Override + public Map postProcessModels(Map objs) { + Map postProcessedModelsEnum = postProcessModelsEnum(objs); + + // We iterate through the list of models, and also iterate through each of the + // properties for each model. For each property, if: + // + // CodegenProperty.name != CodegenProperty.baseName + // + // then we set + // + // CodegenProperty.vendorExtensions["x-codegen-escaped-property-name"] = true + // + // Also, if any property in the model has x-codegen-escaped-property-name=true, then we mark: + // + // CodegenModel.vendorExtensions["x-codegen-has-escaped-property-names"] = true + // + List models = (List) postProcessedModelsEnum.get("models"); + for (Object _mo : models) { + Map mo = (Map) _mo; + CodegenModel cm = (CodegenModel) mo.get("model"); + boolean modelHasPropertyWithEscapedName = false; + for (CodegenProperty prop : cm.allVars) { + if (!prop.name.equals(prop.baseName)) { + prop.vendorExtensions.put("x-codegen-escaped-property-name", true); + modelHasPropertyWithEscapedName = true; + } + } + if (modelHasPropertyWithEscapedName) { + cm.vendorExtensions.put("x-codegen-has-escaped-property-names", true); + } + } + + return postProcessedModelsEnum; + } + + @Override + public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { + super.postProcessModelProperty(model, property); + + boolean isSwiftScalarType = property.isInteger || property.isLong || property.isFloat + || property.isDouble || property.isBoolean; + if ((!property.required || property.isNullable) && isSwiftScalarType) { + // Optional scalar types like Int?, Int64?, Float?, Double?, and Bool? + // do not translate to Objective-C. So we want to flag those + // properties in case we want to put special code in the templates + // which provide Objective-C compatibility. + property.vendorExtensions.put("x-swift-optional-scalar", true); + } + } + + @Override + public String escapeQuotationMark(String input) { + // remove " to avoid code injection + return input.replace("\"", ""); + } + + @Override + public String escapeUnsafeCharacters(String input) { + return input.replace("*/", "*_/").replace("/*", "/_*"); + } + + @Override + public void postProcessFile(File file, String fileType) { + if (file == null) { + return; + } + String swiftPostProcessFile = System.getenv("SWIFT_POST_PROCESS_FILE"); + if (StringUtils.isEmpty(swiftPostProcessFile)) { + return; // skip if SWIFT_POST_PROCESS_FILE env variable is not defined + } + // only process files with swift extension + if ("swift".equals(FilenameUtils.getExtension(file.toString()))) { + String command = swiftPostProcessFile + " " + file.toString(); + try { + Process p = Runtime.getRuntime().exec(command); + int exitValue = p.waitFor(); + if (exitValue != 0) { + LOGGER.error("Error running the command ({}). Exit value: {}", command, exitValue); + } else { + LOGGER.info("Successfully executed: " + command); + } + } catch (Exception e) { + LOGGER.error("Error running the command ({}). Exception: {}", command, e.getMessage()); + } + } + } + + @Override + public Map postProcessOperationsWithModels(Map objs, List allModels) { + Map objectMap = (Map) objs.get("operations"); + + HashMap modelMaps = new HashMap(); + for (Object o : allModels) { + HashMap h = (HashMap) o; + CodegenModel m = (CodegenModel) h.get("model"); + modelMaps.put(m.classname, m); + } + + List operations = (List) objectMap.get("operation"); + for (CodegenOperation operation : operations) { + for (CodegenParameter cp : operation.allParams) { + cp.vendorExtensions.put("x-swift-example", constructExampleCode(cp, modelMaps)); + } + } + return objs; + } + + public String constructExampleCode(CodegenParameter codegenParameter, HashMap modelMaps) { + if (codegenParameter.isListContainer) { // array + return "[" + constructExampleCode(codegenParameter.items, modelMaps) + "]"; + } else if (codegenParameter.isMapContainer) { // TODO: map, file type + return "\"TODO\""; + } else if (languageSpecificPrimitives.contains(codegenParameter.dataType)) { // primitive type + if ("String".equals(codegenParameter.dataType) || "Character".equals(codegenParameter.dataType)) { + if (StringUtils.isEmpty(codegenParameter.example)) { + return "\"" + codegenParameter.example + "\""; + } else { + return "\"" + codegenParameter.paramName + "_example\""; + } + } else if ("Bool".equals(codegenParameter.dataType)) { // boolean + if (Boolean.TRUE.equals(codegenParameter.example)) { + return "true"; + } else { + return "false"; + } + } else if ("URL".equals(codegenParameter.dataType)) { // URL + return "URL(string: \"https://example.com\")!"; + } else if ("Date".equals(codegenParameter.dataType)) { // date + return "Date()"; + } else { // numeric + if (StringUtils.isEmpty(codegenParameter.example)) { + return codegenParameter.example; + } else { + return "987"; + } + } + } else { // model + // look up the model + if (modelMaps.containsKey(codegenParameter.dataType)) { + return constructExampleCode(modelMaps.get(codegenParameter.dataType), modelMaps); + } else { + //LOGGER.error("Error in constructing examples. Failed to look up the model " + codegenParameter.dataType); + return "TODO"; + } + } + } + + public String constructExampleCode(CodegenProperty codegenProperty, HashMap modelMaps) { + if (codegenProperty.isListContainer) { // array + return "[" + constructExampleCode(codegenProperty.items, modelMaps) + "]"; + } else if (codegenProperty.isMapContainer) { // TODO: map, file type + return "\"TODO\""; + } else if (languageSpecificPrimitives.contains(codegenProperty.dataType)) { // primitive type + if ("String".equals(codegenProperty.dataType) || "Character".equals(codegenProperty.dataType)) { + if (StringUtils.isEmpty(codegenProperty.example)) { + return "\"" + codegenProperty.example + "\""; + } else { + return "\"" + codegenProperty.name + "_example\""; + } + } else if ("Bool".equals(codegenProperty.dataType)) { // boolean + if (Boolean.TRUE.equals(codegenProperty.example)) { + return "true"; + } else { + return "false"; + } + } else if ("URL".equals(codegenProperty.dataType)) { // URL + return "URL(string: \"https://example.com\")!"; + } else if ("Date".equals(codegenProperty.dataType)) { // date + return "Date()"; + } else { // numeric + if (StringUtils.isEmpty(codegenProperty.example)) { + return codegenProperty.example; + } else { + return "123"; + } + } + } else { + // look up the model + if (modelMaps.containsKey(codegenProperty.dataType)) { + return constructExampleCode(modelMaps.get(codegenProperty.dataType), modelMaps); + } else { + //LOGGER.error("Error in constructing examples. Failed to look up the model " + codegenProperty.dataType); + return "\"TODO\""; + } + } + } + + public String constructExampleCode(CodegenModel codegenModel, HashMap modelMaps) { + String example; + example = codegenModel.name + "("; + List propertyExamples = new ArrayList<>(); + for (CodegenProperty codegenProperty : codegenModel.vars) { + propertyExamples.add(codegenProperty.name + ": " + constructExampleCode(codegenProperty, modelMaps)); + } + example += StringUtils.join(propertyExamples, ", "); + example += ")"; + return example; + } +} diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 6876bd9899..5808a83b15 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -109,6 +109,7 @@ org.openapitools.codegen.languages.StaticHtml2Generator org.openapitools.codegen.languages.SwiftClientCodegen org.openapitools.codegen.languages.Swift3Codegen org.openapitools.codegen.languages.Swift4Codegen +org.openapitools.codegen.languages.Swift5Codegen org.openapitools.codegen.languages.TypeScriptAngularClientCodegen org.openapitools.codegen.languages.TypeScriptAngularJsClientCodegen org.openapitools.codegen.languages.TypeScriptAureliaClientCodegen diff --git a/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache b/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache new file mode 100644 index 0000000000..368722c9fe --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache @@ -0,0 +1,71 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct APIHelper { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func rejectNil(_ source: [String:Any?]) -> [String:Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func rejectNilHeaders(_ source: [String:Any?]) -> [String:String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? Array { + result[item.key] = collection.filter({ $0 != nil }).map{ "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? Array { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValuesToQueryItems(_ source: [String:Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? Array { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} + diff --git a/modules/openapi-generator/src/main/resources/swift5/APIs.mustache b/modules/openapi-generator/src/main/resources/swift5/APIs.mustache new file mode 100644 index 0000000000..b3295ce61c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/APIs.mustache @@ -0,0 +1,65 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class {{projectName}}API { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var basePath = "{{{basePath}}}" + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var credential: URLCredential? + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var customHeaders: [String:String] = [:]{{#useAlamofire}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory(){{/useAlamofire}}{{#useURLSession}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory(){{/useURLSession}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var apiResponseQueue: DispatchQueue = .main +} + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class RequestBuilder { + var credential: URLCredential? + var headers: [String:String] + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let parameters: [String:Any]? + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let isBody: Bool + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let method: String + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available.{{#useURLSession}} + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client.{{/useURLSession}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var onProgressReady: ((Progress) -> ())? + + required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders({{projectName}}API.customHeaders) + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func addHeaders(_ aHeaders:[String:String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func addCredential() -> Self { + self.credential = {{projectName}}API.credential + return self + } +} + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache b/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache new file mode 100644 index 0000000000..9c30d7413b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache @@ -0,0 +1,3 @@ +{{#useAlamofire}}github "Alamofire/Alamofire" ~> 4.9.1{{/useAlamofire}}{{#usePromiseKit}} +github "mxcl/PromiseKit" ~> 6.12.0{{/usePromiseKit}}{{#useRxSwift}} +github "ReactiveX/RxSwift" ~> 5.0.1{{/useRxSwift}} diff --git a/modules/openapi-generator/src/main/resources/swift5/CodableHelper.mustache b/modules/openapi-generator/src/main/resources/swift5/CodableHelper.mustache new file mode 100644 index 0000000000..ed01985036 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/CodableHelper.mustache @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache b/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache new file mode 100644 index 0000000000..b6e8d28fe4 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/Configuration.mustache @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache new file mode 100644 index 0000000000..e20d8bf3e5 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/Extensions.mustache @@ -0,0 +1,189 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation{{#usePromiseKit}} +import PromiseKit{{/usePromiseKit}} + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T : Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T : Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T : Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T : Decodable { + var map: [Self.Key : T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} + +{{#usePromiseKit}}extension RequestBuilder { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func execute() -> Promise> { + let deferred = Promise>.pending() + self.execute { result in + switch result { + case let .success(response): + deferred.resolver.fulfill(response) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } +}{{/usePromiseKit}} diff --git a/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache b/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache new file mode 100644 index 0000000000..71cdb1da93 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/JSONDataEncoding.mustache @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? = nil + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/modules/openapi-generator/src/main/resources/swift5/JSONEncodingHelper.mustache b/modules/openapi-generator/src/main/resources/swift5/JSONEncodingHelper.mustache new file mode 100644 index 0000000000..0191a8fd84 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/JSONEncodingHelper.mustache @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class JSONEncodingHelper { + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? = nil + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/modules/openapi-generator/src/main/resources/swift5/Models.mustache b/modules/openapi-generator/src/main/resources/swift5/Models.mustache new file mode 100644 index 0000000000..cf561f12e9 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/Models.mustache @@ -0,0 +1,52 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum ErrorResponse : Error { + case error(Int, Data?, Error) +} + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum DownloadException : Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class Response { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let statusCode: Int + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let header: [String: String] + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let body: T? + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String:String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/modules/openapi-generator/src/main/resources/swift5/OpenISO8601DateFormatter.mustache b/modules/openapi-generator/src/main/resources/swift5/OpenISO8601DateFormatter.mustache new file mode 100644 index 0000000000..29c28dac3f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/OpenISO8601DateFormatter.mustache @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache b/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache new file mode 100644 index 0000000000..0e00b556e8 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache @@ -0,0 +1,40 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "{{projectName}}", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "{{projectName}}", + targets: ["{{projectName}}"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + {{#useAlamofire}} + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.1"), + {{/useAlamofire}} + {{#usePromiseKit}} + .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.12.0"), + {{/usePromiseKit}} + {{#useRxSwift}} + .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "5.0.0"), + {{/useRxSwift}} + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "{{projectName}}", + dependencies: [{{#useAlamofire}}"Alamofire", {{/useAlamofire}}{{#usePromiseKit}}"PromiseKit", {{/usePromiseKit}}{{#useRxSwift}}"RxSwift"{{/useRxSwift}}], + path: "{{projectName}}/Classes" + ), + ] +) diff --git a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache new file mode 100644 index 0000000000..e25eab4991 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache @@ -0,0 +1,38 @@ +Pod::Spec.new do |s| + s.name = '{{projectName}}'{{#projectDescription}} + s.summary = '{{projectDescription}}'{{/projectDescription}} + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '{{#podVersion}}{{podVersion}}{{/podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}}' + s.source = {{#podSource}}{{& podSource}}{{/podSource}}{{^podSource}}{ :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}' }{{/podSource}} + {{#podAuthors}} + s.authors = '{{podAuthors}}' + {{/podAuthors}} + {{#podSocialMediaURL}} + s.social_media_url = '{{podSocialMediaURL}}' + {{/podSocialMediaURL}} + s.license = {{#podLicense}}{{& podLicense}}{{/podLicense}}{{^podLicense}}'Proprietary'{{/podLicense}} + s.homepage = '{{podHomepage}}{{^podHomepage}}https://github.com/OpenAPITools/openapi-generator{{/podHomepage}}' + s.summary = '{{podSummary}}{{^podSummary}}{{projectName}} Swift SDK{{/podSummary}}' + {{#podDescription}} + s.description = '{{podDescription}}' + {{/podDescription}} + {{#podScreenshots}} + s.screenshots = {{& podScreenshots}} + {{/podScreenshots}} + {{#podDocumentationURL}} + s.documentation_url = '{{podDocumentationURL}}' + {{/podDocumentationURL}} + s.source_files = '{{projectName}}/Classes/**/*.swift' + {{#usePromiseKit}} + s.dependency 'PromiseKit/CorePromise', '~> 6.12.0' + {{/usePromiseKit}} + {{#useRxSwift}} + s.dependency 'RxSwift', '~> 5.0.0' + {{/useRxSwift}} + {{#useAlamofire}} + s.dependency 'Alamofire', '~> 4.9.1' + {{/useAlamofire}} +end diff --git a/modules/openapi-generator/src/main/resources/swift5/README.mustache b/modules/openapi-generator/src/main/resources/swift5/README.mustache new file mode 100644 index 0000000000..c9a27d38b6 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/README.mustache @@ -0,0 +1,69 @@ +# Swift5 API client for {{{projectName}}} + +{{#appDescription}} +{{{appDescription}}} +{{/appDescription}} + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: {{appVersion}} +- Package version: {{packageVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Build package: {{generatorClass}} +{{#infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation For Models + +{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) +{{/model}}{{/models}} + +## Documentation For Authorization + +{{^authMethods}} All endpoints do not require authorization. +{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} +{{#authMethods}}## {{{name}}} + +{{#isApiKey}}- **Type**: API key +- **API key parameter name**: {{{keyParamName}}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasic}}- **Type**: HTTP basic authentication +{{/isBasic}} +{{#isOAuth}}- **Type**: OAuth +- **Flow**: {{{flow}}} +- **Authorization URL**: {{{authorizationUrl}}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - **{{{scope}}}**: {{{description}}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} + +## Author + +{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} +{{/hasMore}}{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/swift5/SynchronizedDictionary.mustache b/modules/openapi-generator/src/main/resources/swift5/SynchronizedDictionary.mustache new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/SynchronizedDictionary.mustache @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache b/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache new file mode 100644 index 0000000000..3b57c69e10 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/XcodeGen.mustache @@ -0,0 +1,17 @@ +name: {{projectName}} +targets: + {{projectName}}: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [{{projectName}}] + info: + path: ./Info.plist + version: {{#podVersion}}{{podVersion}}{{/podVersion}}{{^podVersion}}{{#apiInfo}}{{version}}{{/apiInfo}}{{^apiInfo}}}0.0.1{{/apiInfo}}{{/podVersion}} + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + {{#useAlamofire}}dependencies:{{/useAlamofire}}{{^useAlamofire}}{{#useRxSwift}}dependencies:{{/useRxSwift}}{{/useAlamofire}}{{^useAlamofire}}{{^useRxSwift}}{{#usePromiseKit}}dependencies:{{/usePromiseKit}}{{/useRxSwift}}{{/useAlamofire}}{{#useAlamofire}} + - carthage: Alamofire{{/useAlamofire}}{{#useRxSwift}} + - carthage: RxSwift{{/useRxSwift}}{{#usePromiseKit}} + - carthage: PromiseKit{{/usePromiseKit}} diff --git a/modules/openapi-generator/src/main/resources/swift5/_param.mustache b/modules/openapi-generator/src/main/resources/swift5/_param.mustache new file mode 100644 index 0000000000..770458343a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/_param.mustache @@ -0,0 +1 @@ +"{{baseName}}": {{paramName}}{{^required}}?{{/required}}.encodeToJSON() \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift5/api.mustache b/modules/openapi-generator/src/main/resources/swift5/api.mustache new file mode 100644 index 0000000000..d3f1604dcc --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/api.mustache @@ -0,0 +1,252 @@ +{{#operations}}// +// {{classname}}.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation{{#usePromiseKit}} +import PromiseKit{{/usePromiseKit}}{{#useRxSwift}} +import RxSwift{{/useRxSwift}}{{#useCombine}} +import Combine{{/useCombine}} + +{{#swiftUseApiNamespace}} +extension {{projectName}}API { +{{/swiftUseApiNamespace}} + +{{#description}} +/** {{description}} */{{/description}} +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class {{classname}} { +{{#operation}} + {{#allParams}} + {{#isEnum}} + /** + * enum for parameter {{paramName}} + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{enumName}}_{{operationId}}: {{^isContainer}}{{{dataType}}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, CaseIterable { + {{#allowableValues}} + {{#enumVars}} + case {{name}} = {{{value}}} + {{/enumVars}} + {{/allowableValues}} + } + + {{/isEnum}} + {{/allParams}} +{{^usePromiseKit}} +{{^useRxSwift}} +{{^useResult}} +{{^useCombine}} + /** + {{#summary}} + {{{summary}}} + {{/summary}}{{#allParams}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}} + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, completion: @escaping ((_ data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}?,_ error: Error?) -> Void)) { + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in + switch result { + {{#returnType}} + case let .success(response): + completion(response.body, nil) + {{/returnType}} + {{^returnType}} + case .success: + completion((), nil) + {{/returnType}} + case let .failure(error): + completion(nil, error) + } + } + } +{{/useCombine}} +{{/useResult}} +{{/useRxSwift}} +{{/usePromiseKit}} +{{#usePromiseKit}} + /** + {{#summary}} + {{{summary}}} + {{/summary}}{{#allParams}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}} + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}} {{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue) -> Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { + let deferred = Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.pending() + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in + switch result { + {{#returnType}} + case let .success(response): + deferred.resolver.fulfill(response.body!) + {{/returnType}} + {{^returnType}} + case .success: + deferred.resolver.fulfill(()) + {{/returnType}} + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } +{{/usePromiseKit}} +{{#useRxSwift}} + /** + {{#summary}} + {{{summary}}} + {{/summary}}{{#allParams}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}} + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue) -> Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { + return Observable.create { observer -> Disposable in + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in + switch result { + {{#returnType}} + case let .success(response): + observer.onNext(response.body!) + {{/returnType}} + {{^returnType}} + case .success: + observer.onNext(()) + {{/returnType}} + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } +{{/useRxSwift}} +{{#useCombine}} + /** + {{#summary}} + {{{summary}}} + {{/summary}}{{#allParams}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}} + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error> + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue) -> AnyPublisher<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error> { + return Future<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error>.init { promisse in + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in + switch result { + {{#returnType}} + case let .success(response): + promisse(.success(response.body!)) + {{/returnType}} + {{^returnType}} + case .success: + promisse(.success(())) + {{/returnType}} + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } +{{/useCombine}} +{{#useResult}} + /** + {{#summary}} + {{{summary}}} + {{/summary}}{{#allParams}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}} + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, completion: @escaping ((_ result: Result<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}, Error>) -> Void)) { + {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).execute(apiResponseQueue) { result -> Void in + switch result { + {{#returnType}} + case let .success(response): + completion(.success(response.body!)) + {{/returnType}} + {{^returnType}} + case .success: + completion(.success(())) + {{/returnType}} + case let .failure(error): + completion(.failure(error)) + } + } + } +{{/useResult}} + + /** + {{#summary}} + {{{summary}}} + {{/summary}} + - {{httpMethod}} {{{path}}}{{#notes}} + - {{{notes}}}{{/notes}}{{#subresourceOperation}} + - subresourceOperation: {{subresourceOperation}}{{/subresourceOperation}}{{#defaultResponse}} + - defaultResponse: {{defaultResponse}}{{/defaultResponse}} + {{#authMethods}} + - {{#isBasic}}BASIC{{/isBasic}}{{#isOAuth}}OAuth{{/isOAuth}}{{#isApiKey}}API Key{{/isApiKey}}: + - type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeaer}}(HEADER){{/isKeyInHeaer}}{{/keyParamName}} + - name: {{name}} + {{/authMethods}} + {{#hasResponseHeaders}} + - responseHeaders: [{{#responseHeaders}}{{{baseName}}}({{{dataType}}}){{^-last}}, {{/-last}}{{/responseHeaders}}] + {{/hasResponseHeaders}} + {{#externalDocs}} + - externalDocs: {{externalDocs}} + {{/externalDocs}} + {{#allParams}} + - parameter {{paramName}}: ({{#isFormParam}}form{{/isFormParam}}{{#isQueryParam}}query{{/isQueryParam}}{{#isPathParam}}path{{/isPathParam}}{{#isHeaderParam}}header{{/isHeaderParam}}{{#isBodyParam}}body{{/isBodyParam}}) {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}} + {{/allParams}} + - returns: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{description}} + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}WithRequestBuilder({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> { + {{^pathParams}}let{{/pathParams}}{{#pathParams}}{{^secondaryParam}}var{{/secondaryParam}}{{/pathParams}} path = "{{{path}}}"{{#pathParams}} + let {{paramName}}PreEscape = "\({{#isEnum}}{{paramName}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}.rawValue{{/isContainer}}{{/isEnum}}{{^isEnum}}APIHelper.mapValueToPathItem({{paramName}}){{/isEnum}})" + let {{paramName}}PostEscape = {{paramName}}PreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{{=<% %>=}}{<%baseName%>}<%={{ }}=%>", with: {{paramName}}PostEscape, options: .literal, range: nil){{/pathParams}} + let URLString = {{projectName}}API.basePath + path + {{#bodyParam}} + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: {{paramName}}) + {{/bodyParam}} + {{^bodyParam}} + {{#hasFormParams}} + let formParams: [String:Any?] = [ + {{#formParams}} + {{> _param}}{{#hasMore}},{{/hasMore}} + {{/formParams}} + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + {{/hasFormParams}} + {{^hasFormParams}} + let parameters: [String:Any]? = nil + {{/hasFormParams}} + {{/bodyParam}}{{#hasQueryParams}} + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([{{^queryParams}}:{{/queryParams}} + {{#queryParams}} + {{> _param}}{{#hasMore}}, {{/hasMore}} + {{/queryParams}} + ]){{/hasQueryParams}}{{^hasQueryParams}} + let url = URLComponents(string: URLString){{/hasQueryParams}}{{#headerParams}}{{^secondaryParam}} + let nillableHeaders: [String: Any?] = [{{/secondaryParam}} + {{> _param}}{{#hasMore}},{{/hasMore}}{{^hasMore}} + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders){{/hasMore}}{{/headerParams}} + + let requestBuilder: RequestBuilder<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>.Type = {{projectName}}API.requestBuilderFactory.{{#returnType}}getBuilder(){{/returnType}}{{^returnType}}getNonDecodableBuilder(){{/returnType}} + + return requestBuilder.init(method: "{{httpMethod}}", URLString: (url?.string ?? URLString), parameters: parameters, isBody: {{hasBodyParam}}{{#headerParams}}{{^secondaryParam}}, headers: headerParameters{{/secondaryParam}}{{/headerParams}}) + } + +{{/operation}} +} +{{#swiftUseApiNamespace}} +} +{{/swiftUseApiNamespace}} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/swift5/api_doc.mustache b/modules/openapi-generator/src/main/resources/swift5/api_doc.mustache new file mode 100644 index 0000000000..c08e36fa55 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/api_doc.mustache @@ -0,0 +1,97 @@ +# {{classname}}{{#description}} +{{description}}{{/description}} + +All URIs are relative to *{{{basePath}}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} +# **{{{operationId}}}** +```swift +{{^usePromiseKit}} +{{^useRxSwift}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{#hasParams}}, {{/hasParams}}completion: @escaping (_ data: {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}?, _ error: Error?) -> Void) +{{/useRxSwift}} +{{/usePromiseKit}} +{{#usePromiseKit}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}} {{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> +{{/usePromiseKit}} +{{#useRxSwift}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class func {{operationId}}({{#allParams}}{{paramName}}: {{#isEnum}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{^isContainer}}{{{datatypeWithEnum}}}_{{operationId}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) -> Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> +{{/useRxSwift}} +``` + +{{{summary}}}{{#notes}} + +{{{notes}}}{{/notes}} + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import {{{projectName}}} + +{{#allParams}}let {{paramName}} = {{{vendorExtensions.x-swift-example}}} // {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} +{{/allParams}} + +{{^usePromiseKit}} +{{^useRxSwift}} +{{#summary}} +// {{{.}}} +{{/summary}} +{{classname}}.{{{operationId}}}({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +{{/useRxSwift}} +{{/usePromiseKit}} +{{#usePromiseKit}} +{{#summary}} +// {{{.}}} +{{/summary}} +{{classname}}.{{{operationId}}}({{#allParams}}{{paramName}}: {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +{{/usePromiseKit}} +{{#useRxSwift}} +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +{{/useRxSwift}} +``` + +### Parameters +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}} +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}Void (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + + - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} + - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +{{/operation}} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/swift5/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/swift5/git_push.sh.mustache new file mode 100755 index 0000000000..8b3f689c91 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/git_push.sh.mustache @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="{{{gitHost}}}" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="{{{gitUserId}}}" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="{{{gitRepoId}}}" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="{{{releaseNote}}}" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/modules/openapi-generator/src/main/resources/swift5/gitignore.mustache b/modules/openapi-generator/src/main/resources/swift5/gitignore.mustache new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/gitignore.mustache @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache new file mode 100644 index 0000000000..675d55a4fa --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache @@ -0,0 +1,378 @@ +// AlamofireImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +class AlamofireRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return AlamofireRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return AlamofireDecodableRequestBuilder.self + } +} + +// Store manager to retain its reference +private var managerStore = SynchronizedDictionary() + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class AlamofireRequestBuilder: RequestBuilder { + required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the session + configuration. + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createSessionManager() -> Alamofire.SessionManager { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + return Alamofire.SessionManager(configuration: configuration) + } + + /** + May be overridden by a subclass if you want to custom request constructor. + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLRequest() -> URLRequest? { + let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } + return try? encoding.encode(originalRequest, with: parameters) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the request + configuration (e.g. to override the cache policy). + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) -> DataRequest { + return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) + } + + override {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + let managerId:String = UUID().uuidString + // Create a new manager for each request to customize its request header + let manager = createSessionManager() + managerStore[managerId] = manager + + let encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + + let xMethod = Alamofire.HTTPMethod(rawValue: method) + let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } + .map { $0.0 } + + if fileKeys.count > 0 { + manager.upload(multipartFormData: { mpForm in + for (k, v) in self.parameters! { + switch v { + case let fileURL as URL: + if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { + mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) + } + else { + mpForm.append(fileURL, withName: k) + } + case let string as String: + mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) + case let number as NSNumber: + mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in + switch encodingResult { + case .success(let upload, _, _): + if let onProgressReady = self.onProgressReady { + onProgressReady(upload.uploadProgress) + } + self.processRequest(request: upload, managerId, apiResponseQueue, completion) + case .failure(let encodingError): + apiResponseQueue.async{ + completion(.failure(ErrorResponse.error(415, nil, encodingError))) + } + } + }) + } else { + let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) + if let onProgressReady = self.onProgressReady { + onProgressReady(request.progress) + } + processRequest(request: request, managerId, apiResponseQueue, completion) + } + + } + + fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + managerStore[managerId] = nil + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { (stringResponse) in + cleanupRequest() + + switch stringResponse.result { + case let .success(value): + completion(.success(Response(response: stringResponse.response!, body: value as? T))) + case let .failure(error): + completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, error))) + } + + }) + case is URL.Type: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in + cleanupRequest() + + do { + + guard !dataResponse.result.isFailure else { + throw DownloadException.responseFailed + } + + guard let data = dataResponse.data else { + throw DownloadException.responseDataMissing + } + + guard let request = request.request else { + throw DownloadException.requestMissing + } + + let fileManager = FileManager.default + let urlRequest = try request.asURLRequest() + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: dataResponse.response!, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, dataResponse.data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, dataResponse.data, error))) + } + return + }) + case is Void.Type: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (voidResponse) in + cleanupRequest() + + switch voidResponse.result { + case .success: + completion(.success(Response(response: voidResponse.response!, body: nil))) + case let .failure(error): + completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, error))) + } + + }) + default: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in + cleanupRequest() + + switch dataResponse.result { + case .success: + completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T))) + case let .failure(error): + completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, error))) + } + + }) + } + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func buildHeaders() -> [String: String] { + var httpHeaders = SessionManager.defaultHTTPHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename : String? = nil + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with:"") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url : URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { + + override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + managerStore[managerId] = nil + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { (stringResponse) in + cleanupRequest() + + switch stringResponse.result { + case let .success(value): + completion(.success(Response(response: stringResponse.response!, body: value as? T))) + case let .failure(error): + completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, error))) + } + + }) + case is Void.Type: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (voidResponse) in + cleanupRequest() + + switch voidResponse.result { + case .success: + completion(.success(Response(response: voidResponse.response!, body: nil))) + case let .failure(error): + completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, error))) + } + + }) + case is Data.Type: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in + cleanupRequest() + + switch dataResponse.result { + case .success: + completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T))) + case let .failure(error): + completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, error))) + } + + }) + default: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in + cleanupRequest() + + guard dataResponse.result.isSuccess else { + completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!))) + return + } + + guard let data = dataResponse.data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(-1, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + guard let httpResponse = dataResponse.response else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + + }) + } + } + +} + +extension JSONDataEncoding: ParameterEncoding { + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + let urlRequest = try urlRequest.asURLRequest() + + return self.encode(urlRequest, with: parameters) + } +} diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache new file mode 100644 index 0000000000..d649f25535 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache @@ -0,0 +1,544 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class URLSessionRequestBuilder: RequestBuilder { + + let progress = Progress() + + private var observation: NSKeyValueObservation? + + deinit { + observation?.invalidate() + } + + fileprivate let sessionDelegate = SessionDelegate() + + /** + May be assigned if you want to control the authentication challenges. + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - intercept and handle errors like authorization + - retry the request. + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? + + required {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(method: String, URLString: String, parameters: [String : Any]?, isBody: Bool, headers: [String : String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the URLSession + configuration. + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + + guard let url = URL(string: URLString) else { + throw DownloadException.requestMissingURL + } + + var originalRequest = URLRequest(url: url) + + originalRequest.httpMethod = method.rawValue + + buildHeaders().forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + headers.forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) + + return modifiedRequest + } + + override {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func execute(_ apiResponseQueue: DispatchQueue = {{projectName}}API.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { + let urlSessionId:String = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + let parameters: [String: Any] = self.parameters ?? [:] + + let fileKeys = parameters.filter { $1 is NSURL } + .map { $0.0 } + + let encoding: ParameterEncoding + if fileKeys.count > 0 { + encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) + } else if isBody { + encoding = JSONDataEncoding() + } else { + encoding = URLEncoding() + } + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsuported Http method - \(method)") + } + + let cleanupRequest = { + urlSessionStore[urlSessionId] = nil + self.observation?.invalidate() + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in + + guard let self = self else { return } + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in + + guard let self = self else { return } + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { + observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in + self.progress.totalUnitCount = newProgress.totalUnitCount + self.progress.completedUnitCount = newProgress.completedUnitCount + } + + onProgressReady?(progress) + } + + dataTask.resume() + + } catch { + apiResponseQueue.async { + cleanupRequest() + completion(.failure(ErrorResponse.error(415, nil, error))) + } + } + + } + + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: httpResponse, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, data, error))) + } + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} func buildHeaders() -> [String: String] { + var httpHeaders = {{projectName}}API.customHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename : String? = nil + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with:"") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url : URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}open{{/nonPublicApi}} class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + case is Data.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + guard let data = data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + } + } +} + +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + + var credential: URLCredential? + + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +fileprivate class FileUploadEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + for (k, v) in parameters ?? [:] { + switch v { + case let fileURL as URL: + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: fileURL.lastPathComponent, data: fileData, mimeType: mimetype) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, name: String, data: Data, mimeType: String?) -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody ?? Data() + + // https://stackoverflow.com/a/26163136/976628 + let boundary = "Boundary-\(UUID().uuidString)" + urlRequest.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") + + body.append("--\(boundary)\r\n") + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(name)\"\r\n") + + if let mimeType = mimeType { + body.append("Content-Type: \(mimeType)\r\n\r\n") + } + + body.append(data) + + body.append("\r\n") + + body.append("--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +fileprivate extension Data { + /// Append string to NSMutableData + /// + /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to NSData, and then add that data to the NSMutableData, this wraps it in a nice convenient little extension to NSMutableData. This converts using UTF-8. + /// + /// - parameter string: The string to be added to the `NSMutableData`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/modules/openapi-generator/src/main/resources/swift5/model.mustache b/modules/openapi-generator/src/main/resources/swift5/model.mustache new file mode 100644 index 0000000000..6534ca945f --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/model.mustache @@ -0,0 +1,24 @@ +{{#models}}{{#model}}// +// {{classname}}.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +{{#description}} +/** {{description}} */{{/description}} +{{#isArrayModel}} +{{> modelArray}} +{{/isArrayModel}} +{{^isArrayModel}} +{{#isEnum}} +{{> modelEnum}} +{{/isEnum}} +{{^isEnum}} +{{> modelObject}} +{{/isEnum}} +{{/isArrayModel}} +{{/model}} +{{/models}} diff --git a/modules/openapi-generator/src/main/resources/swift5/modelArray.mustache b/modules/openapi-generator/src/main/resources/swift5/modelArray.mustache new file mode 100644 index 0000000000..536c5e9eea --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/modelArray.mustache @@ -0,0 +1 @@ +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} typealias {{classname}} = {{parent}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift5/modelEnum.mustache b/modules/openapi-generator/src/main/resources/swift5/modelEnum.mustache new file mode 100644 index 0000000000..b10347d63d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/modelEnum.mustache @@ -0,0 +1,7 @@ +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{classname}}: {{dataType}}, Codable, CaseIterable { +{{#allowableValues}} +{{#enumVars}} + case {{name}} = {{{value}}} +{{/enumVars}} +{{/allowableValues}} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift5/modelInlineEnumDeclaration.mustache b/modules/openapi-generator/src/main/resources/swift5/modelInlineEnumDeclaration.mustache new file mode 100644 index 0000000000..1c749e0b6c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/modelInlineEnumDeclaration.mustache @@ -0,0 +1,7 @@ + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum {{enumName}}: {{^isContainer}}{{dataType}}{{/isContainer}}{{#isContainer}}String{{/isContainer}}, Codable, CaseIterable { + {{#allowableValues}} + {{#enumVars}} + case {{name}} = {{{value}}} + {{/enumVars}} + {{/allowableValues}} + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache new file mode 100644 index 0000000000..f937bde2b8 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache @@ -0,0 +1,84 @@ +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct {{classname}}: Codable { + +{{#allVars}} +{{#isEnum}} +{{> modelInlineEnumDeclaration}} +{{/isEnum}} +{{/allVars}} +{{#allVars}} +{{#isEnum}} + {{#description}}/** {{description}} */ + {{/description}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} +{{/isEnum}} +{{^isEnum}} + {{#description}}/** {{description}} */ + {{/description}}{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}: {{{datatype}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}} + {{#objcCompatible}} + {{#vendorExtensions.x-swift-optional-scalar}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var {{name}}Num: NSNumber? { + get { + return {{name}}.map({ return NSNumber(value: $0) }) + } + } + {{/vendorExtensions.x-swift-optional-scalar}} + {{/objcCompatible}} +{{/isEnum}} +{{/allVars}} + +{{#hasVars}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init({{#allVars}}{{name}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allVars}}) { + {{#allVars}} + self.{{name}} = {{name}} + {{/allVars}} + } +{{/hasVars}} +{{#additionalPropertiesType}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var additionalProperties: [String:{{{additionalPropertiesType}}}] = [:] + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} subscript(key: String) -> {{{additionalPropertiesType}}}? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + {{#allVars}} + try container.encode{{#required}}{{#isNullable}}IfPresent{{/isNullable}}{{/required}}{{^required}}IfPresent{{/required}}({{{name}}}, forKey: "{{{baseName}}}") + {{/allVars}} + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + {{#allVars}} + {{name}} = try container.decode{{#required}}{{#isNullable}}IfPresent{{/isNullable}}{{/required}}{{^required}}IfPresent{{/required}}({{{datatypeWithEnum}}}.self, forKey: "{{{baseName}}}") + {{/allVars}} + var nonAdditionalPropertyKeys = Set() + {{#allVars}} + nonAdditionalPropertyKeys.insert("{{{baseName}}}") + {{/allVars}} + additionalProperties = try container.decodeMap({{{additionalPropertiesType}}}.self, excludedKeys: nonAdditionalPropertyKeys) + } + +{{/additionalPropertiesType}} +{{^additionalPropertiesType}}{{#vendorExtensions.x-codegen-has-escaped-property-names}} + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} enum CodingKeys: String, CodingKey, CaseIterable { {{#allVars}} + case {{name}}{{#vendorExtensions.x-codegen-escaped-property-name}} = "{{{baseName}}}"{{/vendorExtensions.x-codegen-escaped-property-name}}{{/allVars}} + } +{{/vendorExtensions.x-codegen-has-escaped-property-names}}{{/additionalPropertiesType}} +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache b/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache new file mode 100644 index 0000000000..d3e4ecf5c7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/swift5/model_doc.mustache @@ -0,0 +1,11 @@ +{{#models}}{{#model}}# {{classname}} + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isContainer}}[**{{dataType}}**]({{complexType}}.md){{/isContainer}}{{#isContainer}}{{{dataType}}}{{/isContainer}}{{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{/vars}} + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java new file mode 100644 index 0000000000..477b79c9e5 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java @@ -0,0 +1,89 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.options; + +import com.google.common.collect.ImmutableMap; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.languages.Swift5Codegen; + +import java.util.Map; + +public class Swift5OptionsProvider implements OptionsProvider { + public static final String SORT_PARAMS_VALUE = "false"; + public static final String SORT_MODEL_PROPERTIES_VALUE = "false"; + public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true"; + public static final String PROJECT_NAME_VALUE = "Swagger"; + public static final String RESPONSE_AS_VALUE = "test"; + public static final String NON_PUBLIC_API_REQUIRED_VALUE = "false"; + public static final String OBJC_COMPATIBLE_VALUE = "false"; + public static final String LENIENT_TYPE_CAST_VALUE = "false"; + public static final String POD_SOURCE_VALUE = "{ :git => 'git@github.com:swagger-api/swagger-mustache.git'," + + " :tag => 'v1.0.0-SNAPSHOT' }"; + public static final String POD_VERSION_VALUE = "v1.0.0-SNAPSHOT"; + public static final String POD_AUTHORS_VALUE = "podAuthors"; + public static final String POD_SOCIAL_MEDIA_URL_VALUE = "podSocialMediaURL"; + public static final String POD_LICENSE_VALUE = "'Apache License, Version 2.0'"; + public static final String POD_HOMEPAGE_VALUE = "podHomepage"; + public static final String POD_SUMMARY_VALUE = "podSummary"; + public static final String POD_DESCRIPTION_VALUE = "podDescription"; + public static final String POD_SCREENSHOTS_VALUE = "podScreenshots"; + public static final String POD_DOCUMENTATION_URL_VALUE = "podDocumentationURL"; + public static final String SWIFT_USE_API_NAMESPACE_VALUE = "swiftUseApiNamespace"; + public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false"; + public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true"; + public static final String LIBRARY_VALUE = "alamofire"; + + @Override + public String getLanguage() { + return "swift5"; + } + + @Override + public Map createOptions() { + ImmutableMap.Builder builder = new ImmutableMap.Builder(); + return builder.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, SORT_PARAMS_VALUE) + .put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, SORT_MODEL_PROPERTIES_VALUE) + .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) + .put(Swift5Codegen.PROJECT_NAME, PROJECT_NAME_VALUE) + .put(Swift5Codegen.RESPONSE_AS, RESPONSE_AS_VALUE) + .put(CodegenConstants.NON_PUBLIC_API, NON_PUBLIC_API_REQUIRED_VALUE) + .put(Swift5Codegen.OBJC_COMPATIBLE, OBJC_COMPATIBLE_VALUE) + .put(Swift5Codegen.LENIENT_TYPE_CAST, LENIENT_TYPE_CAST_VALUE) + .put(Swift5Codegen.POD_SOURCE, POD_SOURCE_VALUE) + .put(CodegenConstants.POD_VERSION, POD_VERSION_VALUE) + .put(Swift5Codegen.POD_AUTHORS, POD_AUTHORS_VALUE) + .put(Swift5Codegen.POD_SOCIAL_MEDIA_URL, POD_SOCIAL_MEDIA_URL_VALUE) + .put(Swift5Codegen.POD_LICENSE, POD_LICENSE_VALUE) + .put(Swift5Codegen.POD_HOMEPAGE, POD_HOMEPAGE_VALUE) + .put(Swift5Codegen.POD_SUMMARY, POD_SUMMARY_VALUE) + .put(Swift5Codegen.POD_DESCRIPTION, POD_DESCRIPTION_VALUE) + .put(Swift5Codegen.POD_SCREENSHOTS, POD_SCREENSHOTS_VALUE) + .put(Swift5Codegen.POD_DOCUMENTATION_URL, POD_DOCUMENTATION_URL_VALUE) + .put(Swift5Codegen.SWIFT_USE_API_NAMESPACE, SWIFT_USE_API_NAMESPACE_VALUE) + .put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true") + .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) + .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) + .put(CodegenConstants.LIBRARY, LIBRARY_VALUE) + .build(); + } + + @Override + public boolean isServer() { + return false; + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5CodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5CodegenTest.java new file mode 100644 index 0000000000..9d57d0e109 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5CodegenTest.java @@ -0,0 +1,147 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.swift5; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Operation; +import org.openapitools.codegen.CodegenOperation; +import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.languages.Swift5Codegen; +import org.testng.Assert; +import org.testng.annotations.Test; + + +public class Swift5CodegenTest { + + Swift5Codegen swiftCodegen = new Swift5Codegen(); + + @Test(enabled = true) + public void testCapitalizedReservedWord() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("AS", null), "_as"); + } + + @Test(enabled = true) + public void testReservedWord() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("Public", null), "_public"); + } + + @Test(enabled = true) + public void shouldNotBreakNonReservedWord() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("Error", null), "error"); + } + + @Test(enabled = true) + public void shouldNotBreakCorrectName() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("EntryName", null), "entryName"); + } + + @Test(enabled = true) + public void testSingleWordAllCaps() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("VALUE", null), "value"); + } + + @Test(enabled = true) + public void testSingleWordLowercase() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("value", null), "value"); + } + + @Test(enabled = true) + public void testCapitalsWithUnderscore() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("ENTRY_NAME", null), "entryName"); + } + + @Test(enabled = true) + public void testCapitalsWithDash() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("ENTRY-NAME", null), "entryName"); + } + + @Test(enabled = true) + public void testCapitalsWithSpace() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("ENTRY NAME", null), "entryName"); + } + + @Test(enabled = true) + public void testLowercaseWithUnderscore() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("entry_name", null), "entryName"); + } + + @Test(enabled = true) + public void testStartingWithNumber() throws Exception { + Assert.assertEquals(swiftCodegen.toEnumVarName("123EntryName", null), "_123entryName"); + Assert.assertEquals(swiftCodegen.toEnumVarName("123Entry_name", null), "_123entryName"); + Assert.assertEquals(swiftCodegen.toEnumVarName("123EntryName123", null), "_123entryName123"); + } + + @Test(description = "returns Data when response format is binary", enabled = true) + public void binaryDataTest() { + // TODO update json file + + final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/binaryDataTest.json"); + final DefaultCodegen codegen = new Swift5Codegen(); + codegen.setOpenAPI(openAPI); + final String path = "/tests/binaryResponse"; + final Operation p = openAPI.getPaths().get(path).getPost(); + final CodegenOperation op = codegen.fromOperation(path, "post", p, null); + + Assert.assertEquals(op.returnType, "URL"); + Assert.assertEquals(op.bodyParam.dataType, "URL"); + Assert.assertTrue(op.bodyParam.isBinary); + Assert.assertTrue(op.responses.get(0).isBinary); + } + + @Test(description = "returns Date when response format is date", enabled = true) + public void dateTest() { + final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/datePropertyTest.json"); + final DefaultCodegen codegen = new Swift5Codegen(); + codegen.setOpenAPI(openAPI); + final String path = "/tests/dateResponse"; + final Operation p = openAPI.getPaths().get(path).getPost(); + final CodegenOperation op = codegen.fromOperation(path, "post", p, null); + + Assert.assertEquals(op.returnType, "Date"); + Assert.assertEquals(op.bodyParam.dataType, "Date"); + } + + @Test(enabled = true) + public void testDefaultPodAuthors() throws Exception { + // Given + + // When + swiftCodegen.processOpts(); + + // Then + final String podAuthors = (String) swiftCodegen.additionalProperties().get(Swift5Codegen.POD_AUTHORS); + Assert.assertEquals(podAuthors, Swift5Codegen.DEFAULT_POD_AUTHORS); + } + + @Test(enabled = true) + public void testPodAuthors() throws Exception { + // Given + final String openAPIDevs = "OpenAPI Devs"; + swiftCodegen.additionalProperties().put(Swift5Codegen.POD_AUTHORS, openAPIDevs); + + // When + swiftCodegen.processOpts(); + + // Then + final String podAuthors = (String) swiftCodegen.additionalProperties().get(Swift5Codegen.POD_AUTHORS); + Assert.assertEquals(podAuthors, openAPIDevs); + } + +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java new file mode 100644 index 0000000000..d5faa7e045 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java @@ -0,0 +1,133 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.swift5; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.IntegerSchema; +import io.swagger.v3.oas.models.media.NumberSchema; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.StringSchema; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.languages.Swift5Codegen; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.math.BigDecimal; +import java.util.Arrays; + +@SuppressWarnings("static-method") +public class Swift5ModelEnumTest { + @Test(description = "convert a java model with an string enum and a default value") + public void convertStringDefaultValueTest() { + final StringSchema enumSchema = new StringSchema(); + enumSchema.setEnum(Arrays.asList("VALUE1", "VALUE2", "VALUE3")); + enumSchema.setDefault("VALUE2"); + final Schema model = new Schema().type("object").addProperties("name", enumSchema); + + final DefaultCodegen codegen = new Swift5Codegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty enumVar = cm.vars.get(0); + Assert.assertEquals(enumVar.baseName, "name"); + Assert.assertEquals(enumVar.dataType, "String"); + Assert.assertEquals(enumVar.datatypeWithEnum, "Name"); + Assert.assertEquals(enumVar.name, "name"); + Assert.assertEquals(enumVar.defaultValue, ".value2"); + Assert.assertEquals(enumVar.baseType, "String"); + Assert.assertTrue(enumVar.isEnum); + } + + @Test(description = "convert a java model with an reserved word string enum and a default value") + public void convertReservedWordStringDefaultValueTest() { + final StringSchema enumSchema = new StringSchema(); + enumSchema.setEnum(Arrays.asList("1st", "2nd", "3rd")); + enumSchema.setDefault("2nd"); + final Schema model = new Schema().type("object").addProperties("name", enumSchema); + + final DefaultCodegen codegen = new Swift5Codegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty enumVar = cm.vars.get(0); + Assert.assertEquals(enumVar.baseName, "name"); + Assert.assertEquals(enumVar.dataType, "String"); + Assert.assertEquals(enumVar.datatypeWithEnum, "Name"); + Assert.assertEquals(enumVar.name, "name"); + Assert.assertEquals(enumVar.defaultValue, "._2nd"); + Assert.assertEquals(enumVar.baseType, "String"); + Assert.assertTrue(enumVar.isEnum); + } + + @Test(description = "convert a java model with an integer enum and a default value") + public void convertIntegerDefaultValueTest() { + final IntegerSchema enumSchema = new IntegerSchema(); + enumSchema.setEnum(Arrays.asList(1, 2, 3)); + enumSchema.setDefault(2); + final Schema model = new Schema().type("object").addProperties("name", enumSchema); + + final DefaultCodegen codegen = new Swift5Codegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty enumVar = cm.vars.get(0); + Assert.assertEquals(enumVar.baseName, "name"); + Assert.assertEquals(enumVar.dataType, "Int"); + Assert.assertEquals(enumVar.datatypeWithEnum, "Name"); + Assert.assertEquals(enumVar.name, "name"); + Assert.assertEquals(enumVar.defaultValue, "._2"); + Assert.assertEquals(enumVar.baseType, "Int"); + Assert.assertTrue(enumVar.isEnum); + } + + @Test(description = "convert a java model with an number enum and a default value") + public void convertNumberDefaultValueTest() { + final NumberSchema enumSchema = new NumberSchema(); + enumSchema.setEnum(Arrays.asList(new BigDecimal(10), new BigDecimal(100), new BigDecimal(1000))); + enumSchema.setDefault(new BigDecimal((100))); + final Schema model = new Schema().type("object").addProperties("name", enumSchema); + + final DefaultCodegen codegen = new Swift5Codegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty enumVar = cm.vars.get(0); + Assert.assertEquals(enumVar.baseName, "name"); + Assert.assertEquals(enumVar.dataType, "Double"); + Assert.assertEquals(enumVar.datatypeWithEnum, "Name"); + Assert.assertEquals(enumVar.name, "name"); + Assert.assertEquals(enumVar.defaultValue, "._100"); + Assert.assertEquals(enumVar.baseType, "Double"); + Assert.assertTrue(enumVar.isEnum); + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelTest.java new file mode 100644 index 0000000000..3917716565 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelTest.java @@ -0,0 +1,132 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.swift5; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.*; +import io.swagger.v3.parser.util.SchemaTypeUtil; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenProperty; +import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.languages.Swift5Codegen; +import org.testng.Assert; +import org.testng.annotations.Test; + +@SuppressWarnings("static-method") +public class Swift5ModelTest { + + @Test(description = "convert a simple java model", enabled = true) + public void simpleModelTest() { + final Schema schema = new Schema() + .description("a sample model") + .addProperties("id", new IntegerSchema().format(SchemaTypeUtil.INTEGER64_FORMAT)) + .addProperties("name", new StringSchema()) + .addProperties("createdAt", new DateTimeSchema()) + .addProperties("binary", new BinarySchema()) + .addProperties("byte", new ByteArraySchema()) + .addProperties("uuid", new UUIDSchema()) + .addProperties("dateOfBirth", new DateSchema()) + .addRequiredItem("id") + .addRequiredItem("name") + .discriminator(new Discriminator().propertyName("test")); + final DefaultCodegen codegen = new Swift5Codegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", schema); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 7); + Assert.assertEquals(cm.getDiscriminatorName(),"test"); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "id"); + Assert.assertEquals(property1.dataType, "Int64"); + Assert.assertEquals(property1.name, "id"); + Assert.assertNull(property1.defaultValue); + Assert.assertEquals(property1.baseType, "Int64"); + Assert.assertTrue(property1.hasMore); + Assert.assertTrue(property1.required); + Assert.assertTrue(property1.isPrimitiveType); + Assert.assertFalse(property1.isContainer); + + final CodegenProperty property2 = cm.vars.get(1); + Assert.assertEquals(property2.baseName, "name"); + Assert.assertEquals(property2.dataType, "String"); + Assert.assertEquals(property2.name, "name"); + Assert.assertNull(property2.defaultValue); + Assert.assertEquals(property2.baseType, "String"); + Assert.assertTrue(property2.hasMore); + Assert.assertTrue(property2.required); + Assert.assertTrue(property2.isPrimitiveType); + Assert.assertFalse(property2.isContainer); + + final CodegenProperty property3 = cm.vars.get(2); + Assert.assertEquals(property3.baseName, "createdAt"); + Assert.assertEquals(property3.dataType, "Date"); + Assert.assertEquals(property3.name, "createdAt"); + Assert.assertNull(property3.defaultValue); + Assert.assertEquals(property3.baseType, "Date"); + Assert.assertTrue(property3.hasMore); + Assert.assertFalse(property3.required); + Assert.assertFalse(property3.isContainer); + + final CodegenProperty property4 = cm.vars.get(3); + Assert.assertEquals(property4.baseName, "binary"); + Assert.assertEquals(property4.dataType, "URL"); + Assert.assertEquals(property4.name, "binary"); + Assert.assertNull(property4.defaultValue); + Assert.assertEquals(property4.baseType, "URL"); + Assert.assertTrue(property4.hasMore); + Assert.assertFalse(property4.required); + Assert.assertFalse(property4.isContainer); + + final CodegenProperty property5 = cm.vars.get(4); + Assert.assertEquals(property5.baseName, "byte"); + Assert.assertEquals(property5.dataType, "Data"); + Assert.assertEquals(property5.name, "byte"); + Assert.assertNull(property5.defaultValue); + Assert.assertEquals(property5.baseType, "Data"); + Assert.assertTrue(property5.hasMore); + Assert.assertFalse(property5.required); + Assert.assertFalse(property5.isContainer); + + final CodegenProperty property6 = cm.vars.get(5); + Assert.assertEquals(property6.baseName, "uuid"); + Assert.assertEquals(property6.dataType, "UUID"); + Assert.assertEquals(property6.name, "uuid"); + Assert.assertNull(property6.defaultValue); + Assert.assertEquals(property6.baseType, "UUID"); + Assert.assertTrue(property6.hasMore); + Assert.assertFalse(property6.required); + Assert.assertFalse(property6.isContainer); + + final CodegenProperty property7 = cm.vars.get(6); + Assert.assertEquals(property7.baseName, "dateOfBirth"); + Assert.assertEquals(property7.dataType, "Date"); + Assert.assertEquals(property7.name, "dateOfBirth"); + Assert.assertNull(property7.defaultValue); + Assert.assertEquals(property7.baseType, "Date"); + Assert.assertFalse(property7.hasMore); + Assert.assertFalse(property7.required); + Assert.assertFalse(property7.isContainer); + } + +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java new file mode 100644 index 0000000000..845f9d4db0 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.swift5; + +import mockit.Expectations; +import mockit.Tested; +import org.openapitools.codegen.AbstractOptionsTest; +import org.openapitools.codegen.CodegenConfig; +import org.openapitools.codegen.languages.Swift5Codegen; +import org.openapitools.codegen.options.Swift5OptionsProvider; + +public class Swift5OptionsTest extends AbstractOptionsTest { + + @Tested + private Swift5Codegen clientCodegen; + + public Swift5OptionsTest() { + super(new Swift5OptionsProvider()); + } + + @Override + protected CodegenConfig getCodegenConfig() { + return clientCodegen; + } + + @SuppressWarnings("unused") + @Override + protected void setExpectations() { + new Expectations(clientCodegen) {{ + clientCodegen.setSortParamsByRequiredFlag(Boolean.valueOf(Swift5OptionsProvider.SORT_PARAMS_VALUE)); + times = 1; + clientCodegen.setProjectName(Swift5OptionsProvider.PROJECT_NAME_VALUE); + times = 1; + clientCodegen.setResponseAs(Swift5OptionsProvider.RESPONSE_AS_VALUE.split(",")); + times = 1; + clientCodegen.setNonPublicApi(Boolean.valueOf(Swift5OptionsProvider.NON_PUBLIC_API_REQUIRED_VALUE)); + times = 1; + clientCodegen.setObjcCompatible(Boolean.valueOf(Swift5OptionsProvider.OBJC_COMPATIBLE_VALUE)); + times = 1; + clientCodegen.setLenientTypeCast(Boolean.valueOf(Swift5OptionsProvider.LENIENT_TYPE_CAST_VALUE)); + times = 1; + clientCodegen.setPrependFormOrBodyParameters(Boolean.valueOf(Swift5OptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE)); + times = 1; + }}; + } +} diff --git a/modules/openapi-generator/src/test/resources/2_0/swift5Test.json b/modules/openapi-generator/src/test/resources/2_0/swift5Test.json new file mode 100644 index 0000000000..54673cb1a9 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/2_0/swift5Test.json @@ -0,0 +1,466 @@ +{ + "swagger": "2.0", + "info": { + "title": "Swift 5 Test Schema", + "description": "This is a test schema which exercises Swagger schema features for testing the swift5 language codegen module.", + "termsOfService": "These are the dummy Terms of Service for the swift5 test schema.", + "contact": { + "name": "John Doe", + "url": "http://www.example.com", + "email": "jdoe@example.com" + }, + "license": { + "name": "This is the license name for the swift5 test schema.", + "url": "http://www.example.com" + }, + "version": "1.0" + }, + "host": "api.example.com", + "basePath": "/basePath", + "schemes": [ + "http", + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + { + "name": "Swift5Test" + } + ], + "externalDocs": { + "description": "Look in this doc for further information.", + "url": "https://www.example.com/doc/index.html" + }, + "paths": { + "/allModels": { + "get": { + "tags": [ + "Swift5Test" + ], + "summary": "Get all of the models", + "description": "This endpoint tests get a dictionary which contains examples of all of the models.", + "operationId": "GetAllModels", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "client_id", + "in": "query", + "description": "id that represent the Api client", + "required": true, + "type": "string", + "x-example": "swagger_ui" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/GetAllModelsResult" + } + }, + "400": { + "description": "Invalid client input", + "schema": { + "$ref": "#/definitions/ErrorInfo" + } + }, + "424": { + "description": "Timeout", + "schema": { + "$ref": "#/definitions/ErrorInfo" + } + }, + "500": { + "description": "Unexpected Server Error", + "schema": { + "$ref": "#/definitions/ErrorInfo" + } + } + } + } + } + }, + "definitions": { + "StringEnum": { + "type": "string", + "enum": [ + "stringEnumValue1", + "stringEnumValue2", + "stringEnumValue3" + ] + }, + "AllPrimitives": { + "type": "object", + "properties": { + "myInteger": { + "type": "integer" + }, + "myIntegerArray": { + "type": "array", + "items": { + "type": "integer" + } + }, + "myLong": { + "type": "integer", + "format": "int64" + }, + "myLongArray": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "myFloat": { + "type": "number", + "format": "float" + }, + "myFloatArray": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "myDouble": { + "type": "number", + "format": "double" + }, + "myDoubleArray": { + "type": "array", + "items": { + "type": "number", + "format": "double" + } + }, + "myString": { + "type": "string" + }, + "myStringArray": { + "type": "array", + "items": { + "type": "string" + } + }, + "myBytes": { + "type": "string", + "format": "byte" + }, + "myBytesArray": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + } + }, + "myBoolean": { + "type": "boolean" + }, + "myBooleanArray": { + "type": "array", + "items": { + "type": "boolean" + } + }, + "myDate": { + "type": "string", + "format": "date" + }, + "myDateArray": { + "type": "array", + "items": { + "type": "string", + "format": "date" + } + }, + "myDateTime": { + "type": "string", + "format": "date-time" + }, + "myDateTimeArray": { + "type": "array", + "items": { + "type": "string", + "format": "date-time" + } + }, + "myFile": { + "type": "file" + }, + "myFileArray": { + "type": "array", + "items": { + "type": "file" + } + }, + "myUUID": { + "type": "string", + "format": "uuid" + }, + "myUUIDArray": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "myStringEnum": { + "$ref": "#/definitions/StringEnum" + }, + "myStringEnumArray": { + "type": "array", + "items": { + "$ref": "#/definitions/StringEnum" + } + }, + "myInlineStringEnum": { + "type": "string", + "enum": [ + "inlineStringEnumValue1", + "inlineStringEnumValue2", + "inlineStringEnumValue3" + ] + } + }, + "description": "Object which contains lots of different primitive OpenAPI types" + }, + "ErrorInfo": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "Example Error object" + }, + "ModelStringArray": { + "type": "array", + "description": "This defines an array of strings.", + "items": { + "type": "string" + } + }, + "ModelDoubleArray": { + "type": "array", + "description": "This defines an array of doubles.", + "items": { + "type": "number", + "format": "double" + } + }, + "ModelErrorInfoArray": { + "type": "array", + "description": "This defines an array of ErrorInfo objects.", + "items": { + "$ref": "#/definitions/ErrorInfo" + } + }, + "VariableNameTest": { + "description": "This object contains property names which we know will be different from their variable name. Examples of this include snake case property names and property names which are Swift 5 reserved words.", + "type": "object", + "properties": { + "example_name": { + "description": "This snake-case examle_name property name should be converted to a camelCase variable name like exampleName", + "type": "string" + }, + "for": { + "description": "This property name is a reserved word in most languages, including Swift 5.", + "type": "string" + }, + "normalName": { + "description": "This model object property name should be unchanged from the JSON property name.", + "type": "string" + } + } + }, + "GetAllModelsResult": { + "type": "object", + "properties": { + "myPrimitiveArray": { + "type": "array", + "items": { + "$ref": "#/definitions/AllPrimitives" + } + }, + "myPrimitive": { + "$ref": "#/definitions/AllPrimitives" + }, + "myVariableNameTest": { + "$ref": "#/definitions/VariableNameTest" + } + }, + "description": "Response object containing AllPrimitives object" + }, + "ModelWithStringAdditionalPropertiesOnly": { + "description": "This is an empty model with no properties and only additionalProperties of type string", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "ModelWithIntAdditionalPropertiesOnly": { + "description": "This is an empty model with no properties and only additionalProperties of type int32", + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + } + }, + "ModelWithPropertiesAndAdditionalProperties": { + "description": "This is an empty model with no properties and only additionalProperties of type int32", + "type": "object", + "required": [ + "myIntegerReq", + "myPrimitiveReq", + "myStringArrayReq", + "myPrimitiveArrayReq" + ], + "properties": { + "myIntegerReq": { + "type": "integer" + }, + "myIntegerOpt": { + "type": "integer" + }, + "myPrimitiveReq": { + "$ref": "#/definitions/AllPrimitives" + }, + "myPrimitiveOpt": { + "$ref": "#/definitions/AllPrimitives" + }, + "myStringArrayReq": { + "type": "array", + "items": { + "type": "string" + } + }, + "myStringArrayOpt": { + "type": "array", + "items": { + "type": "string" + } + }, + "myPrimitiveArrayReq": { + "type": "array", + "items": { + "$ref": "#/definitions/AllPrimitives" + } + }, + "myPrimitiveArrayOpt": { + "type": "array", + "items": { + "$ref": "#/definitions/AllPrimitives" + } + } + }, + "additionalProperties": { + "type": "string" + } + }, + "SampleBase": { + "type": "object", + "description": "This is a base class object from which other classes will derive.", + "properties": { + "baseClassStringProp": { + "type": "string" + }, + "baseClassIntegerProp": { + "type": "integer", + "format": "int32" + } + } + }, + "SampleSubClass": { + "description": "This is a subclass defived from the SampleBase class.", + "allOf": [ + { + "$ref": "#/definitions/SampleBase" + }, + { + "type": "object", + "properties": { + "subClassStringProp": { + "type": "string" + }, + "subClassIntegerProp": { + "type": "integer", + "format": "int32" + } + } + } + ] + }, + "BaseCard": { + "type": "object", + "description": "This is a base card object which uses a 'cardType' discriminator.", + "x-unit-tests": ["B45"], + "discriminator": "cardType", + "required": [ + "cardType" + ], + "properties": { + "cardType": { + "type": "string" + } + } + }, + "PersonCard": { + "description": "This is a card object for a Person derived from BaseCard.", + "x-unit-tests": ["B45"], + "allOf": [ + { + "$ref": "#/definitions/BaseCard" + }, + { + "type": "object", + "properties": { + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + } + } + } + ] + }, + "PlaceCard": { + "description": "This is a card object for a Person derived from BaseCard.", + "x-unit-tests": ["B45"], + "allOf": [ + { + "$ref": "#/definitions/BaseCard" + }, + { + "type": "object", + "properties": { + "placeName": { + "type": "string" + }, + "placeAddress": { + "type": "string" + } + } + } + ] + } + } +} diff --git a/pom.xml b/pom.xml index 19b04f0890..a7e0101d63 100644 --- a/pom.xml +++ b/pom.xml @@ -1310,6 +1310,9 @@ + samples/client/petstore/swift5/default/SwaggerClientTests + samples/client/petstore/swift5/promisekit/SwaggerClientTests + samples/client/petstore/swift5/rxswift/SwaggerClientTests samples/client/petstore/swift4/default/SwaggerClientTests samples/client/petstore/swift4/promisekit/SwaggerClientTests samples/client/petstore/swift4/rxswift/SwaggerClientTests diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 2e354e5418..bff5744506 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -5,8 +5,8 @@ // class APIHelper { - static func rejectNil(source: [String:AnyObject?]) -> [String:AnyObject]? { - var destination = [String:AnyObject]() + static func rejectNil(source: [String: AnyObject?]) -> [String: AnyObject]? { + var destination = [String: AnyObject]() for (key, nillableValue) in source { if let value: AnyObject = nillableValue { destination[key] = value @@ -19,8 +19,8 @@ class APIHelper { return destination } - static func rejectNilHeaders(source: [String:AnyObject?]) -> [String:String] { - var destination = [String:String]() + static func rejectNilHeaders(source: [String: AnyObject?]) -> [String: String] { + var destination = [String: String]() for (key, nillableValue) in source { if let value: AnyObject = nillableValue { destination[key] = "\(value)" @@ -29,11 +29,11 @@ class APIHelper { return destination } - static func convertBoolToString(source: [String: AnyObject]?) -> [String:AnyObject]? { + static func convertBoolToString(source: [String: AnyObject]?) -> [String: AnyObject]? { guard let source = source else { return nil } - var destination = [String:AnyObject]() + var destination = [String: AnyObject]() let theTrue = NSNumber(bool: true) let theFalse = NSNumber(bool: false) for (key, value) in source { diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs.swift index 1c2511ded5..676a325d49 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,7 +9,7 @@ import Foundation public class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io/v2" public static var credential: NSURLCredential? - public static var customHeaders: [String:String] = [:] + public static var customHeaders: [String: String] = [:] static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() } @@ -18,44 +18,44 @@ public class APIBase { let encoded: AnyObject? = encodable?.encodeToJSON() if encoded! is [AnyObject] { - var dictionary = [String:AnyObject]() + var dictionary = [String: AnyObject]() for (index, item) in (encoded as! [AnyObject]).enumerate() { dictionary["\(index)"] = item } return dictionary } else { - return encoded as? [String:AnyObject] + return encoded as? [String: AnyObject] } } } public class RequestBuilder { var credential: NSURLCredential? - var headers: [String:String] - let parameters: [String:AnyObject]? + var headers: [String: String] + let parameters: [String: AnyObject]? let isBody: Bool let method: String let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((NSProgress) -> ())? - required public init(method: String, URLString: String, parameters: [String:AnyObject]?, isBody: Bool, headers: [String:String] = [:]) { + /// Optional block to obtain a reference to the request's progress instance when available. + public var onProgressReady: ((NSProgress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: AnyObject]?, isBody: Bool, headers: [String: String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters self.isBody = isBody self.headers = headers - + addHeaders(PetstoreClientAPI.customHeaders) } - - public func addHeaders(aHeaders:[String:String]) { + + public func addHeaders(aHeaders: [String: String]) { for (header, value) in aHeaders { headers[header] = value } } - + public func execute(completion: (response: Response?, error: ErrorType?) -> Void) { } public func addHeader(name name: String, value: String) -> Self { @@ -64,7 +64,7 @@ public class RequestBuilder { } return self } - + public func addCredential() -> Self { self.credential = PetstoreClientAPI.credential return self @@ -74,4 +74,3 @@ public class RequestBuilder { protocol RequestBuilderFactory { func getBuilder() -> RequestBuilder.Type } - diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index bb190adbd4..9c663a5fab 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,8 +7,6 @@ import Alamofire - - public class PetAPI: APIBase { /** Add a new pet to the store @@ -17,12 +15,11 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func addPet(pet pet: Pet? = nil, completion: ((error: ErrorType?) -> Void)) { - addPetWithRequestBuilder(pet: pet).execute { (response, error) -> Void in - completion(error: error); + addPetWithRequestBuilder(pet: pet).execute { (_, error) -> Void in + completion(error: error) } } - /** Add a new pet to the store - POST /pet - OAuth: @@ -35,10 +32,10 @@ public class PetAPI: APIBase { public class func addPetWithRequestBuilder(pet pet: Pet? = nil) -> RequestBuilder { let path = "/pet" let URLString = PetstoreClientAPI.basePath + path - let parameters = pet?.encodeToJSON() as? [String:AnyObject] - + let parameters = pet?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -52,12 +49,11 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func deletePet(petId petId: Int64, apiKey: String? = nil, completion: ((error: ErrorType?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in - completion(error: error); + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + completion(error: error) } } - /** Deletes a pet - DELETE /pet/{petId} - OAuth: @@ -73,16 +69,16 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) let nillableHeaders: [String: AnyObject?] = [ "api_key": apiKey ] let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "DELETE", URLString: URLString, parameters: convertedParameters, isBody: true, headers: headerParameters) @@ -96,11 +92,10 @@ public class PetAPI: APIBase { */ public class func findPetsByStatus(status status: [String]? = nil, completion: ((data: [Pet]?, error: ErrorType?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } - /** Finds Pets by status - GET /pet/findByStatus @@ -167,14 +162,14 @@ public class PetAPI: APIBase { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "status": status ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -188,11 +183,10 @@ public class PetAPI: APIBase { */ public class func findPetsByTags(tags tags: [String]? = nil, completion: ((data: [Pet]?, error: ErrorType?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } - /** Finds Pets by tags - GET /pet/findByTags @@ -259,14 +253,14 @@ public class PetAPI: APIBase { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "tags": tags ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -280,11 +274,10 @@ public class PetAPI: APIBase { */ public class func getPetById(petId petId: Int64, completion: ((data: Pet?, error: ErrorType?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } - /** Find pet by ID - GET /pet/{petId} @@ -355,12 +348,12 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -373,12 +366,11 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func updatePet(pet pet: Pet? = nil, completion: ((error: ErrorType?) -> Void)) { - updatePetWithRequestBuilder(pet: pet).execute { (response, error) -> Void in - completion(error: error); + updatePetWithRequestBuilder(pet: pet).execute { (_, error) -> Void in + completion(error: error) } } - /** Update an existing pet - PUT /pet - OAuth: @@ -391,10 +383,10 @@ public class PetAPI: APIBase { public class func updatePetWithRequestBuilder(pet pet: Pet? = nil) -> RequestBuilder { let path = "/pet" let URLString = PetstoreClientAPI.basePath + path - let parameters = pet?.encodeToJSON() as? [String:AnyObject] - + let parameters = pet?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "PUT", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -409,12 +401,11 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func updatePetWithForm(petId petId: String, name: String? = nil, status: String? = nil, completion: ((error: ErrorType?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in - completion(error: error); + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + completion(error: error) } } - /** Updates a pet in the store with form data - POST /pet/{petId} - OAuth: @@ -431,15 +422,15 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "name": name, "status": status ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -454,12 +445,11 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func uploadFile(petId petId: Int64, additionalMetadata: String? = nil, file: NSURL? = nil, completion: ((error: ErrorType?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - completion(error: error); + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (_, error) -> Void in + completion(error: error) } } - /** uploads an image - POST /pet/{petId}/uploadImage - OAuth: @@ -476,15 +466,15 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "additionalMetadata": additionalMetadata, "file": file ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: false) diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 8a3133a8f8..b745aad140 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,8 +7,6 @@ import Alamofire - - public class StoreAPI: APIBase { /** Delete purchase order by ID @@ -17,12 +15,11 @@ public class StoreAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func deleteOrder(orderId orderId: String, completion: ((error: ErrorType?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(error: error); + deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + completion(error: error) } } - /** Delete purchase order by ID - DELETE /store/order/{orderId} @@ -35,12 +32,12 @@ public class StoreAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{orderId}", withString: "\(orderId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "DELETE", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -51,13 +48,12 @@ public class StoreAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ - public class func getInventory(completion: ((data: [String:Int32]?, error: ErrorType?) -> Void)) { + public class func getInventory(completion: ((data: [String: Int32]?, error: ErrorType?) -> Void)) { getInventoryWithRequestBuilder().execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } - /** Returns pet inventories by status - GET /store/inventory @@ -67,17 +63,17 @@ public class StoreAPI: APIBase { - returns: RequestBuilder<[String:Int32]> */ - public class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int32]> { + public class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int32]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - - let requestBuilder: RequestBuilder<[String:Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + let requestBuilder: RequestBuilder<[String: Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) } @@ -90,11 +86,10 @@ public class StoreAPI: APIBase { */ public class func getOrderById(orderId orderId: String, completion: ((data: Order?, error: ErrorType?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } - /** Find purchase order by ID - GET /store/order/{orderId} @@ -137,12 +132,12 @@ public class StoreAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{orderId}", withString: "\(orderId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -156,11 +151,10 @@ public class StoreAPI: APIBase { */ public class func placeOrder(order order: Order? = nil, completion: ((data: Order?, error: ErrorType?) -> Void)) { placeOrderWithRequestBuilder(order: order).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } - /** Place an order for a pet - POST /store/order - examples: [{contentType=application/json, example={ @@ -200,10 +194,10 @@ public class StoreAPI: APIBase { public class func placeOrderWithRequestBuilder(order order: Order? = nil) -> RequestBuilder { let path = "/store/order" let URLString = PetstoreClientAPI.basePath + path - let parameters = order?.encodeToJSON() as? [String:AnyObject] - + let parameters = order?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index fa0db1bc52..0f5a31fee5 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,8 +7,6 @@ import Alamofire - - public class UserAPI: APIBase { /** Create user @@ -17,12 +15,11 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func createUser(user user: User? = nil, completion: ((error: ErrorType?) -> Void)) { - createUserWithRequestBuilder(user: user).execute { (response, error) -> Void in - completion(error: error); + createUserWithRequestBuilder(user: user).execute { (_, error) -> Void in + completion(error: error) } } - /** Create user - POST /user @@ -33,10 +30,10 @@ public class UserAPI: APIBase { public class func createUserWithRequestBuilder(user user: User? = nil) -> RequestBuilder { let path = "/user" let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -49,12 +46,11 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func createUsersWithArrayInput(user user: [User]? = nil, completion: ((error: ErrorType?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(user: user).execute { (response, error) -> Void in - completion(error: error); + createUsersWithArrayInputWithRequestBuilder(user: user).execute { (_, error) -> Void in + completion(error: error) } } - /** Creates list of users with given input array - POST /user/createWithArray - parameter user: (body) List of user object (optional) @@ -64,10 +60,10 @@ public class UserAPI: APIBase { public class func createUsersWithArrayInputWithRequestBuilder(user user: [User]? = nil) -> RequestBuilder { let path = "/user/createWithArray" let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -80,12 +76,11 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func createUsersWithListInput(user user: [User]? = nil, completion: ((error: ErrorType?) -> Void)) { - createUsersWithListInputWithRequestBuilder(user: user).execute { (response, error) -> Void in - completion(error: error); + createUsersWithListInputWithRequestBuilder(user: user).execute { (_, error) -> Void in + completion(error: error) } } - /** Creates list of users with given input array - POST /user/createWithList - parameter user: (body) List of user object (optional) @@ -95,10 +90,10 @@ public class UserAPI: APIBase { public class func createUsersWithListInputWithRequestBuilder(user user: [User]? = nil) -> RequestBuilder { let path = "/user/createWithList" let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -111,12 +106,11 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func deleteUser(username username: String, completion: ((error: ErrorType?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(error: error); + deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + completion(error: error) } } - /** Delete user - DELETE /user/{username} @@ -129,12 +123,12 @@ public class UserAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "DELETE", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -148,11 +142,10 @@ public class UserAPI: APIBase { */ public class func getUserByName(username username: String, completion: ((data: User?, error: ErrorType?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } - /** Get user by user name - GET /user/{username} - examples: [{contentType=application/json, example={ @@ -202,12 +195,12 @@ public class UserAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -222,11 +215,10 @@ public class UserAPI: APIBase { */ public class func loginUser(username username: String? = nil, password: String? = nil, completion: ((data: String?, error: ErrorType?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } - /** Logs user into the system - GET /user/login - parameter username: (query) The user name for login (optional) @@ -238,15 +230,15 @@ public class UserAPI: APIBase { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "username": username, "password": password ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -258,12 +250,11 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func logoutUser(completion: ((error: ErrorType?) -> Void)) { - logoutUserWithRequestBuilder().execute { (response, error) -> Void in - completion(error: error); + logoutUserWithRequestBuilder().execute { (_, error) -> Void in + completion(error: error) } } - /** Logs out current logged in user session - GET /user/logout @@ -273,12 +264,12 @@ public class UserAPI: APIBase { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -292,12 +283,11 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func updateUser(username username: String, user: User? = nil, completion: ((error: ErrorType?) -> Void)) { - updateUserWithRequestBuilder(username: username, user: user).execute { (response, error) -> Void in - completion(error: error); + updateUserWithRequestBuilder(username: username, user: user).execute { (_, error) -> Void in + completion(error: error) } } - /** Updated user - PUT /user/{username} @@ -310,10 +300,10 @@ public class UserAPI: APIBase { var path = "/user/{username}" path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "PUT", URLString: URLString, parameters: convertedParameters, isBody: true) diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index 6752df2dfc..38e0a086d7 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -41,7 +41,7 @@ public struct SynchronizedDictionary { private var managerStore = SynchronizedDictionary() class AlamofireRequestBuilder: RequestBuilder { - required init(method: String, URLString: String, parameters: [String : AnyObject]?, isBody: Bool, headers: [String : String] = [:]) { + required init(method: String, URLString: String, parameters: [String: AnyObject]?, isBody: Bool, headers: [String: String] = [:]) { super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) } diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift index c04e734a7c..603983e248 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -50,7 +50,7 @@ extension Array: JSONEncodable { extension Dictionary: JSONEncodable { func encodeToJSON() -> AnyObject { - var dictionary = [NSObject:AnyObject]() + var dictionary = [NSObject: AnyObject]() for (key, value) in self { dictionary[key as! NSObject] = encodeIfPossible(value) } @@ -114,7 +114,7 @@ public final class ISOFullDate: CustomStringConvertible { [ .Year, .Month, - .Day, + .Day ], fromDate: date ) @@ -175,5 +175,3 @@ extension ISOFullDate: JSONEncodable { return "\(year)-\(month)-\(day)" } } - - diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models.swift index 37d49d13e2..774bb1737b 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,7 +10,7 @@ protocol JSONEncodable { func encodeToJSON() -> AnyObject } -public enum ErrorResponse : ErrorType { +public enum ErrorResponse: ErrorType { case Error(Int, NSData?, ErrorType) } @@ -27,7 +27,7 @@ public class Response { public convenience init(response: NSHTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String:String]() + var header = [String: String]() for case let (key, value) as (String, String) in rawHeader { header[key] = value } @@ -37,7 +37,7 @@ public class Response { private var once = dispatch_once_t() class Decoders { - static private var decoders = Dictionary AnyObject)>() + static private var decoders = [String: ((AnyObject) -] AnyObject)>() static func addDecoder(clazz clazz: T.Type, decoder: ((AnyObject) -> T)) { let key = "\(T.self)" @@ -49,9 +49,9 @@ class Decoders { return array.map { Decoders.decode(clazz: T.self, source: $0) } } - static func decode(clazz clazz: [Key:T].Type, source: AnyObject) -> [Key:T] { + static func decode(clazz clazz: [Key: T].Type, source: AnyObject) -> [Key: T] { let sourceDictionary = source as! [Key: AnyObject] - var dictionary = [Key:T]() + var dictionary = [Key: T]() for (key, value) in sourceDictionary { dictionary[key] = Decoders.decode(clazz: T.self, source: value) } @@ -61,10 +61,10 @@ class Decoders { static func decode(clazz clazz: T.Type, source: AnyObject) -> T { initialize() if T.self is Int32.Type && source is NSNumber { - return source.intValue as! T; + return source.intValue as! T } if T.self is Int64.Type && source is NSNumber { - return source.longLongValue as! T; + return source.longLongValue as! T } if T.self is NSUUID.Type && source is String { return NSUUID(UUIDString: source as! String) as! T @@ -102,11 +102,11 @@ class Decoders { } } - static func decodeOptional(clazz clazz: [Key:T].Type, source: AnyObject?) -> [Key:T]? { + static func decodeOptional(clazz clazz: [Key: T].Type, source: AnyObject?) -> [Key: T]? { if source is NSNull { return nil } - return source.map { (someSource: AnyObject) -> [Key:T] in + return source.map { (someSource: AnyObject) -> [Key: T] in Decoders.decode(clazz: clazz, source: someSource) } } @@ -121,7 +121,7 @@ class Decoders { "yyyy-MM-dd'T'HH:mm:ss.SSS" ].map { (format: String) -> NSDateFormatter in let formatter = NSDateFormatter() - formatter.locale = NSLocale(localeIdentifier:"en_US_POSIX") + formatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") formatter.dateFormat = format return formatter } @@ -149,7 +149,7 @@ class Decoders { return isoDate } fatalError("formatter failed to parse \(source)") - }) + }) // Decoder for [Category] Decoders.addDecoder(clazz: [Category].self) { (source: AnyObject) -> [Category] in @@ -157,71 +157,67 @@ class Decoders { } // Decoder for Category Decoders.addDecoder(clazz: Category.self) { (source: AnyObject) -> Category in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Category() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) return instance } - // Decoder for [Order] Decoders.addDecoder(clazz: [Order].self) { (source: AnyObject) -> [Order] in return Decoders.decode(clazz: [Order].self, source: source) } // Decoder for Order Decoders.addDecoder(clazz: Order.self) { (source: AnyObject) -> Order in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Order() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.petId = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["petId"]) instance.quantity = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["quantity"]) instance.shipDate = Decoders.decodeOptional(clazz: NSDate.self, source: sourceDictionary["shipDate"]) - instance.status = Order.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") + instance.status = Order.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") instance.complete = Decoders.decodeOptional(clazz: Bool.self, source: sourceDictionary["complete"]) return instance } - // Decoder for [Pet] Decoders.addDecoder(clazz: [Pet].self) { (source: AnyObject) -> [Pet] in return Decoders.decode(clazz: [Pet].self, source: source) } // Decoder for Pet Decoders.addDecoder(clazz: Pet.self) { (source: AnyObject) -> Pet in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Pet() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.category = Decoders.decodeOptional(clazz: Category.self, source: sourceDictionary["category"]) instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) instance.photoUrls = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["photoUrls"]) instance.tags = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["tags"]) - instance.status = Pet.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") + instance.status = Pet.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") return instance } - // Decoder for [Tag] Decoders.addDecoder(clazz: [Tag].self) { (source: AnyObject) -> [Tag] in return Decoders.decode(clazz: [Tag].self, source: source) } // Decoder for Tag Decoders.addDecoder(clazz: Tag.self) { (source: AnyObject) -> Tag in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Tag() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) return instance } - // Decoder for [User] Decoders.addDecoder(clazz: [User].self) { (source: AnyObject) -> [User] in return Decoders.decode(clazz: [User].self, source: source) } // Decoder for User Decoders.addDecoder(clazz: User.self) { (source: AnyObject) -> User in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = User() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.username = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["username"]) diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index ea5e47f3cf..b3cbea28b6 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,6 @@ import Foundation - public class Category: JSONEncodable { public var id: Int64? public var name: String? @@ -16,10 +15,10 @@ public class Category: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["name"] = self.name - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 90dfd94122..bb7860b948 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,9 +7,8 @@ import Foundation - public class Order: JSONEncodable { - public enum Status: String { + public enum Status: String { case Placed = "placed" case Approved = "approved" case Delivered = "delivered" @@ -26,14 +25,14 @@ public class Order: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["petId"] = self.petId?.encodeToJSON() nillableDictionary["quantity"] = self.quantity?.encodeToJSON() nillableDictionary["shipDate"] = self.shipDate?.encodeToJSON() nillableDictionary["status"] = self.status?.rawValue nillableDictionary["complete"] = self.complete - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index f24e12684e..5fa39ec431 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,9 +7,8 @@ import Foundation - public class Pet: JSONEncodable { - public enum Status: String { + public enum Status: String { case Available = "available" case Pending = "pending" case Sold = "sold" @@ -26,14 +25,14 @@ public class Pet: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["category"] = self.category?.encodeToJSON() nillableDictionary["name"] = self.name nillableDictionary["photoUrls"] = self.photoUrls?.encodeToJSON() nillableDictionary["tags"] = self.tags?.encodeToJSON() nillableDictionary["status"] = self.status?.rawValue - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index d79d8df25e..df2d12e84f 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,6 @@ import Foundation - public class Tag: JSONEncodable { public var id: Int64? public var name: String? @@ -16,10 +15,10 @@ public class Tag: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["name"] = self.name - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift index c4032cd386..d24a215441 100644 --- a/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,6 @@ import Foundation - public class User: JSONEncodable { public var id: Int64? public var username: String? @@ -23,7 +22,7 @@ public class User: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["username"] = self.username nillableDictionary["firstName"] = self.firstName @@ -32,7 +31,7 @@ public class User: JSONEncodable { nillableDictionary["password"] = self.password nillableDictionary["phone"] = self.phone nillableDictionary["userStatus"] = self.userStatus?.encodeToJSON() - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift index 3769667ad9..c3770b6a19 100644 --- a/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift +++ b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift @@ -13,7 +13,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true @@ -41,6 +40,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } - } - diff --git a/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/ViewController.swift index cd7e9a1676..8dad16b10f 100644 --- a/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/ViewController.swift +++ b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClient/ViewController.swift @@ -20,6 +20,4 @@ class ViewController: UIViewController { // Dispose of any resources that can be recreated. } - } - diff --git a/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/ISOFullDateTests.swift b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/ISOFullDateTests.swift index 67d841cc7c..762eb0b260 100644 --- a/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/ISOFullDateTests.swift +++ b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/ISOFullDateTests.swift @@ -27,7 +27,7 @@ final class ISOFullDateTests: XCTestCase { [ .Year, .Month, - .Day, + .Day ], fromDate: date ) @@ -62,7 +62,7 @@ final class ISOFullDateTests: XCTestCase { [ .Year, .Month, - .Day, + .Day ], fromDate: date ) diff --git a/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift index 7446c53aa3..439641b908 100644 --- a/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -11,22 +11,22 @@ import XCTest @testable import SwaggerClient class PetAPITests: XCTestCase { - + let testTimeout = 10.0 override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } - + override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } - + func test1CreatePet() { let expectation = self.expectationWithDescription("testCreatePet") - + let newPet = Pet() let category = PetstoreClient.Category() category.id = 1234 @@ -35,42 +35,42 @@ class PetAPITests: XCTestCase { newPet.id = 1000 newPet.name = "Fluffy" newPet.status = .Available - + PetAPI.addPet(body: newPet) { (error) in guard error == nil else { XCTFail("error creating pet") return } - + expectation.fulfill() } - + self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test2GetPet() { let expectation = self.expectationWithDescription("testGetPet") - + PetAPI.getPetById(petId: 1000) { (pet, error) in guard error == nil else { XCTFail("error retrieving pet") return } - + if let pet = pet { XCTAssert(pet.id == 1000, "invalid id") XCTAssert(pet.name == "Fluffy", "invalid name") - + expectation.fulfill() } } - + self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test3DeletePet() { let expectation = self.expectationWithDescription("testDeletePet") - + PetAPI.deletePet(petId: 1000) { (error) in guard error == nil else { XCTFail("error deleting pet") @@ -79,7 +79,7 @@ class PetAPITests: XCTestCase { expectation.fulfill() } - + self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } diff --git a/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift index ba235ca32d..10aa63bd05 100644 --- a/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift +++ b/samples/client/petstore/swift/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift @@ -13,13 +13,13 @@ import XCTest class StoreAPITests: XCTestCase { let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - + let testTimeout = 10.0 func test1PlaceOrder() { let expectation = self.expectationWithDescription("testPlaceOrder") let shipDate = NSDate() - + let newOrder = Order() newOrder.id = 1000 newOrder.petId = 1000 @@ -28,51 +28,51 @@ class StoreAPITests: XCTestCase { newOrder.shipDate = shipDate // use explicit naming to reference the enum so that we test we don't regress on enum naming newOrder.status = Order.Status.Placed - + StoreAPI.placeOrder(body: newOrder) { (order, error) in guard error == nil else { XCTFail("error placing order: \(error.debugDescription)") return } - + if let order = order { XCTAssert(order.id == 1000, "invalid id") XCTAssert(order.quantity == 10, "invalid quantity") XCTAssert(order.status == .Placed, "invalid status") XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat), "Date should be idempotent") - + expectation.fulfill() } } - + self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test2GetOrder() { let expectation = self.expectationWithDescription("testGetOrder") - + StoreAPI.getOrderById(orderId: "1000") { (order, error) in guard error == nil else { XCTFail("error retrieving order: \(error.debugDescription)") return } - + if let order = order { XCTAssert(order.id == 1000, "invalid id") XCTAssert(order.quantity == 10, "invalid quantity") XCTAssert(order.status == .Placed, "invalid status") - + expectation.fulfill() } } - + self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test3DeleteOrder() { let expectation = self.expectationWithDescription("testDeleteOrder") - + StoreAPI.deleteOrder(orderId: "1000") { (error) in guard error == nil else { XCTFail("error deleting order") @@ -81,7 +81,7 @@ class StoreAPITests: XCTestCase { expectation.fulfill() } - + self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } @@ -94,7 +94,7 @@ class StoreAPITests: XCTestCase { progressExpectation.fulfill() } - requestBuilder.execute { (response, error) in + requestBuilder.execute { (_, _) in responseExpectation.fulfill() } diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 2e354e5418..bff5744506 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -5,8 +5,8 @@ // class APIHelper { - static func rejectNil(source: [String:AnyObject?]) -> [String:AnyObject]? { - var destination = [String:AnyObject]() + static func rejectNil(source: [String: AnyObject?]) -> [String: AnyObject]? { + var destination = [String: AnyObject]() for (key, nillableValue) in source { if let value: AnyObject = nillableValue { destination[key] = value @@ -19,8 +19,8 @@ class APIHelper { return destination } - static func rejectNilHeaders(source: [String:AnyObject?]) -> [String:String] { - var destination = [String:String]() + static func rejectNilHeaders(source: [String: AnyObject?]) -> [String: String] { + var destination = [String: String]() for (key, nillableValue) in source { if let value: AnyObject = nillableValue { destination[key] = "\(value)" @@ -29,11 +29,11 @@ class APIHelper { return destination } - static func convertBoolToString(source: [String: AnyObject]?) -> [String:AnyObject]? { + static func convertBoolToString(source: [String: AnyObject]?) -> [String: AnyObject]? { guard let source = source else { return nil } - var destination = [String:AnyObject]() + var destination = [String: AnyObject]() let theTrue = NSNumber(bool: true) let theFalse = NSNumber(bool: false) for (key, value) in source { diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs.swift index 1c2511ded5..676a325d49 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,7 +9,7 @@ import Foundation public class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io/v2" public static var credential: NSURLCredential? - public static var customHeaders: [String:String] = [:] + public static var customHeaders: [String: String] = [:] static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() } @@ -18,44 +18,44 @@ public class APIBase { let encoded: AnyObject? = encodable?.encodeToJSON() if encoded! is [AnyObject] { - var dictionary = [String:AnyObject]() + var dictionary = [String: AnyObject]() for (index, item) in (encoded as! [AnyObject]).enumerate() { dictionary["\(index)"] = item } return dictionary } else { - return encoded as? [String:AnyObject] + return encoded as? [String: AnyObject] } } } public class RequestBuilder { var credential: NSURLCredential? - var headers: [String:String] - let parameters: [String:AnyObject]? + var headers: [String: String] + let parameters: [String: AnyObject]? let isBody: Bool let method: String let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((NSProgress) -> ())? - required public init(method: String, URLString: String, parameters: [String:AnyObject]?, isBody: Bool, headers: [String:String] = [:]) { + /// Optional block to obtain a reference to the request's progress instance when available. + public var onProgressReady: ((NSProgress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: AnyObject]?, isBody: Bool, headers: [String: String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters self.isBody = isBody self.headers = headers - + addHeaders(PetstoreClientAPI.customHeaders) } - - public func addHeaders(aHeaders:[String:String]) { + + public func addHeaders(aHeaders: [String: String]) { for (header, value) in aHeaders { headers[header] = value } } - + public func execute(completion: (response: Response?, error: ErrorType?) -> Void) { } public func addHeader(name name: String, value: String) -> Self { @@ -64,7 +64,7 @@ public class RequestBuilder { } return self } - + public func addCredential() -> Self { self.credential = PetstoreClientAPI.credential return self @@ -74,4 +74,3 @@ public class RequestBuilder { protocol RequestBuilderFactory { func getBuilder() -> RequestBuilder.Type } - diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index d7402b3861..82516e4732 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -8,8 +8,6 @@ import Alamofire import PromiseKit - - public class PetAPI: APIBase { /** Add a new pet to the store @@ -18,8 +16,8 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func addPet(pet pet: Pet? = nil, completion: ((error: ErrorType?) -> Void)) { - addPetWithRequestBuilder(pet: pet).execute { (response, error) -> Void in - completion(error: error); + addPetWithRequestBuilder(pet: pet).execute { (_, error) -> Void in + completion(error: error) } } @@ -53,10 +51,10 @@ public class PetAPI: APIBase { public class func addPetWithRequestBuilder(pet pet: Pet? = nil) -> RequestBuilder { let path = "/pet" let URLString = PetstoreClientAPI.basePath + path - let parameters = pet?.encodeToJSON() as? [String:AnyObject] - + let parameters = pet?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -70,8 +68,8 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func deletePet(petId petId: Int64, apiKey: String? = nil, completion: ((error: ErrorType?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in - completion(error: error); + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + completion(error: error) } } @@ -109,16 +107,16 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) let nillableHeaders: [String: AnyObject?] = [ "api_key": apiKey ] let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "DELETE", URLString: URLString, parameters: convertedParameters, isBody: true, headers: headerParameters) @@ -132,7 +130,7 @@ public class PetAPI: APIBase { */ public class func findPetsByStatus(status status: [String]? = nil, completion: ((data: [Pet]?, error: ErrorType?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -220,14 +218,14 @@ public class PetAPI: APIBase { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "status": status ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -241,7 +239,7 @@ public class PetAPI: APIBase { */ public class func findPetsByTags(tags tags: [String]? = nil, completion: ((data: [Pet]?, error: ErrorType?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -329,14 +327,14 @@ public class PetAPI: APIBase { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "tags": tags ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -350,7 +348,7 @@ public class PetAPI: APIBase { */ public class func getPetById(petId petId: Int64, completion: ((data: Pet?, error: ErrorType?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -442,12 +440,12 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -460,8 +458,8 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func updatePet(pet pet: Pet? = nil, completion: ((error: ErrorType?) -> Void)) { - updatePetWithRequestBuilder(pet: pet).execute { (response, error) -> Void in - completion(error: error); + updatePetWithRequestBuilder(pet: pet).execute { (_, error) -> Void in + completion(error: error) } } @@ -495,10 +493,10 @@ public class PetAPI: APIBase { public class func updatePetWithRequestBuilder(pet pet: Pet? = nil) -> RequestBuilder { let path = "/pet" let URLString = PetstoreClientAPI.basePath + path - let parameters = pet?.encodeToJSON() as? [String:AnyObject] - + let parameters = pet?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "PUT", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -513,8 +511,8 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func updatePetWithForm(petId petId: String, name: String? = nil, status: String? = nil, completion: ((error: ErrorType?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in - completion(error: error); + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + completion(error: error) } } @@ -554,15 +552,15 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "name": name, "status": status ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -577,8 +575,8 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func uploadFile(petId petId: Int64, additionalMetadata: String? = nil, file: NSURL? = nil, completion: ((error: ErrorType?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - completion(error: error); + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (_, error) -> Void in + completion(error: error) } } @@ -618,15 +616,15 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "additionalMetadata": additionalMetadata, "file": file ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: false) diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 3f3834a042..9f2fd4ee26 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -8,8 +8,6 @@ import Alamofire import PromiseKit - - public class StoreAPI: APIBase { /** Delete purchase order by ID @@ -18,8 +16,8 @@ public class StoreAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func deleteOrder(orderId orderId: String, completion: ((error: ErrorType?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(error: error); + deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + completion(error: error) } } @@ -53,12 +51,12 @@ public class StoreAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{orderId}", withString: "\(orderId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "DELETE", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -69,9 +67,9 @@ public class StoreAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ - public class func getInventory(completion: ((data: [String:Int32]?, error: ErrorType?) -> Void)) { + public class func getInventory(completion: ((data: [String: Int32]?, error: ErrorType?) -> Void)) { getInventoryWithRequestBuilder().execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -80,9 +78,9 @@ public class StoreAPI: APIBase { - returns: Promise<[String:Int32]> */ - public class func getInventory() -> Promise<[String:Int32]> { - let deferred = Promise<[String:Int32]>.pendingPromise() - getInventory() { data, error in + public class func getInventory() -> Promise<[String: Int32]> { + let deferred = Promise<[String: Int32]>.pendingPromise() + getInventory { data, error in if let error = error { deferred.reject(error) } else { @@ -101,17 +99,17 @@ public class StoreAPI: APIBase { - returns: RequestBuilder<[String:Int32]> */ - public class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int32]> { + public class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int32]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - - let requestBuilder: RequestBuilder<[String:Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + let requestBuilder: RequestBuilder<[String: Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) } @@ -124,7 +122,7 @@ public class StoreAPI: APIBase { */ public class func getOrderById(orderId orderId: String, completion: ((data: Order?, error: ErrorType?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -188,12 +186,12 @@ public class StoreAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{orderId}", withString: "\(orderId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -207,7 +205,7 @@ public class StoreAPI: APIBase { */ public class func placeOrder(order order: Order? = nil, completion: ((data: Order?, error: ErrorType?) -> Void)) { placeOrderWithRequestBuilder(order: order).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -268,10 +266,10 @@ public class StoreAPI: APIBase { public class func placeOrderWithRequestBuilder(order order: Order? = nil) -> RequestBuilder { let path = "/store/order" let URLString = PetstoreClientAPI.basePath + path - let parameters = order?.encodeToJSON() as? [String:AnyObject] - + let parameters = order?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index d5ebe76cfe..f1030ea587 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -8,8 +8,6 @@ import Alamofire import PromiseKit - - public class UserAPI: APIBase { /** Create user @@ -18,8 +16,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func createUser(user user: User? = nil, completion: ((error: ErrorType?) -> Void)) { - createUserWithRequestBuilder(user: user).execute { (response, error) -> Void in - completion(error: error); + createUserWithRequestBuilder(user: user).execute { (_, error) -> Void in + completion(error: error) } } @@ -51,10 +49,10 @@ public class UserAPI: APIBase { public class func createUserWithRequestBuilder(user user: User? = nil) -> RequestBuilder { let path = "/user" let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -67,8 +65,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func createUsersWithArrayInput(user user: [User]? = nil, completion: ((error: ErrorType?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(user: user).execute { (response, error) -> Void in - completion(error: error); + createUsersWithArrayInputWithRequestBuilder(user: user).execute { (_, error) -> Void in + completion(error: error) } } @@ -99,10 +97,10 @@ public class UserAPI: APIBase { public class func createUsersWithArrayInputWithRequestBuilder(user user: [User]? = nil) -> RequestBuilder { let path = "/user/createWithArray" let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -115,8 +113,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func createUsersWithListInput(user user: [User]? = nil, completion: ((error: ErrorType?) -> Void)) { - createUsersWithListInputWithRequestBuilder(user: user).execute { (response, error) -> Void in - completion(error: error); + createUsersWithListInputWithRequestBuilder(user: user).execute { (_, error) -> Void in + completion(error: error) } } @@ -147,10 +145,10 @@ public class UserAPI: APIBase { public class func createUsersWithListInputWithRequestBuilder(user user: [User]? = nil) -> RequestBuilder { let path = "/user/createWithList" let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -163,8 +161,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func deleteUser(username username: String, completion: ((error: ErrorType?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(error: error); + deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + completion(error: error) } } @@ -198,12 +196,12 @@ public class UserAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "DELETE", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -217,7 +215,7 @@ public class UserAPI: APIBase { */ public class func getUserByName(username username: String, completion: ((data: User?, error: ErrorType?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -288,12 +286,12 @@ public class UserAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -308,7 +306,7 @@ public class UserAPI: APIBase { */ public class func loginUser(username username: String? = nil, password: String? = nil, completion: ((data: String?, error: ErrorType?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -342,15 +340,15 @@ public class UserAPI: APIBase { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "username": username, "password": password ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -362,8 +360,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func logoutUser(completion: ((error: ErrorType?) -> Void)) { - logoutUserWithRequestBuilder().execute { (response, error) -> Void in - completion(error: error); + logoutUserWithRequestBuilder().execute { (_, error) -> Void in + completion(error: error) } } @@ -374,7 +372,7 @@ public class UserAPI: APIBase { */ public class func logoutUser() -> Promise { let deferred = Promise.pendingPromise() - logoutUser() { error in + logoutUser { error in if let error = error { deferred.reject(error) } else { @@ -393,12 +391,12 @@ public class UserAPI: APIBase { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -412,8 +410,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func updateUser(username username: String, user: User? = nil, completion: ((error: ErrorType?) -> Void)) { - updateUserWithRequestBuilder(username: username, user: user).execute { (response, error) -> Void in - completion(error: error); + updateUserWithRequestBuilder(username: username, user: user).execute { (_, error) -> Void in + completion(error: error) } } @@ -448,10 +446,10 @@ public class UserAPI: APIBase { var path = "/user/{username}" path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "PUT", URLString: URLString, parameters: convertedParameters, isBody: true) diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index 6752df2dfc..38e0a086d7 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -41,7 +41,7 @@ public struct SynchronizedDictionary { private var managerStore = SynchronizedDictionary() class AlamofireRequestBuilder: RequestBuilder { - required init(method: String, URLString: String, parameters: [String : AnyObject]?, isBody: Bool, headers: [String : String] = [:]) { + required init(method: String, URLString: String, parameters: [String: AnyObject]?, isBody: Bool, headers: [String: String] = [:]) { super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) } diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 5911dd589c..eaa10fa376 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -51,7 +51,7 @@ extension Array: JSONEncodable { extension Dictionary: JSONEncodable { func encodeToJSON() -> AnyObject { - var dictionary = [NSObject:AnyObject]() + var dictionary = [NSObject: AnyObject]() for (key, value) in self { dictionary[key as! NSObject] = encodeIfPossible(value) } @@ -115,7 +115,7 @@ public final class ISOFullDate: CustomStringConvertible { [ .Year, .Month, - .Day, + .Day ], fromDate: date ) @@ -178,7 +178,7 @@ extension ISOFullDate: JSONEncodable { } extension RequestBuilder { - public func execute() -> Promise> { + public func execute() -> Promise> { let deferred = Promise>.pendingPromise() self.execute { (response: Response?, error: ErrorType?) in if let response = response { diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models.swift index 37d49d13e2..774bb1737b 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,7 +10,7 @@ protocol JSONEncodable { func encodeToJSON() -> AnyObject } -public enum ErrorResponse : ErrorType { +public enum ErrorResponse: ErrorType { case Error(Int, NSData?, ErrorType) } @@ -27,7 +27,7 @@ public class Response { public convenience init(response: NSHTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String:String]() + var header = [String: String]() for case let (key, value) as (String, String) in rawHeader { header[key] = value } @@ -37,7 +37,7 @@ public class Response { private var once = dispatch_once_t() class Decoders { - static private var decoders = Dictionary AnyObject)>() + static private var decoders = [String: ((AnyObject) -] AnyObject)>() static func addDecoder(clazz clazz: T.Type, decoder: ((AnyObject) -> T)) { let key = "\(T.self)" @@ -49,9 +49,9 @@ class Decoders { return array.map { Decoders.decode(clazz: T.self, source: $0) } } - static func decode(clazz clazz: [Key:T].Type, source: AnyObject) -> [Key:T] { + static func decode(clazz clazz: [Key: T].Type, source: AnyObject) -> [Key: T] { let sourceDictionary = source as! [Key: AnyObject] - var dictionary = [Key:T]() + var dictionary = [Key: T]() for (key, value) in sourceDictionary { dictionary[key] = Decoders.decode(clazz: T.self, source: value) } @@ -61,10 +61,10 @@ class Decoders { static func decode(clazz clazz: T.Type, source: AnyObject) -> T { initialize() if T.self is Int32.Type && source is NSNumber { - return source.intValue as! T; + return source.intValue as! T } if T.self is Int64.Type && source is NSNumber { - return source.longLongValue as! T; + return source.longLongValue as! T } if T.self is NSUUID.Type && source is String { return NSUUID(UUIDString: source as! String) as! T @@ -102,11 +102,11 @@ class Decoders { } } - static func decodeOptional(clazz clazz: [Key:T].Type, source: AnyObject?) -> [Key:T]? { + static func decodeOptional(clazz clazz: [Key: T].Type, source: AnyObject?) -> [Key: T]? { if source is NSNull { return nil } - return source.map { (someSource: AnyObject) -> [Key:T] in + return source.map { (someSource: AnyObject) -> [Key: T] in Decoders.decode(clazz: clazz, source: someSource) } } @@ -121,7 +121,7 @@ class Decoders { "yyyy-MM-dd'T'HH:mm:ss.SSS" ].map { (format: String) -> NSDateFormatter in let formatter = NSDateFormatter() - formatter.locale = NSLocale(localeIdentifier:"en_US_POSIX") + formatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") formatter.dateFormat = format return formatter } @@ -149,7 +149,7 @@ class Decoders { return isoDate } fatalError("formatter failed to parse \(source)") - }) + }) // Decoder for [Category] Decoders.addDecoder(clazz: [Category].self) { (source: AnyObject) -> [Category] in @@ -157,71 +157,67 @@ class Decoders { } // Decoder for Category Decoders.addDecoder(clazz: Category.self) { (source: AnyObject) -> Category in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Category() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) return instance } - // Decoder for [Order] Decoders.addDecoder(clazz: [Order].self) { (source: AnyObject) -> [Order] in return Decoders.decode(clazz: [Order].self, source: source) } // Decoder for Order Decoders.addDecoder(clazz: Order.self) { (source: AnyObject) -> Order in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Order() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.petId = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["petId"]) instance.quantity = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["quantity"]) instance.shipDate = Decoders.decodeOptional(clazz: NSDate.self, source: sourceDictionary["shipDate"]) - instance.status = Order.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") + instance.status = Order.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") instance.complete = Decoders.decodeOptional(clazz: Bool.self, source: sourceDictionary["complete"]) return instance } - // Decoder for [Pet] Decoders.addDecoder(clazz: [Pet].self) { (source: AnyObject) -> [Pet] in return Decoders.decode(clazz: [Pet].self, source: source) } // Decoder for Pet Decoders.addDecoder(clazz: Pet.self) { (source: AnyObject) -> Pet in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Pet() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.category = Decoders.decodeOptional(clazz: Category.self, source: sourceDictionary["category"]) instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) instance.photoUrls = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["photoUrls"]) instance.tags = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["tags"]) - instance.status = Pet.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") + instance.status = Pet.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") return instance } - // Decoder for [Tag] Decoders.addDecoder(clazz: [Tag].self) { (source: AnyObject) -> [Tag] in return Decoders.decode(clazz: [Tag].self, source: source) } // Decoder for Tag Decoders.addDecoder(clazz: Tag.self) { (source: AnyObject) -> Tag in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Tag() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) return instance } - // Decoder for [User] Decoders.addDecoder(clazz: [User].self) { (source: AnyObject) -> [User] in return Decoders.decode(clazz: [User].self, source: source) } // Decoder for User Decoders.addDecoder(clazz: User.self) { (source: AnyObject) -> User in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = User() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.username = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["username"]) diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index ea5e47f3cf..b3cbea28b6 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,6 @@ import Foundation - public class Category: JSONEncodable { public var id: Int64? public var name: String? @@ -16,10 +15,10 @@ public class Category: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["name"] = self.name - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 90dfd94122..bb7860b948 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,9 +7,8 @@ import Foundation - public class Order: JSONEncodable { - public enum Status: String { + public enum Status: String { case Placed = "placed" case Approved = "approved" case Delivered = "delivered" @@ -26,14 +25,14 @@ public class Order: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["petId"] = self.petId?.encodeToJSON() nillableDictionary["quantity"] = self.quantity?.encodeToJSON() nillableDictionary["shipDate"] = self.shipDate?.encodeToJSON() nillableDictionary["status"] = self.status?.rawValue nillableDictionary["complete"] = self.complete - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index f24e12684e..5fa39ec431 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,9 +7,8 @@ import Foundation - public class Pet: JSONEncodable { - public enum Status: String { + public enum Status: String { case Available = "available" case Pending = "pending" case Sold = "sold" @@ -26,14 +25,14 @@ public class Pet: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["category"] = self.category?.encodeToJSON() nillableDictionary["name"] = self.name nillableDictionary["photoUrls"] = self.photoUrls?.encodeToJSON() nillableDictionary["tags"] = self.tags?.encodeToJSON() nillableDictionary["status"] = self.status?.rawValue - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index d79d8df25e..df2d12e84f 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,6 @@ import Foundation - public class Tag: JSONEncodable { public var id: Int64? public var name: String? @@ -16,10 +15,10 @@ public class Tag: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["name"] = self.name - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/User.swift index c4032cd386..d24a215441 100644 --- a/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift/promisekit/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,6 @@ import Foundation - public class User: JSONEncodable { public var id: Int64? public var username: String? @@ -23,7 +22,7 @@ public class User: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["username"] = self.username nillableDictionary["firstName"] = self.firstName @@ -32,7 +31,7 @@ public class User: JSONEncodable { nillableDictionary["password"] = self.password nillableDictionary["phone"] = self.phone nillableDictionary["userStatus"] = self.userStatus?.encodeToJSON() - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift index 0945204dcc..d18daadc62 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Alamofire.swift @@ -79,8 +79,7 @@ func URLRequest( method: Method, _ URLString: URLStringConvertible, headers: [String: String]? = nil) - -> NSMutableURLRequest -{ + -> NSMutableURLRequest { let mutableURLRequest: NSMutableURLRequest if let request = URLString as? NSMutableURLRequest { @@ -122,8 +121,7 @@ public func request( parameters: [String: AnyObject]? = nil, encoding: ParameterEncoding = .URL, headers: [String: String]? = nil) - -> Request -{ + -> Request { return Manager.sharedInstance.request( method, URLString, @@ -165,8 +163,7 @@ public func upload( _ URLString: URLStringConvertible, headers: [String: String]? = nil, file: NSURL) - -> Request -{ + -> Request { return Manager.sharedInstance.upload(method, URLString, headers: headers, file: file) } @@ -199,8 +196,7 @@ public func upload( _ URLString: URLStringConvertible, headers: [String: String]? = nil, data: NSData) - -> Request -{ + -> Request { return Manager.sharedInstance.upload(method, URLString, headers: headers, data: data) } @@ -233,8 +229,7 @@ public func upload( _ URLString: URLStringConvertible, headers: [String: String]? = nil, stream: NSInputStream) - -> Request -{ + -> Request { return Manager.sharedInstance.upload(method, URLString, headers: headers, stream: stream) } @@ -269,8 +264,7 @@ public func upload( headers: [String: String]? = nil, multipartFormData: MultipartFormData -> Void, encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) -{ + encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) { return Manager.sharedInstance.upload( method, URLString, @@ -294,8 +288,7 @@ public func upload( URLRequest: URLRequestConvertible, multipartFormData: MultipartFormData -> Void, encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) -{ + encodingCompletion: (Manager.MultipartFormDataEncodingResult -> Void)?) { return Manager.sharedInstance.upload( URLRequest, multipartFormData: multipartFormData, @@ -327,8 +320,7 @@ public func download( encoding: ParameterEncoding = .URL, headers: [String: String]? = nil, destination: Request.DownloadFileDestination) - -> Request -{ + -> Request { return Manager.sharedInstance.download( method, URLString, diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift index 52e90badfd..fbc073d500 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Download.swift @@ -85,8 +85,7 @@ extension Manager { encoding: ParameterEncoding = .URL, headers: [String: String]? = nil, destination: Request.DownloadFileDestination) - -> Request - { + -> Request { let mutableURLRequest = URLRequest(method, URLString, headers: headers) let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 @@ -148,8 +147,7 @@ extension Request { public class func suggestedDownloadDestination( directory directory: NSSearchPathDirectory = .DocumentDirectory, domain: NSSearchPathDomainMask = .UserDomainMask) - -> DownloadFileDestination - { + -> DownloadFileDestination { return { temporaryURL, response -> NSURL in let directoryURLs = NSFileManager.defaultManager().URLsForDirectory(directory, inDomains: domain) @@ -194,8 +192,7 @@ extension Request { func URLSession( session: NSURLSession, downloadTask: NSURLSessionDownloadTask, - didFinishDownloadingToURL location: NSURL) - { + didFinishDownloadingToURL location: NSURL) { if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { do { let destination = downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) @@ -211,8 +208,7 @@ extension Request { downloadTask: NSURLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { + totalBytesExpectedToWrite: Int64) { if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } if let downloadTaskDidWriteData = downloadTaskDidWriteData { @@ -235,8 +231,7 @@ extension Request { session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { + expectedTotalBytes: Int64) { if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) } else { diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift index cbfb5c77bf..0dd7e80416 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Manager.swift @@ -167,8 +167,7 @@ public class Manager { public init?( session: NSURLSession, delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { + serverTrustPolicyManager: ServerTrustPolicyManager? = nil) { guard delegate === session.delegate else { return nil } self.delegate = delegate @@ -209,8 +208,7 @@ public class Manager { parameters: [String: AnyObject]? = nil, encoding: ParameterEncoding = .URL, headers: [String: String]? = nil) - -> Request - { + -> Request { let mutableURLRequest = URLRequest(method, URLString, headers: headers) let encodedURLRequest = encoding.encode(mutableURLRequest, parameters: parameters).0 return request(encodedURLRequest) @@ -308,8 +306,7 @@ public class Manager { public func URLSession( session: NSURLSession, didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { + completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) { guard sessionDidReceiveChallengeWithCompletion == nil else { sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) return @@ -325,8 +322,7 @@ public class Manager { if let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), - serverTrust = challenge.protectionSpace.serverTrust - { + serverTrust = challenge.protectionSpace.serverTrust { if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { disposition = .UseCredential credential = NSURLCredential(forTrust: serverTrust) @@ -397,8 +393,7 @@ public class Manager { task: NSURLSessionTask, willPerformHTTPRedirection response: NSHTTPURLResponse, newRequest request: NSURLRequest, - completionHandler: NSURLRequest? -> Void) - { + completionHandler: NSURLRequest? -> Void) { guard taskWillPerformHTTPRedirectionWithCompletion == nil else { taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) return @@ -425,8 +420,7 @@ public class Manager { session: NSURLSession, task: NSURLSessionTask, didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) - { + completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) { guard taskDidReceiveChallengeWithCompletion == nil else { taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) return @@ -457,8 +451,7 @@ public class Manager { public func URLSession( session: NSURLSession, task: NSURLSessionTask, - needNewBodyStream completionHandler: NSInputStream? -> Void) - { + needNewBodyStream completionHandler: NSInputStream? -> Void) { guard taskNeedNewBodyStreamWithCompletion == nil else { taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) return @@ -485,8 +478,7 @@ public class Manager { task: NSURLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { + totalBytesExpectedToSend: Int64) { if let taskDidSendBodyData = taskDidSendBodyData { taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) } else if let delegate = self[task] as? Request.UploadTaskDelegate { @@ -559,8 +551,7 @@ public class Manager { session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveResponse response: NSURLResponse, - completionHandler: NSURLSessionResponseDisposition -> Void) - { + completionHandler: NSURLSessionResponseDisposition -> Void) { guard dataTaskDidReceiveResponseWithCompletion == nil else { dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) return @@ -585,8 +576,7 @@ public class Manager { public func URLSession( session: NSURLSession, dataTask: NSURLSessionDataTask, - didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) - { + didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) { if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) } else { @@ -627,8 +617,7 @@ public class Manager { session: NSURLSession, dataTask: NSURLSessionDataTask, willCacheResponse proposedResponse: NSCachedURLResponse, - completionHandler: NSCachedURLResponse? -> Void) - { + completionHandler: NSCachedURLResponse? -> Void) { guard dataTaskWillCacheResponseWithCompletion == nil else { dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) return @@ -675,8 +664,7 @@ public class Manager { public func URLSession( session: NSURLSession, downloadTask: NSURLSessionDownloadTask, - didFinishDownloadingToURL location: NSURL) - { + didFinishDownloadingToURL location: NSURL) { if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { @@ -701,8 +689,7 @@ public class Manager { downloadTask: NSURLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { + totalBytesExpectedToWrite: Int64) { if let downloadTaskDidWriteData = downloadTaskDidWriteData { downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { @@ -732,8 +719,7 @@ public class Manager { session: NSURLSession, downloadTask: NSURLSessionDownloadTask, didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { + expectedTotalBytes: Int64) { if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) } else if let delegate = self[downloadTask] as? Request.DownloadTaskDelegate { diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift index 5a7ef09c82..569987af6d 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/MultipartFormData.swift @@ -213,8 +213,7 @@ public class MultipartFormData { public func appendBodyPart(fileURL fileURL: NSURL, name: String) { if let fileName = fileURL.lastPathComponent, - pathExtension = fileURL.pathExtension - { + pathExtension = fileURL.pathExtension { let mimeType = mimeTypeForPathExtension(pathExtension) appendBodyPart(fileURL: fileURL, name: name, fileName: fileName, mimeType: mimeType) } else { @@ -274,8 +273,7 @@ public class MultipartFormData { guard let path = fileURL.path - where NSFileManager.defaultManager().fileExistsAtPath(path, isDirectory: &isDirectory) && !isDirectory else - { + where NSFileManager.defaultManager().fileExistsAtPath(path, isDirectory: &isDirectory) && !isDirectory else { let failureReason = "The file URL is a directory, not a file: \(fileURL)" setBodyPartError(code: NSURLErrorBadURL, failureReason: failureReason) return @@ -290,8 +288,7 @@ public class MultipartFormData { do { if let path = fileURL.path, - fileSize = try NSFileManager.defaultManager().attributesOfItemAtPath(path)[NSFileSize] as? NSNumber - { + fileSize = try NSFileManager.defaultManager().attributesOfItemAtPath(path)[NSFileSize] as? NSNumber { bodyContentLength = fileSize.unsignedLongLongValue } } catch { @@ -338,8 +335,7 @@ public class MultipartFormData { length: UInt64, name: String, fileName: String, - mimeType: String) - { + mimeType: String) { let headers = contentHeaders(name: name, fileName: fileName, mimeType: mimeType) appendBodyPart(stream: stream, length: length, headers: headers) } @@ -517,8 +513,7 @@ public class MultipartFormData { private func writeInitialBoundaryDataForBodyPart( bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) - throws - { + throws { let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() return try writeData(initialData, toOutputStream: outputStream) } @@ -560,8 +555,7 @@ public class MultipartFormData { private func writeFinalBoundaryDataForBodyPart( bodyPart: BodyPart, toOutputStream outputStream: NSOutputStream) - throws - { + throws { if bodyPart.hasFinalBoundary { return try writeData(finalBoundaryData(), toOutputStream: outputStream) } @@ -608,8 +602,7 @@ public class MultipartFormData { private func mimeTypeForPathExtension(pathExtension: String) -> String { if let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension, nil)?.takeRetainedValue(), - contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() - { + contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() { return contentType as String } diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift index d5e00ae700..3fe9a3ed54 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -156,8 +156,7 @@ public class NetworkReachabilityManager { context.info = UnsafeMutablePointer(Unmanaged.passUnretained(self).toOpaque()) let callbackEnabled = SCNetworkReachabilitySetCallback( - reachability, - { (_, flags, info) in + reachability, { (_, flags, info) in let reachability = Unmanaged.fromOpaque(COpaquePointer(info)).takeUnretainedValue() reachability.notifyListener(flags) }, @@ -227,8 +226,7 @@ extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} public func ==( lhs: NetworkReachabilityManager.NetworkReachabilityStatus, rhs: NetworkReachabilityManager.NetworkReachabilityStatus) - -> Bool -{ + -> Bool { switch (lhs, rhs) { case (.Unknown, .Unknown): return true diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift index c54e58b32d..0c7601d184 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ParameterEncoding.swift @@ -80,13 +80,12 @@ public enum ParameterEncoding { public func encode( URLRequest: URLRequestConvertible, parameters: [String: AnyObject]?) - -> (NSMutableURLRequest, NSError?) - { + -> (NSMutableURLRequest, NSError?) { var mutableURLRequest = URLRequest.URLRequest guard let parameters = parameters else { return (mutableURLRequest, nil) } - var encodingError: NSError? = nil + var encodingError: NSError? switch self { case .URL, .URLEncodedInURL: @@ -120,8 +119,7 @@ public enum ParameterEncoding { if let method = Method(rawValue: mutableURLRequest.HTTPMethod) where encodesParametersInURL(method) { if let URLComponents = NSURLComponents(URL: mutableURLRequest.URL!, resolvingAgainstBaseURL: false) - where !parameters.isEmpty - { + where !parameters.isEmpty { let percentEncodedQuery = (URLComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) URLComponents.percentEncodedQuery = percentEncodedQuery mutableURLRequest.URL = URLComponents.URL diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift index 3a3f16f64d..a55ada1731 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Request.swift @@ -87,8 +87,7 @@ public class Request { user user: String, password: String, persistence: NSURLCredentialPersistence = .ForSession) - -> Self - { + -> Self { let credential = NSURLCredential(user: user, password: password, persistence: persistence) return authenticate(usingCredential: credential) @@ -195,8 +194,7 @@ public class Request { public func cancel() { if let downloadDelegate = delegate as? DownloadTaskDelegate, - downloadTask = downloadDelegate.downloadTask - { + downloadTask = downloadDelegate.downloadTask { downloadTask.cancelByProducingResumeData { data in downloadDelegate.resumeData = data } @@ -264,8 +262,7 @@ public class Request { task: NSURLSessionTask, willPerformHTTPRedirection response: NSHTTPURLResponse, newRequest request: NSURLRequest, - completionHandler: ((NSURLRequest?) -> Void)) - { + completionHandler: ((NSURLRequest?) -> Void)) { var redirectRequest: NSURLRequest? = request if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { @@ -279,8 +276,7 @@ public class Request { session: NSURLSession, task: NSURLSessionTask, didReceiveChallenge challenge: NSURLAuthenticationChallenge, - completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) - { + completionHandler: ((NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void)) { var disposition: NSURLSessionAuthChallengeDisposition = .PerformDefaultHandling var credential: NSURLCredential? @@ -291,8 +287,7 @@ public class Request { if let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicyForHost(host), - serverTrust = challenge.protectionSpace.serverTrust - { + serverTrust = challenge.protectionSpace.serverTrust { if serverTrustPolicy.evaluateServerTrust(serverTrust, isValidForHost: host) { disposition = .UseCredential credential = NSURLCredential(forTrust: serverTrust) @@ -318,8 +313,7 @@ public class Request { func URLSession( session: NSURLSession, task: NSURLSessionTask, - needNewBodyStream completionHandler: ((NSInputStream?) -> Void)) - { + needNewBodyStream completionHandler: ((NSInputStream?) -> Void)) { var bodyStream: NSInputStream? if let taskNeedNewBodyStream = taskNeedNewBodyStream { @@ -339,8 +333,7 @@ public class Request { if let downloadDelegate = self as? DownloadTaskDelegate, userInfo = error.userInfo as? [String: AnyObject], - resumeData = userInfo[NSURLSessionDownloadTaskResumeData] as? NSData - { + resumeData = userInfo[NSURLSessionDownloadTaskResumeData] as? NSData { downloadDelegate.resumeData = resumeData } } @@ -389,8 +382,7 @@ public class Request { session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveResponse response: NSURLResponse, - completionHandler: (NSURLSessionResponseDisposition -> Void)) - { + completionHandler: (NSURLSessionResponseDisposition -> Void)) { var disposition: NSURLSessionResponseDisposition = .Allow expectedContentLength = response.expectedContentLength @@ -405,8 +397,7 @@ public class Request { func URLSession( session: NSURLSession, dataTask: NSURLSessionDataTask, - didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) - { + didBecomeDownloadTask downloadTask: NSURLSessionDownloadTask) { dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) } @@ -440,8 +431,7 @@ public class Request { session: NSURLSession, dataTask: NSURLSessionDataTask, willCacheResponse proposedResponse: NSCachedURLResponse, - completionHandler: ((NSCachedURLResponse?) -> Void)) - { + completionHandler: ((NSCachedURLResponse?) -> Void)) { var cachedResponse: NSCachedURLResponse? = proposedResponse if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { @@ -521,8 +511,7 @@ extension Request: CustomDebugStringConvertible { if session.configuration.HTTPShouldSetCookies { if let cookieStorage = session.configuration.HTTPCookieStorage, - cookies = cookieStorage.cookiesForURL(URL) where !cookies.isEmpty - { + cookies = cookieStorage.cookiesForURL(URL) where !cookies.isEmpty { let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value ?? String());" } components.append("-b \"\(string.substringToIndex(string.endIndex.predecessor()))\"") } @@ -548,8 +537,7 @@ extension Request: CustomDebugStringConvertible { if let HTTPBodyData = request.HTTPBody, - HTTPBody = String(data: HTTPBodyData, encoding: NSUTF8StringEncoding) - { + HTTPBody = String(data: HTTPBodyData, encoding: NSUTF8StringEncoding) { var escapedBody = HTTPBody.stringByReplacingOccurrencesOfString("\\\"", withString: "\\\\\"") escapedBody = escapedBody.stringByReplacingOccurrencesOfString("\"", withString: "\\\"") diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift index 9c437ff6e4..46f534ad15 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Response.swift @@ -58,8 +58,7 @@ public struct Response { response: NSHTTPURLResponse?, data: NSData?, result: Result, - timeline: Timeline = Timeline()) - { + timeline: Timeline = Timeline()) { self.request = request self.response = response self.data = data diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift index 89e39544b8..458673792f 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ResponseSerialization.swift @@ -86,8 +86,7 @@ extension Request { public func response( queue queue: dispatch_queue_t? = nil, completionHandler: (NSURLRequest?, NSHTTPURLResponse?, NSData?, NSError?) -> Void) - -> Self - { + -> Self { delegate.queue.addOperationWithBlock { dispatch_async(queue ?? dispatch_get_main_queue()) { completionHandler(self.request, self.response, self.delegate.data, self.delegate.error) @@ -111,8 +110,7 @@ extension Request { queue queue: dispatch_queue_t? = nil, responseSerializer: T, completionHandler: Response -> Void) - -> Self - { + -> Self { delegate.queue.addOperationWithBlock { let result = responseSerializer.serializeResponse( self.request, @@ -181,8 +179,7 @@ extension Request { public func responseData( queue queue: dispatch_queue_t? = nil, completionHandler: Response -> Void) - -> Self - { + -> Self { return response(queue: queue, responseSerializer: Request.dataResponseSerializer(), completionHandler: completionHandler) } } @@ -202,8 +199,7 @@ extension Request { */ public static func stringResponseSerializer( encoding encoding: NSStringEncoding? = nil) - -> ResponseSerializer - { + -> ResponseSerializer { return ResponseSerializer { _, response, data, error in guard error == nil else { return .Failure(error!) } @@ -249,8 +245,7 @@ extension Request { queue queue: dispatch_queue_t? = nil, encoding: NSStringEncoding? = nil, completionHandler: Response -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: Request.stringResponseSerializer(encoding: encoding), @@ -273,8 +268,7 @@ extension Request { */ public static func JSONResponseSerializer( options options: NSJSONReadingOptions = .AllowFragments) - -> ResponseSerializer - { + -> ResponseSerializer { return ResponseSerializer { _, response, data, error in guard error == nil else { return .Failure(error!) } @@ -307,8 +301,7 @@ extension Request { queue queue: dispatch_queue_t? = nil, options: NSJSONReadingOptions = .AllowFragments, completionHandler: Response -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: Request.JSONResponseSerializer(options: options), @@ -331,8 +324,7 @@ extension Request { */ public static func propertyListResponseSerializer( options options: NSPropertyListReadOptions = NSPropertyListReadOptions()) - -> ResponseSerializer - { + -> ResponseSerializer { return ResponseSerializer { _, response, data, error in guard error == nil else { return .Failure(error!) } @@ -367,8 +359,7 @@ extension Request { queue queue: dispatch_queue_t? = nil, options: NSPropertyListReadOptions = NSPropertyListReadOptions(), completionHandler: Response -> Void) - -> Self - { + -> Self { return response( queue: queue, responseSerializer: Request.propertyListResponseSerializer(options: options), diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift index 7da516e803..3f9f308b95 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/ServerTrustPolicy.swift @@ -137,8 +137,7 @@ public enum ServerTrustPolicy { for path in paths { if let certificateData = NSData(contentsOfFile: path), - certificate = SecCertificateCreateWithData(nil, certificateData) - { + certificate = SecCertificateCreateWithData(nil, certificateData) { certificates.append(certificate) } } @@ -279,8 +278,7 @@ public enum ServerTrustPolicy { for index in 0.. Request - { + -> Request { let mutableURLRequest = URLRequest(method, URLString, headers: headers) return upload(mutableURLRequest, file: file) } @@ -141,8 +140,7 @@ extension Manager { _ URLString: URLStringConvertible, headers: [String: String]? = nil, data: NSData) - -> Request - { + -> Request { let mutableURLRequest = URLRequest(method, URLString, headers: headers) return upload(mutableURLRequest, data: data) @@ -181,8 +179,7 @@ extension Manager { _ URLString: URLStringConvertible, headers: [String: String]? = nil, stream: NSInputStream) - -> Request - { + -> Request { let mutableURLRequest = URLRequest(method, URLString, headers: headers) return upload(mutableURLRequest, stream: stream) @@ -239,8 +236,7 @@ extension Manager { headers: [String: String]? = nil, multipartFormData: MultipartFormData -> Void, encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) - { + encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) { let mutableURLRequest = URLRequest(method, URLString, headers: headers) return upload( @@ -279,8 +275,7 @@ extension Manager { URLRequest: URLRequestConvertible, multipartFormData: MultipartFormData -> Void, encodingMemoryThreshold: UInt64 = Manager.MultipartFormDataEncodingMemoryThreshold, - encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) - { + encodingCompletion: (MultipartFormDataEncodingResult -> Void)?) { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) { let formData = MultipartFormData() multipartFormData(formData) @@ -359,8 +354,7 @@ extension Request { task: NSURLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { + totalBytesExpectedToSend: Int64) { if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } if let taskDidSendBodyData = taskDidSendBodyData { diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift index b94e07d1e4..11614e7bab 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/Pods/Alamofire/Source/Validation.swift @@ -56,8 +56,7 @@ extension Request { delegate.queue.addOperationWithBlock { if let response = self.response where self.delegate.error == nil, - case let .Failure(error) = validation(self.request, response) - { + case let .Failure(error) = validation(self.request, response) { self.delegate.error = error } } @@ -112,8 +111,7 @@ extension Request { if let type = components.first, - subtype = components.last - { + subtype = components.last { self.type = type self.subtype = subtype } else { @@ -146,8 +144,7 @@ extension Request { if let responseContentType = response.MIMEType, - responseMIMEType = MIMEType(responseContentType) - { + responseMIMEType = MIMEType(responseContentType) { for contentType in acceptableContentTypes { if let acceptableMIMEType = MIMEType(contentType) where acceptableMIMEType.matches(responseMIMEType) { return .Success diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/AppDelegate.swift index 3769667ad9..c3770b6a19 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/AppDelegate.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/AppDelegate.swift @@ -13,7 +13,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true @@ -41,6 +40,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } - } - diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/ViewController.swift index cd7e9a1676..8dad16b10f 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/ViewController.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClient/ViewController.swift @@ -20,6 +20,4 @@ class ViewController: UIViewController { // Dispose of any resources that can be recreated. } - } - diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift index e76c5700aa..8a6ed8b8cd 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -12,19 +12,19 @@ import XCTest @testable import SwaggerClient class PetAPITests: XCTestCase { - + let testTimeout = 10.0 override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } - + override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } - + func test1CreatePet() { let expectation = self.expectationWithDescription("testCreatePet") let newPet = Pet() @@ -39,12 +39,12 @@ class PetAPITests: XCTestCase { expectation.fulfill() }.always { // Noop for now - }.error { errorType -> Void in + }.error { _ -> Void in XCTFail("error creating pet") } self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test2GetPet() { let expectation = self.expectationWithDescription("testGetPet") PetAPI.getPetById(petId: 1000).then { pet -> Void in @@ -53,12 +53,12 @@ class PetAPITests: XCTestCase { expectation.fulfill() }.always { // Noop for now - }.error { errorType -> Void in + }.error { _ -> Void in XCTFail("error creating pet") } self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test3DeletePet() { let expectation = self.expectationWithDescription("testDeletePet") PetAPI.deletePet(petId: 1000).then { diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift index 2e37e3d391..ff7732ce42 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift @@ -16,7 +16,7 @@ class StoreAPITests: XCTestCase { let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" let testTimeout = 10.0 - + func test1PlaceOrder() { let order = Order() let shipDate = NSDate() @@ -38,12 +38,12 @@ class StoreAPITests: XCTestCase { expectation.fulfill() }.always { // Noop for now - }.error { errorType -> Void in + }.error { _ -> Void in XCTFail("error placing order") } self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test2GetOrder() { let expectation = self.expectationWithDescription("testGetOrder") StoreAPI.getOrderById(orderId: "1000").then { order -> Void in @@ -53,12 +53,12 @@ class StoreAPITests: XCTestCase { expectation.fulfill() }.always { // Noop for now - }.error { errorType -> Void in + }.error { _ -> Void in XCTFail("error placing order") } self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test3DeleteOrder() { let expectation = self.expectationWithDescription("testDeleteOrder") StoreAPI.deleteOrder(orderId: "1000").then { diff --git a/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift index 2caacc8d6d..f8510b1e90 100644 --- a/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift +++ b/samples/client/petstore/swift/promisekit/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift @@ -14,7 +14,7 @@ import XCTest class UserAPITests: XCTestCase { let testTimeout = 10.0 - + func testLogin() { let expectation = self.expectationWithDescription("testLogin") UserAPI.loginUser(username: "swiftTester", password: "swift").then { _ -> Void in @@ -22,7 +22,7 @@ class UserAPITests: XCTestCase { } self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func testLogout() { let expectation = self.expectationWithDescription("testLogout") UserAPI.logoutUser().then { @@ -30,7 +30,7 @@ class UserAPITests: XCTestCase { } self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test1CreateUser() { let expectation = self.expectationWithDescription("testCreateUser") let newUser = User() @@ -47,7 +47,7 @@ class UserAPITests: XCTestCase { } self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test2GetUser() { let expectation = self.expectationWithDescription("testGetUser") UserAPI.getUserByName(username: "test@test.com").then {user -> Void in @@ -60,12 +60,12 @@ class UserAPITests: XCTestCase { expectation.fulfill() }.always { // Noop for now - }.error { errorType -> Void in + }.error { _ -> Void in XCTFail("error getting user") } self.waitForExpectationsWithTimeout(testTimeout, handler: nil) } - + func test3DeleteUser() { let expectation = self.expectationWithDescription("testDeleteUser") UserAPI.deleteUser(username: "test@test.com").then { diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 2e354e5418..bff5744506 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -5,8 +5,8 @@ // class APIHelper { - static func rejectNil(source: [String:AnyObject?]) -> [String:AnyObject]? { - var destination = [String:AnyObject]() + static func rejectNil(source: [String: AnyObject?]) -> [String: AnyObject]? { + var destination = [String: AnyObject]() for (key, nillableValue) in source { if let value: AnyObject = nillableValue { destination[key] = value @@ -19,8 +19,8 @@ class APIHelper { return destination } - static func rejectNilHeaders(source: [String:AnyObject?]) -> [String:String] { - var destination = [String:String]() + static func rejectNilHeaders(source: [String: AnyObject?]) -> [String: String] { + var destination = [String: String]() for (key, nillableValue) in source { if let value: AnyObject = nillableValue { destination[key] = "\(value)" @@ -29,11 +29,11 @@ class APIHelper { return destination } - static func convertBoolToString(source: [String: AnyObject]?) -> [String:AnyObject]? { + static func convertBoolToString(source: [String: AnyObject]?) -> [String: AnyObject]? { guard let source = source else { return nil } - var destination = [String:AnyObject]() + var destination = [String: AnyObject]() let theTrue = NSNumber(bool: true) let theFalse = NSNumber(bool: false) for (key, value) in source { diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs.swift index 1c2511ded5..676a325d49 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,7 +9,7 @@ import Foundation public class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io/v2" public static var credential: NSURLCredential? - public static var customHeaders: [String:String] = [:] + public static var customHeaders: [String: String] = [:] static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() } @@ -18,44 +18,44 @@ public class APIBase { let encoded: AnyObject? = encodable?.encodeToJSON() if encoded! is [AnyObject] { - var dictionary = [String:AnyObject]() + var dictionary = [String: AnyObject]() for (index, item) in (encoded as! [AnyObject]).enumerate() { dictionary["\(index)"] = item } return dictionary } else { - return encoded as? [String:AnyObject] + return encoded as? [String: AnyObject] } } } public class RequestBuilder { var credential: NSURLCredential? - var headers: [String:String] - let parameters: [String:AnyObject]? + var headers: [String: String] + let parameters: [String: AnyObject]? let isBody: Bool let method: String let URLString: String - - /// Optional block to obtain a reference to the request's progress instance when available. - public var onProgressReady: ((NSProgress) -> ())? - required public init(method: String, URLString: String, parameters: [String:AnyObject]?, isBody: Bool, headers: [String:String] = [:]) { + /// Optional block to obtain a reference to the request's progress instance when available. + public var onProgressReady: ((NSProgress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: AnyObject]?, isBody: Bool, headers: [String: String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters self.isBody = isBody self.headers = headers - + addHeaders(PetstoreClientAPI.customHeaders) } - - public func addHeaders(aHeaders:[String:String]) { + + public func addHeaders(aHeaders: [String: String]) { for (header, value) in aHeaders { headers[header] = value } } - + public func execute(completion: (response: Response?, error: ErrorType?) -> Void) { } public func addHeader(name name: String, value: String) -> Self { @@ -64,7 +64,7 @@ public class RequestBuilder { } return self } - + public func addCredential() -> Self { self.credential = PetstoreClientAPI.credential return self @@ -74,4 +74,3 @@ public class RequestBuilder { protocol RequestBuilderFactory { func getBuilder() -> RequestBuilder.Type } - diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index aa63567858..866607dc04 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -8,8 +8,6 @@ import Alamofire import RxSwift - - public class PetAPI: APIBase { /** Add a new pet to the store @@ -18,8 +16,8 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func addPet(pet pet: Pet? = nil, completion: ((error: ErrorType?) -> Void)) { - addPetWithRequestBuilder(pet: pet).execute { (response, error) -> Void in - completion(error: error); + addPetWithRequestBuilder(pet: pet).execute { (_, error) -> Void in + completion(error: error) } } @@ -55,10 +53,10 @@ public class PetAPI: APIBase { public class func addPetWithRequestBuilder(pet pet: Pet? = nil) -> RequestBuilder { let path = "/pet" let URLString = PetstoreClientAPI.basePath + path - let parameters = pet?.encodeToJSON() as? [String:AnyObject] - + let parameters = pet?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -72,8 +70,8 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func deletePet(petId petId: Int64, apiKey: String? = nil, completion: ((error: ErrorType?) -> Void)) { - deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (response, error) -> Void in - completion(error: error); + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute { (_, error) -> Void in + completion(error: error) } } @@ -113,16 +111,16 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) let nillableHeaders: [String: AnyObject?] = [ "api_key": apiKey ] let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "DELETE", URLString: URLString, parameters: convertedParameters, isBody: true, headers: headerParameters) @@ -136,7 +134,7 @@ public class PetAPI: APIBase { */ public class func findPetsByStatus(status status: [String]? = nil, completion: ((data: [Pet]?, error: ErrorType?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -226,14 +224,14 @@ public class PetAPI: APIBase { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "status": status ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -247,7 +245,7 @@ public class PetAPI: APIBase { */ public class func findPetsByTags(tags tags: [String]? = nil, completion: ((data: [Pet]?, error: ErrorType?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -337,14 +335,14 @@ public class PetAPI: APIBase { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "tags": tags ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -358,7 +356,7 @@ public class PetAPI: APIBase { */ public class func getPetById(petId petId: Int64, completion: ((data: Pet?, error: ErrorType?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -452,12 +450,12 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -470,8 +468,8 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func updatePet(pet pet: Pet? = nil, completion: ((error: ErrorType?) -> Void)) { - updatePetWithRequestBuilder(pet: pet).execute { (response, error) -> Void in - completion(error: error); + updatePetWithRequestBuilder(pet: pet).execute { (_, error) -> Void in + completion(error: error) } } @@ -507,10 +505,10 @@ public class PetAPI: APIBase { public class func updatePetWithRequestBuilder(pet pet: Pet? = nil) -> RequestBuilder { let path = "/pet" let URLString = PetstoreClientAPI.basePath + path - let parameters = pet?.encodeToJSON() as? [String:AnyObject] - + let parameters = pet?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "PUT", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -525,8 +523,8 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func updatePetWithForm(petId petId: String, name: String? = nil, status: String? = nil, completion: ((error: ErrorType?) -> Void)) { - updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (response, error) -> Void in - completion(error: error); + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute { (_, error) -> Void in + completion(error: error) } } @@ -568,15 +566,15 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "name": name, "status": status ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -591,8 +589,8 @@ public class PetAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func uploadFile(petId petId: Int64, additionalMetadata: String? = nil, file: NSURL? = nil, completion: ((error: ErrorType?) -> Void)) { - uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (response, error) -> Void in - completion(error: error); + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute { (_, error) -> Void in + completion(error: error) } } @@ -634,15 +632,15 @@ public class PetAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{petId}", withString: "\(petId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "additionalMetadata": additionalMetadata, "file": file ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: false) diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 8e0a210ed7..cc8873bdd9 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -8,8 +8,6 @@ import Alamofire import RxSwift - - public class StoreAPI: APIBase { /** Delete purchase order by ID @@ -18,8 +16,8 @@ public class StoreAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func deleteOrder(orderId orderId: String, completion: ((error: ErrorType?) -> Void)) { - deleteOrderWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(error: error); + deleteOrderWithRequestBuilder(orderId: orderId).execute { (_, error) -> Void in + completion(error: error) } } @@ -55,12 +53,12 @@ public class StoreAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{orderId}", withString: "\(orderId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "DELETE", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -71,9 +69,9 @@ public class StoreAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ - public class func getInventory(completion: ((data: [String:Int32]?, error: ErrorType?) -> Void)) { + public class func getInventory(completion: ((data: [String: Int32]?, error: ErrorType?) -> Void)) { getInventoryWithRequestBuilder().execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -82,9 +80,9 @@ public class StoreAPI: APIBase { - returns: Observable<[String:Int32]> */ - public class func getInventory() -> Observable<[String:Int32]> { + public class func getInventory() -> Observable<[String: Int32]> { return Observable.create { observer -> Disposable in - getInventory() { data, error in + getInventory { data, error in if let error = error { observer.on(.Error(error as ErrorType)) } else { @@ -105,17 +103,17 @@ public class StoreAPI: APIBase { - returns: RequestBuilder<[String:Int32]> */ - public class func getInventoryWithRequestBuilder() -> RequestBuilder<[String:Int32]> { + public class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int32]> { let path = "/store/inventory" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - - let requestBuilder: RequestBuilder<[String:Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + let requestBuilder: RequestBuilder<[String: Int32]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) } @@ -128,7 +126,7 @@ public class StoreAPI: APIBase { */ public class func getOrderById(orderId orderId: String, completion: ((data: Order?, error: ErrorType?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -194,12 +192,12 @@ public class StoreAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{orderId}", withString: "\(orderId)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -213,7 +211,7 @@ public class StoreAPI: APIBase { */ public class func placeOrder(order order: Order? = nil, completion: ((data: Order?, error: ErrorType?) -> Void)) { placeOrderWithRequestBuilder(order: order).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -276,10 +274,10 @@ public class StoreAPI: APIBase { public class func placeOrderWithRequestBuilder(order order: Order? = nil) -> RequestBuilder { let path = "/store/order" let URLString = PetstoreClientAPI.basePath + path - let parameters = order?.encodeToJSON() as? [String:AnyObject] - + let parameters = order?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index a3a0e0b2d3..fae0dd5f6e 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -8,8 +8,6 @@ import Alamofire import RxSwift - - public class UserAPI: APIBase { /** Create user @@ -18,8 +16,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func createUser(user user: User? = nil, completion: ((error: ErrorType?) -> Void)) { - createUserWithRequestBuilder(user: user).execute { (response, error) -> Void in - completion(error: error); + createUserWithRequestBuilder(user: user).execute { (_, error) -> Void in + completion(error: error) } } @@ -53,10 +51,10 @@ public class UserAPI: APIBase { public class func createUserWithRequestBuilder(user user: User? = nil) -> RequestBuilder { let path = "/user" let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -69,8 +67,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func createUsersWithArrayInput(user user: [User]? = nil, completion: ((error: ErrorType?) -> Void)) { - createUsersWithArrayInputWithRequestBuilder(user: user).execute { (response, error) -> Void in - completion(error: error); + createUsersWithArrayInputWithRequestBuilder(user: user).execute { (_, error) -> Void in + completion(error: error) } } @@ -103,10 +101,10 @@ public class UserAPI: APIBase { public class func createUsersWithArrayInputWithRequestBuilder(user user: [User]? = nil) -> RequestBuilder { let path = "/user/createWithArray" let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -119,8 +117,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func createUsersWithListInput(user user: [User]? = nil, completion: ((error: ErrorType?) -> Void)) { - createUsersWithListInputWithRequestBuilder(user: user).execute { (response, error) -> Void in - completion(error: error); + createUsersWithListInputWithRequestBuilder(user: user).execute { (_, error) -> Void in + completion(error: error) } } @@ -153,10 +151,10 @@ public class UserAPI: APIBase { public class func createUsersWithListInputWithRequestBuilder(user user: [User]? = nil) -> RequestBuilder { let path = "/user/createWithList" let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "POST", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -169,8 +167,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func deleteUser(username username: String, completion: ((error: ErrorType?) -> Void)) { - deleteUserWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(error: error); + deleteUserWithRequestBuilder(username: username).execute { (_, error) -> Void in + completion(error: error) } } @@ -206,12 +204,12 @@ public class UserAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "DELETE", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -225,7 +223,7 @@ public class UserAPI: APIBase { */ public class func getUserByName(username username: String, completion: ((data: User?, error: ErrorType?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -298,12 +296,12 @@ public class UserAPI: APIBase { path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -318,7 +316,7 @@ public class UserAPI: APIBase { */ public class func loginUser(username username: String? = nil, password: String? = nil, completion: ((data: String?, error: ErrorType?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute { (response, error) -> Void in - completion(data: response?.body, error: error); + completion(data: response?.body, error: error) } } @@ -354,15 +352,15 @@ public class UserAPI: APIBase { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [ + let nillableParameters: [String: AnyObject?] = [ "username": username, "password": password ] - + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: false) @@ -374,8 +372,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func logoutUser(completion: ((error: ErrorType?) -> Void)) { - logoutUserWithRequestBuilder().execute { (response, error) -> Void in - completion(error: error); + logoutUserWithRequestBuilder().execute { (_, error) -> Void in + completion(error: error) } } @@ -386,7 +384,7 @@ public class UserAPI: APIBase { */ public class func logoutUser() -> Observable { return Observable.create { observer -> Disposable in - logoutUser() { error in + logoutUser { error in if let error = error { observer.on(.Error(error as ErrorType)) } else { @@ -407,12 +405,12 @@ public class UserAPI: APIBase { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let nillableParameters: [String:AnyObject?] = [:] - + let nillableParameters: [String: AnyObject?] = [:] + let parameters = APIHelper.rejectNil(nillableParameters) - + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: URLString, parameters: convertedParameters, isBody: true) @@ -426,8 +424,8 @@ public class UserAPI: APIBase { - parameter completion: completion handler to receive the data and the error objects */ public class func updateUser(username username: String, user: User? = nil, completion: ((error: ErrorType?) -> Void)) { - updateUserWithRequestBuilder(username: username, user: user).execute { (response, error) -> Void in - completion(error: error); + updateUserWithRequestBuilder(username: username, user: user).execute { (_, error) -> Void in + completion(error: error) } } @@ -464,10 +462,10 @@ public class UserAPI: APIBase { var path = "/user/{username}" path = path.stringByReplacingOccurrencesOfString("{username}", withString: "\(username)", options: .LiteralSearch, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters = user?.encodeToJSON() as? [String:AnyObject] - + let parameters = user?.encodeToJSON() as? [String: AnyObject] + let convertedParameters = APIHelper.convertBoolToString(parameters) - + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "PUT", URLString: URLString, parameters: convertedParameters, isBody: true) diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index 6752df2dfc..38e0a086d7 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -41,7 +41,7 @@ public struct SynchronizedDictionary { private var managerStore = SynchronizedDictionary() class AlamofireRequestBuilder: RequestBuilder { - required init(method: String, URLString: String, parameters: [String : AnyObject]?, isBody: Bool, headers: [String : String] = [:]) { + required init(method: String, URLString: String, parameters: [String: AnyObject]?, isBody: Bool, headers: [String: String] = [:]) { super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) } diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Extensions.swift index c04e734a7c..603983e248 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -50,7 +50,7 @@ extension Array: JSONEncodable { extension Dictionary: JSONEncodable { func encodeToJSON() -> AnyObject { - var dictionary = [NSObject:AnyObject]() + var dictionary = [NSObject: AnyObject]() for (key, value) in self { dictionary[key as! NSObject] = encodeIfPossible(value) } @@ -114,7 +114,7 @@ public final class ISOFullDate: CustomStringConvertible { [ .Year, .Month, - .Day, + .Day ], fromDate: date ) @@ -175,5 +175,3 @@ extension ISOFullDate: JSONEncodable { return "\(year)-\(month)-\(day)" } } - - diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models.swift index 37d49d13e2..774bb1737b 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,7 +10,7 @@ protocol JSONEncodable { func encodeToJSON() -> AnyObject } -public enum ErrorResponse : ErrorType { +public enum ErrorResponse: ErrorType { case Error(Int, NSData?, ErrorType) } @@ -27,7 +27,7 @@ public class Response { public convenience init(response: NSHTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String:String]() + var header = [String: String]() for case let (key, value) as (String, String) in rawHeader { header[key] = value } @@ -37,7 +37,7 @@ public class Response { private var once = dispatch_once_t() class Decoders { - static private var decoders = Dictionary AnyObject)>() + static private var decoders = [String: ((AnyObject) -] AnyObject)>() static func addDecoder(clazz clazz: T.Type, decoder: ((AnyObject) -> T)) { let key = "\(T.self)" @@ -49,9 +49,9 @@ class Decoders { return array.map { Decoders.decode(clazz: T.self, source: $0) } } - static func decode(clazz clazz: [Key:T].Type, source: AnyObject) -> [Key:T] { + static func decode(clazz clazz: [Key: T].Type, source: AnyObject) -> [Key: T] { let sourceDictionary = source as! [Key: AnyObject] - var dictionary = [Key:T]() + var dictionary = [Key: T]() for (key, value) in sourceDictionary { dictionary[key] = Decoders.decode(clazz: T.self, source: value) } @@ -61,10 +61,10 @@ class Decoders { static func decode(clazz clazz: T.Type, source: AnyObject) -> T { initialize() if T.self is Int32.Type && source is NSNumber { - return source.intValue as! T; + return source.intValue as! T } if T.self is Int64.Type && source is NSNumber { - return source.longLongValue as! T; + return source.longLongValue as! T } if T.self is NSUUID.Type && source is String { return NSUUID(UUIDString: source as! String) as! T @@ -102,11 +102,11 @@ class Decoders { } } - static func decodeOptional(clazz clazz: [Key:T].Type, source: AnyObject?) -> [Key:T]? { + static func decodeOptional(clazz clazz: [Key: T].Type, source: AnyObject?) -> [Key: T]? { if source is NSNull { return nil } - return source.map { (someSource: AnyObject) -> [Key:T] in + return source.map { (someSource: AnyObject) -> [Key: T] in Decoders.decode(clazz: clazz, source: someSource) } } @@ -121,7 +121,7 @@ class Decoders { "yyyy-MM-dd'T'HH:mm:ss.SSS" ].map { (format: String) -> NSDateFormatter in let formatter = NSDateFormatter() - formatter.locale = NSLocale(localeIdentifier:"en_US_POSIX") + formatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") formatter.dateFormat = format return formatter } @@ -149,7 +149,7 @@ class Decoders { return isoDate } fatalError("formatter failed to parse \(source)") - }) + }) // Decoder for [Category] Decoders.addDecoder(clazz: [Category].self) { (source: AnyObject) -> [Category] in @@ -157,71 +157,67 @@ class Decoders { } // Decoder for Category Decoders.addDecoder(clazz: Category.self) { (source: AnyObject) -> Category in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Category() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) return instance } - // Decoder for [Order] Decoders.addDecoder(clazz: [Order].self) { (source: AnyObject) -> [Order] in return Decoders.decode(clazz: [Order].self, source: source) } // Decoder for Order Decoders.addDecoder(clazz: Order.self) { (source: AnyObject) -> Order in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Order() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.petId = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["petId"]) instance.quantity = Decoders.decodeOptional(clazz: Int32.self, source: sourceDictionary["quantity"]) instance.shipDate = Decoders.decodeOptional(clazz: NSDate.self, source: sourceDictionary["shipDate"]) - instance.status = Order.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") + instance.status = Order.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") instance.complete = Decoders.decodeOptional(clazz: Bool.self, source: sourceDictionary["complete"]) return instance } - // Decoder for [Pet] Decoders.addDecoder(clazz: [Pet].self) { (source: AnyObject) -> [Pet] in return Decoders.decode(clazz: [Pet].self, source: source) } // Decoder for Pet Decoders.addDecoder(clazz: Pet.self) { (source: AnyObject) -> Pet in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Pet() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.category = Decoders.decodeOptional(clazz: Category.self, source: sourceDictionary["category"]) instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) instance.photoUrls = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["photoUrls"]) instance.tags = Decoders.decodeOptional(clazz: Array.self, source: sourceDictionary["tags"]) - instance.status = Pet.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") + instance.status = Pet.Status(rawValue: (sourceDictionary["status"] as? String) ?? "") return instance } - // Decoder for [Tag] Decoders.addDecoder(clazz: [Tag].self) { (source: AnyObject) -> [Tag] in return Decoders.decode(clazz: [Tag].self, source: source) } // Decoder for Tag Decoders.addDecoder(clazz: Tag.self) { (source: AnyObject) -> Tag in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = Tag() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.name = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["name"]) return instance } - // Decoder for [User] Decoders.addDecoder(clazz: [User].self) { (source: AnyObject) -> [User] in return Decoders.decode(clazz: [User].self, source: source) } // Decoder for User Decoders.addDecoder(clazz: User.self) { (source: AnyObject) -> User in - let sourceDictionary = source as! [NSObject:AnyObject] + let sourceDictionary = source as! [NSObject: AnyObject] let instance = User() instance.id = Decoders.decodeOptional(clazz: Int64.self, source: sourceDictionary["id"]) instance.username = Decoders.decodeOptional(clazz: String.self, source: sourceDictionary["username"]) diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index ea5e47f3cf..b3cbea28b6 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,6 @@ import Foundation - public class Category: JSONEncodable { public var id: Int64? public var name: String? @@ -16,10 +15,10 @@ public class Category: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["name"] = self.name - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 90dfd94122..bb7860b948 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,9 +7,8 @@ import Foundation - public class Order: JSONEncodable { - public enum Status: String { + public enum Status: String { case Placed = "placed" case Approved = "approved" case Delivered = "delivered" @@ -26,14 +25,14 @@ public class Order: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["petId"] = self.petId?.encodeToJSON() nillableDictionary["quantity"] = self.quantity?.encodeToJSON() nillableDictionary["shipDate"] = self.shipDate?.encodeToJSON() nillableDictionary["status"] = self.status?.rawValue nillableDictionary["complete"] = self.complete - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index f24e12684e..5fa39ec431 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,9 +7,8 @@ import Foundation - public class Pet: JSONEncodable { - public enum Status: String { + public enum Status: String { case Available = "available" case Pending = "pending" case Sold = "sold" @@ -26,14 +25,14 @@ public class Pet: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["category"] = self.category?.encodeToJSON() nillableDictionary["name"] = self.name nillableDictionary["photoUrls"] = self.photoUrls?.encodeToJSON() nillableDictionary["tags"] = self.tags?.encodeToJSON() nillableDictionary["status"] = self.status?.rawValue - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index d79d8df25e..df2d12e84f 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,6 @@ import Foundation - public class Tag: JSONEncodable { public var id: Int64? public var name: String? @@ -16,10 +15,10 @@ public class Tag: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["name"] = self.name - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/User.swift index c4032cd386..d24a215441 100644 --- a/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift/rxswift/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,6 @@ import Foundation - public class User: JSONEncodable { public var id: Int64? public var username: String? @@ -23,7 +22,7 @@ public class User: JSONEncodable { // MARK: JSONEncodable func encodeToJSON() -> AnyObject { - var nillableDictionary = [String:AnyObject?]() + var nillableDictionary = [String: AnyObject?]() nillableDictionary["id"] = self.id?.encodeToJSON() nillableDictionary["username"] = self.username nillableDictionary["firstName"] = self.firstName @@ -32,7 +31,7 @@ public class User: JSONEncodable { nillableDictionary["password"] = self.password nillableDictionary["phone"] = self.phone nillableDictionary["userStatus"] = self.userStatus?.encodeToJSON() - let dictionary: [String:AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] + let dictionary: [String: AnyObject] = APIHelper.rejectNil(nillableDictionary) ?? [:] return dictionary } } diff --git a/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClient/AppDelegate.swift index 387a825650..30d48791d7 100644 --- a/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClient/AppDelegate.swift +++ b/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClient/AppDelegate.swift @@ -13,7 +13,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true @@ -41,5 +40,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } - } diff --git a/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClient/ViewController.swift index 14180180be..3a45ba8fc5 100644 --- a/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClient/ViewController.swift +++ b/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClient/ViewController.swift @@ -20,5 +20,4 @@ class ViewController: UIViewController { // Dispose of any resources that can be recreated. } - } diff --git a/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift index 3074080455..60a8f61bd8 100644 --- a/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift +++ b/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -38,7 +38,7 @@ class PetAPITests: XCTestCase { newPet.status = .Available PetAPI.addPet(body: newPet).subscribe(onNext: { expectation.fulfill() - }, onError: { errorType in + }, onError: { _ in XCTFail("error creating pet") }, onCompleted: nil, onDisposed: nil).addDisposableTo(disposeBag) self.waitForExpectationsWithTimeout(testTimeout, handler: nil) @@ -50,7 +50,7 @@ class PetAPITests: XCTestCase { XCTAssert(pet.id == 1000, "invalid id") XCTAssert(pet.name == "Fluffy", "invalid name") expectation.fulfill() - }, onError: { errorType in + }, onError: { _ in XCTFail("error getting pet") }, onCompleted: nil, onDisposed: nil).addDisposableTo(disposeBag) self.waitForExpectationsWithTimeout(testTimeout, handler: nil) diff --git a/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift index dc80876611..d4f7a85c53 100644 --- a/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift +++ b/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift @@ -37,7 +37,7 @@ class StoreAPITests: XCTestCase { "Date should be idempotent") expectation.fulfill() - }, onError: { errorType in + }, onError: { _ in XCTFail("error placing order") }, onCompleted: nil, onDisposed: nil).addDisposableTo(disposeBag) self.waitForExpectationsWithTimeout(testTimeout, handler: nil) @@ -50,7 +50,7 @@ class StoreAPITests: XCTestCase { XCTAssert(order.quantity == 10, "invalid quantity") XCTAssert(order.status == .Placed, "invalid status") expectation.fulfill() - }, onError: { errorType in + }, onError: { _ in XCTFail("error placing order") }, onCompleted: nil, onDisposed: nil).addDisposableTo(disposeBag) self.waitForExpectationsWithTimeout(testTimeout, handler: nil) diff --git a/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift index c9fc3f0bd9..d0c7177aaf 100644 --- a/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift +++ b/samples/client/petstore/swift/rxswift/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift @@ -104,7 +104,7 @@ class UserAPITests: XCTestCase { XCTAssert(user.password == "test!", "invalid password") XCTAssert(user.phone == "867-5309", "invalid phone") expectation.fulfill() - }, onError: { errorType in + }, onError: { _ in XCTFail("error getting user") }, onCompleted: nil, onDisposed: nil).addDisposableTo(disposeBag) self.waitForExpectationsWithTimeout(testTimeout, handler: nil) diff --git a/samples/client/petstore/swift5/.gitignore b/samples/client/petstore/swift5/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/petstore/swift5/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/alamofireLibrary/.gitignore b/samples/client/petstore/swift5/alamofireLibrary/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift-promisekit/.openapi-generator-ignore b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator-ignore similarity index 78% rename from samples/client/petstore/swift-promisekit/.openapi-generator-ignore rename to samples/client/petstore/swift5/alamofireLibrary/.openapi-generator-ignore index c5fa491b4c..7484ee590a 100644 --- a/samples/client/petstore/swift-promisekit/.openapi-generator-ignore +++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator-ignore @@ -1,11 +1,11 @@ -# Swagger Codegen Ignore -# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator # Use this file to prevent files from being overwritten by the generator. # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: #ApiClient.cs # You can match any string of characters against a directory, file or extension with a single asterisk (*): diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION new file mode 100644 index 0000000000..58592f031f --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/alamofireLibrary/Cartfile b/samples/client/petstore/swift5/alamofireLibrary/Cartfile new file mode 100644 index 0000000000..7d30a6849b --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/Cartfile @@ -0,0 +1 @@ +github "Alamofire/Alamofire" ~> 4.9.1 diff --git a/samples/client/petstore/swift5/alamofireLibrary/Info.plist b/samples/client/petstore/swift5/alamofireLibrary/Info.plist new file mode 100644 index 0000000000..323e5ecfc4 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/Package.resolved b/samples/client/petstore/swift5/alamofireLibrary/Package.resolved new file mode 100644 index 0000000000..ca6137050e --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "Alamofire", + "repositoryURL": "https://github.com/Alamofire/Alamofire.git", + "state": { + "branch": null, + "revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4", + "version": "4.9.1" + } + } + ] + }, + "version": 1 +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/Package.swift b/samples/client/petstore/swift5/alamofireLibrary/Package.swift new file mode 100644 index 0000000000..9371b3d57b --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/Package.swift @@ -0,0 +1,32 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.1") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["Alamofire" ], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec new file mode 100644 index 0000000000..00711c5312 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' + s.dependency 'Alamofire', '~> 4.9.1' +end diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..5a3cb5019c --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,584 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */; }; + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A235FA3FDFB086CC69CDE83D /* Alamofire.framework */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlamofireImplementations.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Alamofire.framework; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D1990C2A394CCF025EF98A2F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 418DB36F23C53C6E2C3CDE39 /* Alamofire.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7861EE241895128F64DD7873 /* Carthage */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 84A201508DF2B697D65F2631 /* AlamofireImplementations.swift */, + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */, + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 7861EE241895128F64DD7873 /* Carthage */ = { + isa = PBXGroup; + children = ( + A012205B41CB71A62B86EECD /* iOS */, + ); + name = Carthage; + path = Carthage/Build; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + A012205B41CB71A62B86EECD /* iOS */ = { + isa = PBXGroup; + children = ( + A235FA3FDFB086CC69CDE83D /* Alamofire.framework */, + ); + path = iOS; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 40E46046D2B16D1A672A08E3 /* AlamofireImplementations.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 0000000000..26d510552b --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 0000000000..2000700968 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? [Any?] { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? [Any?] { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 0000000000..df7fa39367 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,62 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetstoreClientAPI { + public static var basePath = "http://petstore.swagger.io:80/v2" + public static var credential: URLCredential? + public static var customHeaders: [String: String] = [:] + public static var requestBuilderFactory: RequestBuilderFactory = AlamofireRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + public let parameters: [String: Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + public var onProgressReady: ((Progress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(PetstoreClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = PetstoreClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 0000000000..5bbf323f82 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,48 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class AnotherFakeAPI { + /** + To test special tags + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 0000000000..dfbb6b0224 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,619 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class FakeAPI { + /** + + - parameter body: (body) Input boolean as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input composite as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input number as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input string as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter query: (query) + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "query": query.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + To test \"client\" model + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "integer": integer?.encodeToJSON(), + "int32": int32?.encodeToJSON(), + "int64": int64?.encodeToJSON(), + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), + "date": date?.encodeToJSON(), + "dateTime": dateTime?.encodeToJSON(), + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - returns: RequestBuilder + */ + open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + Fake endpoint to test group parameters (optional) + + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), + "int64_group": int64Group?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + test inline additionalProperties + + - parameter param: (body) request body + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + test json serialization of form data + + - parameter param: (form) field1 + - parameter param2: (form) field2 + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 0000000000..48cfe7187b --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,51 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class FakeClassnameTags123API { + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 0000000000..0552d4a6c1 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,431 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetAPI { + /** + Add a new pet to the store + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Deletes a pet + + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + let nillableHeaders: [String: Any?] = [ + "api_key": apiKey?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + + - parameter status: (query) Status values that need to be considered for filter + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "status": status.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Finds Pets by tags + + - parameter tags: (query) Tags to filter by + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "tags": tags.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find pet by ID + + - parameter petId: (path) ID of pet to return + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Update an existing pet + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Updates a pet in the store with form data + + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image (required) + + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 0000000000..a8a83eda39 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,165 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class StoreAPI { + /** + Delete purchase order by ID + + - parameter orderId: (path) ID of the order that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Returns pet inventories by status + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find purchase order by ID + + - parameter orderId: (path) ID of pet that needs to be fetched + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Place an order for a pet + + - parameter body: (body) order placed for purchasing the pet + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { + let path = "/store/order" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 0000000000..505ed1b0c5 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,318 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class UserAPI { + /** + Create user + + - parameter body: (body) Created user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { + let path = "/user" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Delete user + + - parameter username: (path) The name that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Get user by user name + + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs user into the system + + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "username": username.encodeToJSON(), + "password": password.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs out current logged in user session + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + open class func logoutUserWithRequestBuilder() -> RequestBuilder { + let path = "/user/logout" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Updated user + + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift new file mode 100644 index 0000000000..001eede941 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -0,0 +1,377 @@ +// AlamofireImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Alamofire + +class AlamofireRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return AlamofireRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return AlamofireDecodableRequestBuilder.self + } +} + +// Store manager to retain its reference +private var managerStore = SynchronizedDictionary() + +open class AlamofireRequestBuilder: RequestBuilder { + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the session + configuration. + */ + open func createSessionManager() -> Alamofire.SessionManager { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + return Alamofire.SessionManager(configuration: configuration) + } + + /** + May be overridden by a subclass if you want to custom request constructor. + */ + open func createURLRequest() -> URLRequest? { + let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + guard let originalRequest = try? URLRequest(url: URLString, method: HTTPMethod(rawValue: method)!, headers: buildHeaders()) else { return nil } + return try? encoding.encode(originalRequest, with: parameters) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the request + configuration (e.g. to override the cache policy). + */ + open func makeRequest(manager: SessionManager, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) -> DataRequest { + return manager.request(URLString, method: method, parameters: parameters, encoding: encoding, headers: headers) + } + + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + let managerId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let manager = createSessionManager() + managerStore[managerId] = manager + + let encoding: ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() + + let xMethod = Alamofire.HTTPMethod(rawValue: method) + let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } + .map { $0.0 } + + if fileKeys.count > 0 { + manager.upload(multipartFormData: { mpForm in + for (k, v) in self.parameters! { + switch v { + case let fileURL as URL: + if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { + mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) + } else { + mpForm.append(fileURL, withName: k) + } + case let string as String: + mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k) + case let number as NSNumber: + mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k) + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + }, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in + switch encodingResult { + case .success(let upload, _, _): + if let onProgressReady = self.onProgressReady { + onProgressReady(upload.uploadProgress) + } + self.processRequest(request: upload, managerId, apiResponseQueue, completion) + case .failure(let encodingError): + apiResponseQueue.async { + completion(.failure(ErrorResponse.error(415, nil, encodingError))) + } + } + }) + } else { + let request = makeRequest(manager: manager, method: xMethod!, encoding: encoding, headers: headers) + if let onProgressReady = self.onProgressReady { + onProgressReady(request.progress) + } + processRequest(request: request, managerId, apiResponseQueue, completion) + } + + } + + fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + managerStore[managerId] = nil + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { (stringResponse) in + cleanupRequest() + + switch stringResponse.result { + case let .success(value): + completion(.success(Response(response: stringResponse.response!, body: value as? T))) + case let .failure(error): + completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, error))) + } + + }) + case is URL.Type: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in + cleanupRequest() + + do { + + guard !dataResponse.result.isFailure else { + throw DownloadException.responseFailed + } + + guard let data = dataResponse.data else { + throw DownloadException.responseDataMissing + } + + guard let request = request.request else { + throw DownloadException.requestMissing + } + + let fileManager = FileManager.default + let urlRequest = try request.asURLRequest() + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: dataResponse.response?.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: dataResponse.response!, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, dataResponse.data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, dataResponse.data, error))) + } + return + }) + case is Void.Type: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (voidResponse) in + cleanupRequest() + + switch voidResponse.result { + case .success: + completion(.success(Response(response: voidResponse.response!, body: nil))) + case let .failure(error): + completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, error))) + } + + }) + default: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in + cleanupRequest() + + switch dataResponse.result { + case .success: + completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T))) + case let .failure(error): + completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, error))) + } + + }) + } + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = SessionManager.defaultHTTPHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { + + override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { + if let credential = self.credential { + request.authenticate(usingCredential: credential) + } + + let cleanupRequest = { + managerStore[managerId] = nil + } + + let validatedRequest = request.validate() + + switch T.self { + case is String.Type: + validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { (stringResponse) in + cleanupRequest() + + switch stringResponse.result { + case let .success(value): + completion(.success(Response(response: stringResponse.response!, body: value as? T))) + case let .failure(error): + completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, error))) + } + + }) + case is Void.Type: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (voidResponse) in + cleanupRequest() + + switch voidResponse.result { + case .success: + completion(.success(Response(response: voidResponse.response!, body: nil))) + case let .failure(error): + completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, error))) + } + + }) + case is Data.Type: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in + cleanupRequest() + + switch dataResponse.result { + case .success: + completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T))) + case let .failure(error): + completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, error))) + } + + }) + default: + validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse: DataResponse) in + cleanupRequest() + + guard dataResponse.result.isSuccess else { + completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!))) + return + } + + guard let data = dataResponse.data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(-1, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + guard let httpResponse = dataResponse.response else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + + }) + } + } + +} + +extension JSONDataEncoding: ParameterEncoding { + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { + let urlRequest = try urlRequest.asURLRequest() + + return self.encode(urlRequest, with: parameters) + } +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 0000000000..32e194f6ee --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + open class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + open class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 0000000000..627d9adb75 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 0000000000..74fcfcf2ad --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 0000000000..b79e9f5e64 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 0000000000..02f78ffb47 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 0000000000..b9757b6cbc --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,51 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +public enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 0000000000..1af0315359 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,25 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 0000000000..5ed9f31e2a --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,20 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 0000000000..e09b0e9efd --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 0000000000..ec270da890 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,22 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 0000000000..6c252ed475 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 0000000000..e84eb5d650 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 0000000000..d2140933d1 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,28 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 0000000000..d1b3b27616 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,38 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 0000000000..7ab887f311 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,22 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 0000000000..a51ad0dffa --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,18 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 0000000000..eb8f7e5e19 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,20 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String = "default-name" + + public init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 0000000000..e2a7d4427a --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ +public struct ClassModel: Codable { + + public var _class: String? + + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 0000000000..00245ca372 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,18 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 0000000000..492c122800 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,22 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 0000000000..7786f8acc5 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,18 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 0000000000..9844e7c40e --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,33 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable, CaseIterable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable, CaseIterable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 0000000000..d4029d73f8 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 0000000000..789f583e1d --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,52 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable, CaseIterable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 0000000000..abf3ccffc4 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 0000000000..532f145793 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,20 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 0000000000..20bd6d103b --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,42 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 0000000000..906ddb06fb --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,20 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 0000000000..fe13d302cc --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,22 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 0000000000..4b6037f378 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,35 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 0000000000..c3deb2f289 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,22 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 0000000000..b61db7d6e7 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 0000000000..8ab4db44b7 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 0000000000..4d1dafcc2c --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,22 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 0000000000..40c30cc860 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,34 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 0000000000..18c3a024f1 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,28 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 0000000000..c3b778cbbe --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 0000000000..b9ce0e9332 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,34 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + + public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 0000000000..0acd21fd10 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,20 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 0000000000..c223f993a6 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ +public struct Return: Codable { + + public var _return: Int? + + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 0000000000..6e8650f76d --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,22 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 0000000000..3f1237fee4 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 0000000000..4dd8a9a9f5 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,20 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 0000000000..a9e088808e --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,34 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 0000000000..dff4083ae4 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,34 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 0000000000..79f271ed73 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,33 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 0000000000..e06208074c --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +public class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override public func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/README.md b/samples/client/petstore/swift5/alamofireLibrary/README.md new file mode 100644 index 0000000000..a50bf382e3 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/README.md @@ -0,0 +1,141 @@ +# Swift5 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/.gitignore b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/.gitignore new file mode 100644 index 0000000000..0269c2f56d --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/.gitignore @@ -0,0 +1,72 @@ +### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile new file mode 100644 index 0000000000..77432f9eee --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile @@ -0,0 +1,13 @@ +platform :ios, '9.0' + +source 'https://cdn.cocoapods.org/' + +use_frameworks! + +target 'SwaggerClient' do + pod "PetstoreClient", :path => "../" + + target 'SwaggerClientTests' do + inherit! :search_paths + end +end diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile.lock new file mode 100644 index 0000000000..e8fcc297cc --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/Podfile.lock @@ -0,0 +1,23 @@ +PODS: + - Alamofire (4.9.1) + - PetstoreClient (1.0.0): + - Alamofire (~> 4.9.1) + +DEPENDENCIES: + - PetstoreClient (from `../`) + +SPEC REPOS: + trunk: + - Alamofire + +EXTERNAL SOURCES: + PetstoreClient: + :path: "../" + +SPEC CHECKSUMS: + Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18 + PetstoreClient: bc687d8c4d0c762098d72690e220cae37e281311 + +PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c + +COCOAPODS: 1.8.4 diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..7eef7443ab --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -0,0 +1,556 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1A501F48219C3DC600F372F6 /* DateFormatTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */; }; + 23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */; }; + 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */; }; + 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB961C692C6300B96B06 /* ViewController.swift */; }; + 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB981C692C6300B96B06 /* Main.storyboard */; }; + 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */; }; + 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */; }; + 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */; }; + 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */; }; + 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */; }; + FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6D4EFB891C692C6300B96B06 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6D4EFB901C692C6300B96B06; + remoteInfo = SwaggerClient; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; + 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateFormatTests.swift; sourceTree = ""; }; + 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 6D4EFB961C692C6300B96B06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 6D4EFB991C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 6D4EFB9E1C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 6D4EFBA01C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D4EFBAB1C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = ""; }; + 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = ""; }; + 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = ""; }; + 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; + C07EC0A94AA0F86D60668B32 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; + ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6D4EFB8E1C692C6300B96B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA21C692C6300B96B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 203D4495376E4EB72474B091 /* Pods */ = { + isa = PBXGroup; + children = ( + 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */, + ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */, + E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */, + ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 3FABC56EC0BA84CBF4F99564 /* Frameworks */ = { + isa = PBXGroup; + children = ( + C07EC0A94AA0F86D60668B32 /* Pods.framework */, + 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */, + 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6D4EFB881C692C6300B96B06 = { + isa = PBXGroup; + children = ( + 6D4EFB931C692C6300B96B06 /* SwaggerClient */, + 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */, + 6D4EFB921C692C6300B96B06 /* Products */, + 3FABC56EC0BA84CBF4F99564 /* Frameworks */, + 203D4495376E4EB72474B091 /* Pods */, + ); + sourceTree = ""; + }; + 6D4EFB921C692C6300B96B06 /* Products */ = { + isa = PBXGroup; + children = ( + 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */, + 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 6D4EFB931C692C6300B96B06 /* SwaggerClient */ = { + isa = PBXGroup; + children = ( + 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */, + 6D4EFB961C692C6300B96B06 /* ViewController.swift */, + 6D4EFB981C692C6300B96B06 /* Main.storyboard */, + 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */, + 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */, + 6D4EFBA01C692C6300B96B06 /* Info.plist */, + ); + path = SwaggerClient; + sourceTree = ""; + }; + 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */ = { + isa = PBXGroup; + children = ( + 6D4EFBAB1C692C6300B96B06 /* Info.plist */, + 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */, + 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */, + 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */, + 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */, + ); + path = SwaggerClientTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 6D4EFB901C692C6300B96B06 /* SwaggerClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */; + buildPhases = ( + 5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */, + 6D4EFB8D1C692C6300B96B06 /* Sources */, + 6D4EFB8E1C692C6300B96B06 /* Frameworks */, + 6D4EFB8F1C692C6300B96B06 /* Resources */, + FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwaggerClient; + productName = SwaggerClient; + productReference = 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */; + productType = "com.apple.product-type.application"; + }; + 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */; + buildPhases = ( + EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */, + 6D4EFBA11C692C6300B96B06 /* Sources */, + 6D4EFBA21C692C6300B96B06 /* Frameworks */, + 6D4EFBA31C692C6300B96B06 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */, + ); + name = SwaggerClientTests; + productName = SwaggerClientTests; + productReference = 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6D4EFB891C692C6300B96B06 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = Swagger; + TargetAttributes = { + 6D4EFB901C692C6300B96B06 = { + CreatedOnToolsVersion = 7.2.1; + LastSwiftMigration = 1130; + }; + 6D4EFBA41C692C6300B96B06 = { + CreatedOnToolsVersion = 7.2.1; + LastSwiftMigration = 1130; + TestTargetID = 6D4EFB901C692C6300B96B06; + }; + }; + }; + buildConfigurationList = 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 6D4EFB881C692C6300B96B06; + productRefGroup = 6D4EFB921C692C6300B96B06 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6D4EFB901C692C6300B96B06 /* SwaggerClient */, + 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 6D4EFB8F1C692C6300B96B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */, + 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */, + 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA31C692C6300B96B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", + "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6D4EFB8D1C692C6300B96B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */, + 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA11C692C6300B96B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */, + 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */, + 1A501F48219C3DC600F372F6 /* DateFormatTests.swift in Sources */, + 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6D4EFB901C692C6300B96B06 /* SwaggerClient */; + targetProxy = 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 6D4EFB981C692C6300B96B06 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6D4EFB991C692C6300B96B06 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6D4EFB9E1C692C6300B96B06 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 6D4EFBAC1C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 6D4EFBAD1C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 6D4EFBAF1C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 6D4EFBB01C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 6D4EFBB21C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Debug; + }; + 6D4EFBB31C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBAC1C692C6300B96B06 /* Debug */, + 6D4EFBAD1C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBAF1C692C6300B96B06 /* Debug */, + 6D4EFBB01C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBB21C692C6300B96B06 /* Debug */, + 6D4EFBB31C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6D4EFB891C692C6300B96B06 /* Project object */; +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme new file mode 100644 index 0000000000..617a081d97 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..9b3fa18954 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift new file mode 100644 index 0000000000..b1896774c7 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift @@ -0,0 +1,43 @@ +// +// AppDelegate.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..1d060ed288 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..2e721e1833 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..3a2a49bad8 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Info.plist new file mode 100644 index 0000000000..bb71d00fa8 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/Info.plist @@ -0,0 +1,59 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift new file mode 100644 index 0000000000..8dad16b10f --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift @@ -0,0 +1,23 @@ +// +// ViewController.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift new file mode 100644 index 0000000000..e18a104f3a --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift @@ -0,0 +1,114 @@ +// +// DateFormatTests.swift +// SwaggerClientTests +// +// Created by James on 14/11/2018. +// Copyright © 2018 Swagger. All rights reserved. +// + +import Foundation +import XCTest +@testable import PetstoreClient +@testable import SwaggerClient + +class DateFormatTests: XCTestCase { + + struct DateTest: Codable { + let date: Date + } + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testEncodeToJSONAlwaysResultsInUTCEncodedDate() { + var dateComponents = DateComponents() + dateComponents.calendar = Calendar(identifier: .gregorian) + dateComponents.year = 2018 + dateComponents.month = 11 + dateComponents.day = 14 + dateComponents.hour = 11 + dateComponents.minute = 35 + dateComponents.second = 43 + dateComponents.nanosecond = 500 + + // Testing a date with a timezone of +00:00 (UTC) + dateComponents.timeZone = TimeZone(secondsFromGMT: 0) + XCTAssert(dateComponents.isValidDate) + + guard let utcDate = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + var encodedDate = utcDate.encodeToJSON() as! String + XCTAssert(encodedDate.hasSuffix("Z")) + + // test with a positive timzone offset from UTC + dateComponents.timeZone = TimeZone(secondsFromGMT: 60 * 60) // +01:00 + XCTAssert(dateComponents.isValidDate) + + guard let nonUTCDate1 = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + encodedDate = nonUTCDate1.encodeToJSON() as! String + XCTAssert(encodedDate.hasSuffix("Z")) + + // test with a negative timzone offset from UTC + dateComponents.timeZone = TimeZone(secondsFromGMT: -(60 * 60)) // -01:00 + XCTAssert(dateComponents.isValidDate) + + guard let nonUTCDate2 = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + encodedDate = nonUTCDate2.encodeToJSON() as! String + XCTAssert(encodedDate.hasSuffix("Z")) + } + + func testCodableAlwaysResultsInUTCEncodedDate() throws { + CodableHelper.jsonEncoder.outputFormatting.remove(.prettyPrinted) + let jsonData = "{\"date\":\"1970-01-01T00:00:00.000Z\"}".data(using: .utf8)! + let decodeResult = CodableHelper.decode(DateTest.self, from: jsonData) + _ = try decodeResult.get() + + var dateComponents = DateComponents() + dateComponents.calendar = Calendar(identifier: .gregorian) + dateComponents.year = 1970 + dateComponents.month = 01 + dateComponents.day = 01 + dateComponents.hour = 00 + dateComponents.minute = 00 + dateComponents.second = 00 + + // Testing a date with a timezone of +00:00 (UTC) + dateComponents.timeZone = TimeZone(secondsFromGMT: 0) + XCTAssert(dateComponents.isValidDate) + + guard let date = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + let dateTest = DateTest(date: date) + let encodeResult = CodableHelper.encode(dateTest) + let data = try encodeResult.get() + guard let jsonString = String(data: data, encoding: .utf8) else { + XCTFail("Unable to convert encoded data to string.") + return + } + + let exampleJSONString = "{\"date\":\"1970-01-01T00:00:00.000Z\"}" + XCTAssert(jsonString == exampleJSONString, "Encoded JSON String: \(jsonString) should match: \(exampleJSONString)") + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist new file mode 100644 index 0000000000..802f84f540 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift new file mode 100644 index 0000000000..6be5bc6d29 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -0,0 +1,80 @@ +// +// PetAPITests.swift +// SwaggerClient +// +// Created by Robin Eggenkamp on 5/21/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import XCTest +@testable import SwaggerClient + +class PetAPITests: XCTestCase { + + let testTimeout = 10.0 + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func test1CreatePet() { + let expectation = self.expectation(description: "testCreatePet") + let category = PetstoreClient.Category(id: 1234, name: "eyeColor") + let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] + let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + + PetAPI.addPet(body: newPet) { (_, error) in + guard error == nil else { + XCTFail("error creating pet") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetPet() { + let expectation = self.expectation(description: "testGetPet") + + PetAPI.getPetById(petId: 1000) { (pet, error) in + guard error == nil else { + XCTFail("error retrieving pet") + return + } + + if let pet = pet { + XCTAssert(pet.id == 1000, "invalid id") + XCTAssert(pet.name == "Fluffy", "invalid name") + + expectation.fulfill() + } + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeletePet() { + let expectation = self.expectation(description: "testDeletePet") + + PetAPI.deletePet(petId: 1000) { (_, error) in + guard error == nil else { + XCTFail("error deleting pet") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift new file mode 100644 index 0000000000..c49f47eee0 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift @@ -0,0 +1,120 @@ +// +// StoreAPITests.swift +// SwaggerClient +// +// Created by Robin Eggenkamp on 5/21/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import XCTest +@testable import SwaggerClient + +class StoreAPITests: XCTestCase { + + let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" + + let testTimeout = 10.0 + + func test1PlaceOrder() { + // use explicit naming to reference the enum so that we test we don't regress on enum naming + let shipDate = Date() + let order = Order(id: 1000, petId: 1000, quantity: 10, shipDate: shipDate, status: .placed, complete: true) + let expectation = self.expectation(description: "testPlaceOrder") + + StoreAPI.placeOrder(body: order) { (order, error) in + guard error == nil else { + XCTFail("error placing order: \(error.debugDescription)") + return + } + + if let order = order { + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat), + "Date should be idempotent") + + expectation.fulfill() + } + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetOrder() { + let expectation = self.expectation(description: "testGetOrder") + + StoreAPI.getOrderById(orderId: 1000) { (order, error) in + guard error == nil else { + XCTFail("error retrieving order: \(error.debugDescription)") + return + } + + if let order = order { + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + + expectation.fulfill() + } + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeleteOrder() { + let expectation = self.expectation(description: "testDeleteOrder") + + StoreAPI.deleteOrder(orderId: "1000") { (response, error) in + guard error == nil else { + XCTFail("error deleting order") + return + } + + guard let _ = response else { + XCTFail("response is nil") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testDownloadProgress() { + let responseExpectation = self.expectation(description: "obtain response") + let progressExpectation = self.expectation(description: "obtain progress") + let requestBuilder = StoreAPI.getOrderByIdWithRequestBuilder(orderId: 1000) + + requestBuilder.onProgressReady = { (progress) in + progressExpectation.fulfill() + } + + requestBuilder.execute { _ in + responseExpectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} + +private extension Date { + + /** + Returns true if the dates are equal given the format string. + + - parameter date: The date to compare to. + - parameter format: The format string to use to compare. + + - returns: true if the dates are equal, given the format string. + */ + func isEqual(_ date: Date, format: String) -> Bool { + let fmt = DateFormatter() + fmt.dateFormat = format + return fmt.string(from: self).isEqual(fmt.string(from: date)) + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift new file mode 100644 index 0000000000..0a1ca3902e --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift @@ -0,0 +1,67 @@ +// +// UserAPITests.swift +// SwaggerClient +// +// Created by Robin Eggenkamp on 5/21/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import XCTest +@testable import SwaggerClient + +class UserAPITests: XCTestCase { + + let testTimeout = 10.0 + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testLogin() { + let expectation = self.expectation(description: "testLogin") + + UserAPI.loginUser(username: "swiftTester", password: "swift") { (_, error) in + guard error == nil else { + XCTFail("error logging in") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testLogout() { + let expectation = self.expectation(description: "testLogout") + + UserAPI.logoutUser { (_, error) in + guard error == nil else { + XCTFail("error logging out") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testPathParamsAreEscaped() { + // The path for this operation is /user/{userId}. In order to make a usable path, + // then we must make sure that {userId} is percent-escaped when it is substituted + // into the path. So we intentionally introduce a path with spaces. + let userRequestBuilder = UserAPI.getUserByNameWithRequestBuilder(username: "User Name With Spaces") + let urlContainsSpace = userRequestBuilder.URLString.contains(" ") + + XCTAssert(!urlContainsSpace, "Expected URL to be escaped, but it was not.") + } + +} diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/pom.xml b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/pom.xml new file mode 100644 index 0000000000..bdaa6b98af --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift4PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift4 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_xcodebuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/run_xcodebuild.sh new file mode 100755 index 0000000000..19e1e06dad --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/SwaggerClientTests/run_xcodebuild.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +pod install + +xcodebuild clean build build-for-testing -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" && xcodebuild test-without-building -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/alamofireLibrary/docs/AdditionalPropertiesClass.md new file mode 100644 index 0000000000..e22d28be1d --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Animal.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Animal.md new file mode 100644 index 0000000000..69c601455c --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/AnimalFarm.md b/samples/client/petstore/swift5/alamofireLibrary/docs/AnimalFarm.md new file mode 100644 index 0000000000..df6bab21da --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/AnotherFakeAPI.md new file mode 100644 index 0000000000..aead5f1f98 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/AnotherFakeAPI.md @@ -0,0 +1,59 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/ApiResponse.md b/samples/client/petstore/swift5/alamofireLibrary/docs/ApiResponse.md new file mode 100644 index 0000000000..c6d9768fe9 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/alamofireLibrary/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 0000000000..c6fceff5e0 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/alamofireLibrary/docs/ArrayOfNumberOnly.md new file mode 100644 index 0000000000..f09f8fa6f7 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/ArrayTest.md b/samples/client/petstore/swift5/alamofireLibrary/docs/ArrayTest.md new file mode 100644 index 0000000000..bf416b8330 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Capitalization.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Capitalization.md new file mode 100644 index 0000000000..95374216c7 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Cat.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Cat.md new file mode 100644 index 0000000000..fb5949b157 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/alamofireLibrary/docs/CatAllOf.md new file mode 100644 index 0000000000..79789be61c --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Category.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Category.md new file mode 100644 index 0000000000..5ca5408c0f --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/ClassModel.md b/samples/client/petstore/swift5/alamofireLibrary/docs/ClassModel.md new file mode 100644 index 0000000000..e3912fdf0f --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Client.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Client.md new file mode 100644 index 0000000000..0de1b238c3 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Dog.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Dog.md new file mode 100644 index 0000000000..4824786da0 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/alamofireLibrary/docs/DogAllOf.md new file mode 100644 index 0000000000..9302ef52e9 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/EnumArrays.md b/samples/client/petstore/swift5/alamofireLibrary/docs/EnumArrays.md new file mode 100644 index 0000000000..b9a9807d3c --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/EnumClass.md b/samples/client/petstore/swift5/alamofireLibrary/docs/EnumClass.md new file mode 100644 index 0000000000..67f017becd --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/EnumTest.md b/samples/client/petstore/swift5/alamofireLibrary/docs/EnumTest.md new file mode 100644 index 0000000000..bc9b036dd7 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md new file mode 100644 index 0000000000..49d4d3fb6a --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeAPI.md @@ -0,0 +1,662 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeClassnameTags123API.md new file mode 100644 index 0000000000..9f24b46edb --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FakeClassnameTags123API.md @@ -0,0 +1,59 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/File.md b/samples/client/petstore/swift5/alamofireLibrary/docs/File.md new file mode 100644 index 0000000000..3edfef17b7 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FileSchemaTestClass.md new file mode 100644 index 0000000000..afdacc60b2 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/alamofireLibrary/docs/FormatTest.md new file mode 100644 index 0000000000..f74d94f6c4 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/alamofireLibrary/docs/HasOnlyReadOnly.md new file mode 100644 index 0000000000..57b6e3a17e --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/List.md b/samples/client/petstore/swift5/alamofireLibrary/docs/List.md new file mode 100644 index 0000000000..b77718302e --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/MapTest.md b/samples/client/petstore/swift5/alamofireLibrary/docs/MapTest.md new file mode 100644 index 0000000000..56213c4113 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/alamofireLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 0000000000..fcffb8ecdb --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Model200Response.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Model200Response.md new file mode 100644 index 0000000000..5865ea690c --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Name.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Name.md new file mode 100644 index 0000000000..f7b180292c --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/NumberOnly.md b/samples/client/petstore/swift5/alamofireLibrary/docs/NumberOnly.md new file mode 100644 index 0000000000..72bd361168 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Order.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Order.md new file mode 100644 index 0000000000..15487f0117 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/OuterComposite.md b/samples/client/petstore/swift5/alamofireLibrary/docs/OuterComposite.md new file mode 100644 index 0000000000..d6b3583bc3 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/OuterEnum.md b/samples/client/petstore/swift5/alamofireLibrary/docs/OuterEnum.md new file mode 100644 index 0000000000..06d413b016 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Pet.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Pet.md new file mode 100644 index 0000000000..5c05f98fad --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md new file mode 100644 index 0000000000..27efe08334 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/PetAPI.md @@ -0,0 +1,469 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/alamofireLibrary/docs/ReadOnlyFirst.md new file mode 100644 index 0000000000..ed537b8759 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Return.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Return.md new file mode 100644 index 0000000000..66d17c27c8 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/SpecialModelName.md b/samples/client/petstore/swift5/alamofireLibrary/docs/SpecialModelName.md new file mode 100644 index 0000000000..3ec27a38c2 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md new file mode 100644 index 0000000000..36365ca519 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md @@ -0,0 +1,206 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/StringBooleanMap.md b/samples/client/petstore/swift5/alamofireLibrary/docs/StringBooleanMap.md new file mode 100644 index 0000000000..7abf11ec68 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/Tag.md b/samples/client/petstore/swift5/alamofireLibrary/docs/Tag.md new file mode 100644 index 0000000000..ff4ac8aa45 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/alamofireLibrary/docs/TypeHolderDefault.md new file mode 100644 index 0000000000..5161394bdc --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/TypeHolderExample.md b/samples/client/petstore/swift5/alamofireLibrary/docs/TypeHolderExample.md new file mode 100644 index 0000000000..46d0471cd7 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/User.md b/samples/client/petstore/swift5/alamofireLibrary/docs/User.md new file mode 100644 index 0000000000..5a439de0ff --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/UserAPI.md new file mode 100644 index 0000000000..380813bc68 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/UserAPI.md @@ -0,0 +1,406 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/alamofireLibrary/git_push.sh b/samples/client/petstore/swift5/alamofireLibrary/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/alamofireLibrary/pom.xml b/samples/client/petstore/swift5/alamofireLibrary/pom.xml new file mode 100644 index 0000000000..c1b201eb3b --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/project.yml b/samples/client/petstore/swift5/alamofireLibrary/project.yml new file mode 100644 index 0000000000..148b42517b --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/project.yml @@ -0,0 +1,15 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + dependencies: + - carthage: Alamofire diff --git a/samples/client/petstore/swift5/alamofireLibrary/run_spmbuild.sh b/samples/client/petstore/swift5/alamofireLibrary/run_spmbuild.sh new file mode 100755 index 0000000000..1a9f585ad0 --- /dev/null +++ b/samples/client/petstore/swift5/alamofireLibrary/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/combineLibrary/.gitignore b/samples/client/petstore/swift5/combineLibrary/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator-ignore b/samples/client/petstore/swift5/combineLibrary/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION new file mode 100644 index 0000000000..58592f031f --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/Cartfile b/samples/client/petstore/swift5/combineLibrary/Cartfile new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/Cartfile @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/swift5/combineLibrary/Info.plist b/samples/client/petstore/swift5/combineLibrary/Info.plist new file mode 100644 index 0000000000..323e5ecfc4 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/combineLibrary/Package.swift b/samples/client/petstore/swift5/combineLibrary/Package.swift new file mode 100644 index 0000000000..96dfff54ed --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: [], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.podspec new file mode 100644 index 0000000000..b61285f6b2 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' +end diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6f8918eb33 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,536 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11F49B24B6239C324722572C /* URLSessionImplementations.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */, + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */, + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 0000000000..26d510552b --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 0000000000..2000700968 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? [Any?] { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? [Any?] { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 0000000000..e4cbda9c72 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,64 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetstoreClientAPI { + public static var basePath = "http://petstore.swagger.io:80/v2" + public static var credential: URLCredential? + public static var customHeaders: [String: String] = [:] + public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + public let parameters: [String: Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client. + public var onProgressReady: ((Progress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(PetstoreClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = PetstoreClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 0000000000..2df909dec9 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,52 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Combine + +open class AnotherFakeAPI { + /** + To test special tags + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 0000000000..442dd29191 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,656 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Combine + +open class FakeAPI { + /** + + - parameter body: (body) Input boolean as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input composite as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input number as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input string as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter query: (query) + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "query": query.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + To test \"client\" model + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "integer": integer?.encodeToJSON(), + "int32": int32?.encodeToJSON(), + "int64": int64?.encodeToJSON(), + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), + "date": date?.encodeToJSON(), + "dateTime": dateTime?.encodeToJSON(), + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - returns: RequestBuilder + */ + open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + Fake endpoint to test group parameters (optional) + + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), + "int64_group": int64Group?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + test inline additionalProperties + + - parameter param: (body) request body + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + test json serialization of form data + + - parameter param: (form) field1 + - parameter param2: (form) field2 + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 0000000000..6f0401af88 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,55 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Combine + +open class FakeClassnameTags123API { + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 0000000000..a1dbbb6af8 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,459 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Combine + +open class PetAPI { + /** + Add a new pet to the store + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Deletes a pet + + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + let nillableHeaders: [String: Any?] = [ + "api_key": apiKey?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + + - parameter status: (query) Status values that need to be considered for filter + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher<[Pet], Error> + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<[Pet], Error> { + return Future<[Pet], Error>.init { promisse in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "status": status.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Finds Pets by tags + + - parameter tags: (query) Tags to filter by + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher<[Pet], Error> + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<[Pet], Error> { + return Future<[Pet], Error>.init { promisse in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "tags": tags.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find pet by ID + + - parameter petId: (path) ID of pet to return + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Update an existing pet + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Updates a pet in the store with form data + + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image (required) + + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 0000000000..b36a3a30c3 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,178 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Combine + +open class StoreAPI { + /** + Delete purchase order by ID + + - parameter orderId: (path) ID of the order that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Returns pet inventories by status + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher<[String:Int], Error> + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<[String: Int], Error> { + return Future<[String: Int], Error>.init { promisse in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find purchase order by ID + + - parameter orderId: (path) ID of pet that needs to be fetched + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Place an order for a pet + + - parameter body: (body) order placed for purchasing the pet + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { + let path = "/store/order" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 0000000000..3d5694cc93 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,343 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import Combine + +open class UserAPI { + /** + Create user + + - parameter body: (body) Created user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { + let path = "/user" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Delete user + + - parameter username: (path) The name that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Get user by user name + + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs user into the system + + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + promisse(.success(response.body!)) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "username": username.encodeToJSON(), + "password": password.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs out current logged in user session + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + open class func logoutUserWithRequestBuilder() -> RequestBuilder { + let path = "/user/logout" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Updated user + + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: AnyPublisher + */ + @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + return Future.init { promisse in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + promisse(.success(())) + case let .failure(error): + promisse(.failure(error)) + } + } + }.eraseToAnyPublisher() + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 0000000000..32e194f6ee --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + open class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + open class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 0000000000..627d9adb75 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 0000000000..74fcfcf2ad --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 0000000000..b79e9f5e64 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 0000000000..02f78ffb47 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 0000000000..b9757b6cbc --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,51 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +public enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 0000000000..1af0315359 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,25 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 0000000000..5ed9f31e2a --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,20 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 0000000000..e09b0e9efd --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 0000000000..ec270da890 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,22 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 0000000000..6c252ed475 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 0000000000..e84eb5d650 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 0000000000..d2140933d1 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,28 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 0000000000..d1b3b27616 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,38 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 0000000000..7ab887f311 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,22 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 0000000000..a51ad0dffa --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,18 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 0000000000..eb8f7e5e19 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,20 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String = "default-name" + + public init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 0000000000..e2a7d4427a --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ +public struct ClassModel: Codable { + + public var _class: String? + + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 0000000000..00245ca372 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,18 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 0000000000..492c122800 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,22 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 0000000000..7786f8acc5 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,18 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 0000000000..9844e7c40e --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,33 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable, CaseIterable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable, CaseIterable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 0000000000..d4029d73f8 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 0000000000..789f583e1d --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,52 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable, CaseIterable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 0000000000..abf3ccffc4 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 0000000000..532f145793 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,20 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 0000000000..20bd6d103b --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,42 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 0000000000..906ddb06fb --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,20 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 0000000000..fe13d302cc --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,22 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 0000000000..4b6037f378 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,35 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 0000000000..c3deb2f289 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,22 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 0000000000..b61db7d6e7 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 0000000000..8ab4db44b7 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 0000000000..4d1dafcc2c --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,22 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 0000000000..40c30cc860 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,34 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 0000000000..18c3a024f1 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,28 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 0000000000..c3b778cbbe --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 0000000000..b9ce0e9332 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,34 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + + public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 0000000000..0acd21fd10 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,20 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 0000000000..c223f993a6 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ +public struct Return: Codable { + + public var _return: Int? + + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 0000000000..6e8650f76d --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,22 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 0000000000..3f1237fee4 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 0000000000..4dd8a9a9f5 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,20 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 0000000000..a9e088808e --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,34 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 0000000000..dff4083ae4 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,34 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 0000000000..79f271ed73 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,33 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 0000000000..e06208074c --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +public class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override public func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift new file mode 100644 index 0000000000..9e552cce09 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -0,0 +1,544 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +open class URLSessionRequestBuilder: RequestBuilder { + + let progress = Progress() + + private var observation: NSKeyValueObservation? + + deinit { + observation?.invalidate() + } + + fileprivate let sessionDelegate = SessionDelegate() + + /** + May be assigned if you want to control the authentication challenges. + */ + public var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - intercept and handle errors like authorization + - retry the request. + */ + public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the URLSession + configuration. + */ + open func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + + guard let url = URL(string: URLString) else { + throw DownloadException.requestMissingURL + } + + var originalRequest = URLRequest(url: url) + + originalRequest.httpMethod = method.rawValue + + buildHeaders().forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + headers.forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) + + return modifiedRequest + } + + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { + let urlSessionId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + let parameters: [String: Any] = self.parameters ?? [:] + + let fileKeys = parameters.filter { $1 is NSURL } + .map { $0.0 } + + let encoding: ParameterEncoding + if fileKeys.count > 0 { + encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) + } else if isBody { + encoding = JSONDataEncoding() + } else { + encoding = URLEncoding() + } + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsuported Http method - \(method)") + } + + let cleanupRequest = { + urlSessionStore[urlSessionId] = nil + self.observation?.invalidate() + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in + + guard let self = self else { return } + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in + + guard let self = self else { return } + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { + observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in + self.progress.totalUnitCount = newProgress.totalUnitCount + self.progress.completedUnitCount = newProgress.completedUnitCount + } + + onProgressReady?(progress) + } + + dataTask.resume() + + } catch { + apiResponseQueue.async { + cleanupRequest() + completion(.failure(ErrorResponse.error(415, nil, error))) + } + } + + } + + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: httpResponse, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, data, error))) + } + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = PetstoreClientAPI.customHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + case is Data.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + guard let data = data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + } + } +} + +private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + + var credential: URLCredential? + + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +public protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +private class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +private class FileUploadEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + for (k, v) in parameters ?? [:] { + switch v { + case let fileURL as URL: + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: fileURL.lastPathComponent, data: fileData, mimeType: mimetype) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, name: String, data: Data, mimeType: String?) -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody ?? Data() + + // https://stackoverflow.com/a/26163136/976628 + let boundary = "Boundary-\(UUID().uuidString)" + urlRequest.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") + + body.append("--\(boundary)\r\n") + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(name)\"\r\n") + + if let mimeType = mimeType { + body.append("Content-Type: \(mimeType)\r\n\r\n") + } + + body.append(data) + + body.append("\r\n") + + body.append("--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +fileprivate extension Data { + /// Append string to NSMutableData + /// + /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to NSData, and then add that data to the NSMutableData, this wraps it in a nice convenient little extension to NSMutableData. This converts using UTF-8. + /// + /// - parameter string: The string to be added to the `NSMutableData`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/petstore/swift5/combineLibrary/README.md b/samples/client/petstore/swift5/combineLibrary/README.md new file mode 100644 index 0000000000..a50bf382e3 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/README.md @@ -0,0 +1,141 @@ +# Swift5 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/.gitignore b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/.gitignore new file mode 100644 index 0000000000..0269c2f56d --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/.gitignore @@ -0,0 +1,72 @@ +### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/Podfile b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/Podfile new file mode 100644 index 0000000000..77432f9eee --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/Podfile @@ -0,0 +1,13 @@ +platform :ios, '9.0' + +source 'https://cdn.cocoapods.org/' + +use_frameworks! + +target 'SwaggerClient' do + pod "PetstoreClient", :path => "../" + + target 'SwaggerClientTests' do + inherit! :search_paths + end +end diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/Podfile.lock new file mode 100644 index 0000000000..8749d25339 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - PetstoreClient (1.0.0) + +DEPENDENCIES: + - PetstoreClient (from `../`) + +EXTERNAL SOURCES: + PetstoreClient: + :path: "../" + +SPEC CHECKSUMS: + PetstoreClient: b26b235a3ece06dbf1da99dc67e48aa201659f21 + +PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c + +COCOAPODS: 1.8.4 diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..4394da5614 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -0,0 +1,549 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + B024164FBFF71BF644D4419A /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 177A58DD5CF63F2989335DCC /* Pods_SwaggerClient.framework */; }; + B1D0246C8960F47A60098F37 /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F96A0131101344CC5406CB3 /* Pods_SwaggerClientTests.framework */; }; + B596E4BD205657A500B46F03 /* APIHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B596E4BC205657A500B46F03 /* APIHelperTests.swift */; }; + EAEC0BC21D4E30CE00C908A3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BC11D4E30CE00C908A3 /* AppDelegate.swift */; }; + EAEC0BC41D4E30CE00C908A3 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BC31D4E30CE00C908A3 /* ViewController.swift */; }; + EAEC0BC71D4E30CE00C908A3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EAEC0BC51D4E30CE00C908A3 /* Main.storyboard */; }; + EAEC0BC91D4E30CE00C908A3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EAEC0BC81D4E30CE00C908A3 /* Assets.xcassets */; }; + EAEC0BCC1D4E30CE00C908A3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EAEC0BCA1D4E30CE00C908A3 /* LaunchScreen.storyboard */; }; + EAEC0BE41D4E330700C908A3 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BE31D4E330700C908A3 /* PetAPITests.swift */; }; + EAEC0BE61D4E379000C908A3 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BE51D4E379000C908A3 /* StoreAPITests.swift */; }; + EAEC0BE81D4E38CB00C908A3 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BE71D4E38CB00C908A3 /* UserAPITests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + EAEC0BD31D4E30CE00C908A3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EAEC0BB61D4E30CE00C908A3 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EAEC0BBD1D4E30CE00C908A3; + remoteInfo = SwaggerClient; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 177A58DD5CF63F2989335DCC /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2DEFA8828BD4E38FA5262F53 /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; + 4EF2021609D112A6F5AE0F55 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; + 6F96A0131101344CC5406CB3 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D99518E8E05FD856A952698 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; + B596E4BC205657A500B46F03 /* APIHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelperTests.swift; sourceTree = ""; }; + EAEC0BBE1D4E30CE00C908A3 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; + EAEC0BC11D4E30CE00C908A3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + EAEC0BC31D4E30CE00C908A3 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + EAEC0BC61D4E30CE00C908A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + EAEC0BC81D4E30CE00C908A3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + EAEC0BCB1D4E30CE00C908A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + EAEC0BCD1D4E30CE00C908A3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EAEC0BD21D4E30CE00C908A3 /* SwaggerClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + EAEC0BD81D4E30CE00C908A3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EAEC0BE31D4E330700C908A3 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = ""; }; + EAEC0BE51D4E379000C908A3 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = ""; }; + EAEC0BE71D4E38CB00C908A3 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = ""; }; + EFD8AB05F53C74985527D117 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + EAEC0BBB1D4E30CE00C908A3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B024164FBFF71BF644D4419A /* Pods_SwaggerClient.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EAEC0BCF1D4E30CE00C908A3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B1D0246C8960F47A60098F37 /* Pods_SwaggerClientTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 55DC454FF5FFEF8A9CBC1CA3 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 177A58DD5CF63F2989335DCC /* Pods_SwaggerClient.framework */, + 6F96A0131101344CC5406CB3 /* Pods_SwaggerClientTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + CB19142D951AB5DD885404A8 /* Pods */ = { + isa = PBXGroup; + children = ( + 8D99518E8E05FD856A952698 /* Pods-SwaggerClient.debug.xcconfig */, + 2DEFA8828BD4E38FA5262F53 /* Pods-SwaggerClient.release.xcconfig */, + 4EF2021609D112A6F5AE0F55 /* Pods-SwaggerClientTests.debug.xcconfig */, + EFD8AB05F53C74985527D117 /* Pods-SwaggerClientTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + EAEC0BB51D4E30CE00C908A3 = { + isa = PBXGroup; + children = ( + EAEC0BC01D4E30CE00C908A3 /* SwaggerClient */, + EAEC0BD51D4E30CE00C908A3 /* SwaggerClientTests */, + EAEC0BBF1D4E30CE00C908A3 /* Products */, + CB19142D951AB5DD885404A8 /* Pods */, + 55DC454FF5FFEF8A9CBC1CA3 /* Frameworks */, + ); + sourceTree = ""; + }; + EAEC0BBF1D4E30CE00C908A3 /* Products */ = { + isa = PBXGroup; + children = ( + EAEC0BBE1D4E30CE00C908A3 /* SwaggerClient.app */, + EAEC0BD21D4E30CE00C908A3 /* SwaggerClientTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + EAEC0BC01D4E30CE00C908A3 /* SwaggerClient */ = { + isa = PBXGroup; + children = ( + EAEC0BC11D4E30CE00C908A3 /* AppDelegate.swift */, + EAEC0BC31D4E30CE00C908A3 /* ViewController.swift */, + EAEC0BC51D4E30CE00C908A3 /* Main.storyboard */, + EAEC0BC81D4E30CE00C908A3 /* Assets.xcassets */, + EAEC0BCA1D4E30CE00C908A3 /* LaunchScreen.storyboard */, + EAEC0BCD1D4E30CE00C908A3 /* Info.plist */, + ); + path = SwaggerClient; + sourceTree = ""; + }; + EAEC0BD51D4E30CE00C908A3 /* SwaggerClientTests */ = { + isa = PBXGroup; + children = ( + EAEC0BD81D4E30CE00C908A3 /* Info.plist */, + EAEC0BE31D4E330700C908A3 /* PetAPITests.swift */, + EAEC0BE51D4E379000C908A3 /* StoreAPITests.swift */, + EAEC0BE71D4E38CB00C908A3 /* UserAPITests.swift */, + B596E4BC205657A500B46F03 /* APIHelperTests.swift */, + ); + path = SwaggerClientTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + EAEC0BBD1D4E30CE00C908A3 /* SwaggerClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = EAEC0BDB1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClient" */; + buildPhases = ( + 898E536ECC2C4811DDDF67C1 /* [CP] Check Pods Manifest.lock */, + EAEC0BBA1D4E30CE00C908A3 /* Sources */, + EAEC0BBB1D4E30CE00C908A3 /* Frameworks */, + EAEC0BBC1D4E30CE00C908A3 /* Resources */, + 8A7961360961F06AADAF17C9 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwaggerClient; + productName = SwaggerClient; + productReference = EAEC0BBE1D4E30CE00C908A3 /* SwaggerClient.app */; + productType = "com.apple.product-type.application"; + }; + EAEC0BD11D4E30CE00C908A3 /* SwaggerClientTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = EAEC0BDE1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */; + buildPhases = ( + 82CB35D52E274C6177DAC0DD /* [CP] Check Pods Manifest.lock */, + EAEC0BCE1D4E30CE00C908A3 /* Sources */, + EAEC0BCF1D4E30CE00C908A3 /* Frameworks */, + EAEC0BD01D4E30CE00C908A3 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + EAEC0BD41D4E30CE00C908A3 /* PBXTargetDependency */, + ); + name = SwaggerClientTests; + productName = SwaggerClientTests; + productReference = EAEC0BD21D4E30CE00C908A3 /* SwaggerClientTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + EAEC0BB61D4E30CE00C908A3 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = Swagger; + TargetAttributes = { + EAEC0BBD1D4E30CE00C908A3 = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1130; + }; + EAEC0BD11D4E30CE00C908A3 = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1130; + TestTargetID = EAEC0BBD1D4E30CE00C908A3; + }; + }; + }; + buildConfigurationList = EAEC0BB91D4E30CE00C908A3 /* Build configuration list for PBXProject "SwaggerClient" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = EAEC0BB51D4E30CE00C908A3; + productRefGroup = EAEC0BBF1D4E30CE00C908A3 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + EAEC0BBD1D4E30CE00C908A3 /* SwaggerClient */, + EAEC0BD11D4E30CE00C908A3 /* SwaggerClientTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + EAEC0BBC1D4E30CE00C908A3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EAEC0BCC1D4E30CE00C908A3 /* LaunchScreen.storyboard in Resources */, + EAEC0BC91D4E30CE00C908A3 /* Assets.xcassets in Resources */, + EAEC0BC71D4E30CE00C908A3 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EAEC0BD01D4E30CE00C908A3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 82CB35D52E274C6177DAC0DD /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 898E536ECC2C4811DDDF67C1 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 8A7961360961F06AADAF17C9 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + EAEC0BBA1D4E30CE00C908A3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EAEC0BC41D4E30CE00C908A3 /* ViewController.swift in Sources */, + EAEC0BC21D4E30CE00C908A3 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EAEC0BCE1D4E30CE00C908A3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B596E4BD205657A500B46F03 /* APIHelperTests.swift in Sources */, + EAEC0BE81D4E38CB00C908A3 /* UserAPITests.swift in Sources */, + EAEC0BE61D4E379000C908A3 /* StoreAPITests.swift in Sources */, + EAEC0BE41D4E330700C908A3 /* PetAPITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + EAEC0BD41D4E30CE00C908A3 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EAEC0BBD1D4E30CE00C908A3 /* SwaggerClient */; + targetProxy = EAEC0BD31D4E30CE00C908A3 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + EAEC0BC51D4E30CE00C908A3 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + EAEC0BC61D4E30CE00C908A3 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + EAEC0BCA1D4E30CE00C908A3 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + EAEC0BCB1D4E30CE00C908A3 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + EAEC0BD91D4E30CE00C908A3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + }; + name = Debug; + }; + EAEC0BDA1D4E30CE00C908A3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + EAEC0BDC1D4E30CE00C908A3 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8D99518E8E05FD856A952698 /* Pods-SwaggerClient.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EAEC0BDD1D4E30CE00C908A3 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2DEFA8828BD4E38FA5262F53 /* Pods-SwaggerClient.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + EAEC0BDF1D4E30CE00C908A3 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4EF2021609D112A6F5AE0F55 /* Pods-SwaggerClientTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ENABLE_MODULES = YES; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Debug; + }; + EAEC0BE01D4E30CE00C908A3 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EFD8AB05F53C74985527D117 /* Pods-SwaggerClientTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ENABLE_MODULES = YES; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + EAEC0BB91D4E30CE00C908A3 /* Build configuration list for PBXProject "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EAEC0BD91D4E30CE00C908A3 /* Debug */, + EAEC0BDA1D4E30CE00C908A3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EAEC0BDB1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EAEC0BDC1D4E30CE00C908A3 /* Debug */, + EAEC0BDD1D4E30CE00C908A3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EAEC0BDE1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EAEC0BDF1D4E30CE00C908A3 /* Debug */, + EAEC0BE01D4E30CE00C908A3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = EAEC0BB61D4E30CE00C908A3 /* Project object */; +} diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..13bdd8ab8b --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme new file mode 100644 index 0000000000..b912ca00fe --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..9b3fa18954 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift new file mode 100644 index 0000000000..e8f911b0fa --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift @@ -0,0 +1,43 @@ +// +// AppDelegate.swift +// SwaggerClient +// +// Created by Tony Wang on 7/31/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..b8236c6534 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,48 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..2e721e1833 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..3a2a49bad8 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Info.plist new file mode 100644 index 0000000000..3d8b6fc4a7 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/Info.plist @@ -0,0 +1,58 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift new file mode 100644 index 0000000000..3a45ba8fc5 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift @@ -0,0 +1,23 @@ +// +// ViewController.swift +// SwaggerClient +// +// Created by Tony Wang on 7/31/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift new file mode 100644 index 0000000000..4f51881a66 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift @@ -0,0 +1,55 @@ +// +// APIHelperTests.swift +// SwaggerClientTests +// +// Created by Daiki Matsudate on 2018/03/12. +// Copyright © 2018 Swagger. All rights reserved. +// + +import XCTest +import PetstoreClient +@testable import SwaggerClient + +class APIHelperTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testRejectNil() { + let source: [String: Any?] = ["a": 1, "b": nil, "c": ["1", nil, "2"], "d": true, "e": false] + let expected: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": true, "e": false] + let actual: [String: Any] = APIHelper.rejectNil(source)! + XCTAssert(NSDictionary(dictionary: actual).isEqual(to: expected)) + } + + func testRejectNilHeaders() { + let source: [String: Any?] = ["a": 1, "b": nil, "c": ["1", nil, "2"], "d": true, "e": false] + let expected: [String: String] = ["a": "1", "c": "1,2", "d": "true", "e": "false"] + let actual: [String: String] = APIHelper.rejectNilHeaders(source) + XCTAssert(NSDictionary(dictionary: actual).isEqual(to: expected)) + } + + func testConvertBoolToString() { + let source: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": true, "e": false] + let expected: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": "true", "e": "false"] + let actual: [String: Any] = APIHelper.convertBoolToString(source)! + XCTAssert(NSDictionary(dictionary: actual).isEqual(to: expected)) + } + + func testMapValuesToQueryItems() { + let source: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": true, "e": false] + let expected: [URLQueryItem] = [URLQueryItem(name: "a", value: "1"), + URLQueryItem(name: "c", value: "1,2"), + URLQueryItem(name: "d", value: "true"), + URLQueryItem(name: "e", value: "false")].sorted(by: { $0.name > $1.name }) + let actual: [URLQueryItem] = APIHelper.mapValuesToQueryItems(source)!.sorted(by: { $0.name > $1.name }) + XCTAssert(actual == expected) + } +} diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist new file mode 100644 index 0000000000..619bf44ed7 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift new file mode 100644 index 0000000000..6de0bf826b --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -0,0 +1,102 @@ +// +// PetAPITests.swift +// SwaggerClient +// +// Created by Tony Wang on 7/31/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import XCTest +import Combine +@testable import SwaggerClient + +@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) +class PetAPITests: XCTestCase { + + let testTimeout = 10.0 + + var anyCancellables: [AnyCancellable] = [] + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func test1CreatePet() { + let expectation = self.expectation(description: "testCreatePet") + let category = PetstoreClient.Category(id: 1234, name: "eyeColor") + let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] + let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + + PetAPI.addPet(body: newPet).sink(receiveCompletion: { (completion) in + switch completion { + case .failure: + XCTFail("error creating pet") + case .finished: () + } + }, receiveValue: { _ in + expectation.fulfill() + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetPet() { + let expectation = self.expectation(description: "testGetPet") + PetAPI.getPetById(petId: 1000).sink(receiveCompletion: { (completion) in + switch completion { + case .failure: + XCTFail("error getting pet") + case .finished:() + } + }, receiveValue: { pet in + XCTAssert(pet.id == 1000, "invalid id") + XCTAssert(pet.name == "Fluffy", "invalid name") + XCTAssert(pet.category!.id == 1234, "invalid category id") + XCTAssert(pet.category!.name == "eyeColor", "invalid category name") + + let tag1 = pet.tags![0] + XCTAssert(tag1.id == 1234, "invalid tag id") + XCTAssert(tag1.name == "New York", "invalid tag name") + + let tag2 = pet.tags![1] + XCTAssert(tag2.id == 124321, "invalid tag id") + XCTAssert(tag2.name == "Jose", "invalid tag name") + + XCTAssert(pet.photoUrls[0] == "https://petstore.com/sample/photo1.jpg") + XCTAssert(pet.photoUrls[1] == "https://petstore.com/sample/photo2.jpg") + + expectation.fulfill() + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeletePet() { + let expectation = self.expectation(description: "testDeletePet") + PetAPI.deletePet(petId: 1000).sink(receiveCompletion: { (completion) in + switch completion { + case .failure(let errorType): + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error deleting pet") + } + case .finished:() + } + }, receiveValue: { _ in + expectation.fulfill() + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } +} diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift new file mode 100644 index 0000000000..99aed60237 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift @@ -0,0 +1,107 @@ +// +// StoreAPITests.swift +// SwaggerClient +// +// Created by Tony Wang on 7/31/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import Combine +import XCTest +@testable import SwaggerClient + +@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) +class StoreAPITests: XCTestCase { + + let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" + + let testTimeout = 10.0 + + var anyCancellables: [AnyCancellable] = [] + + func test1PlaceOrder() { + // use explicit naming to reference the enum so that we test we don't regress on enum naming + let shipDate = Date() + let order = Order(id: 1000, petId: 1000, quantity: 10, shipDate: shipDate, status: .placed, complete: true) + let expectation = self.expectation(description: "testPlaceOrder") + StoreAPI.placeOrder(body: order).sink(receiveCompletion: { (completion) in + switch completion { + case .failure: + XCTFail("error placing order") + case .finished:() + } + }, receiveValue: { order in + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat), + "Date should be idempotent") + XCTAssert(order.complete == true, "invalid complete") + + expectation.fulfill() + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetOrder() { + let expectation = self.expectation(description: "testGetOrder") + StoreAPI.getOrderById(orderId: 1000).sink(receiveCompletion: { (completion) in + switch completion { + case .failure: + XCTFail("error placing order") + case .finished:() + } + }, receiveValue: { order in + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + XCTAssert(order.complete == true, "invalid complete") + expectation.fulfill() + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeleteOrder() { + let expectation = self.expectation(description: "testDeleteOrder") + StoreAPI.deleteOrder(orderId: "1000").sink(receiveCompletion: { (completion) in + switch completion { + case .failure(let errorType): + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error deleting order") + } + case .finished:() + } + }, receiveValue: { _ in + expectation.fulfill() + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} + +private extension Date { + + /** + Returns true if the dates are equal given the format string. + + - parameter date: The date to compare to. + - parameter format: The format string to use to compare. + + - returns: true if the dates are equal, given the format string. + */ + func isEqual(_ date: Date, format: String) -> Bool { + let fmt = DateFormatter() + fmt.dateFormat = format + return fmt.string(from: self).isEqual(fmt.string(from: date)) + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift new file mode 100644 index 0000000000..47b22a493e --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift @@ -0,0 +1,149 @@ +// +// UserAPITests.swift +// SwaggerClient +// +// Created by Tony Wang on 7/31/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import Combine +import XCTest +@testable import SwaggerClient + +@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) +class UserAPITests: XCTestCase { + + let testTimeout = 10.0 + + var anyCancellables: [AnyCancellable] = [] + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testLogin() { + let expectation = self.expectation(description: "testLogin") + UserAPI.loginUser(username: "swiftTester", password: "swift").sink(receiveCompletion: { (completion) in + switch completion { + case .failure(let errorType): + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error logging in") + } + case .finished:() + } + }, receiveValue: { _ in + expectation.fulfill() + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testLogout() { + let expectation = self.expectation(description: "testLogout") + UserAPI.logoutUser().sink(receiveCompletion: { (completion) in + switch completion { + case .failure(let errorType): + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error logging out") + } + case .finished:() + } + }, receiveValue: { _ in + expectation.fulfill() + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test1CreateUser() { + let expectation = self.expectation(description: "testCreateUser") + let newUser = User(id: 1000, username: "test@test.com", firstName: "Test", lastName: "Tester", email: "test@test.com", password: "test!", phone: "867-5309", userStatus: 0) + UserAPI.createUser(body: newUser).sink(receiveCompletion: { (completion) in + switch completion { + case .failure(let errorType): + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error creating user") + } + case .finished:() + } + }, receiveValue: { _ in + expectation.fulfill() + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetUser() { + let expectation = self.expectation(description: "testGetUser") + UserAPI.getUserByName(username: "test@test.com").sink(receiveCompletion: { (completion) in + switch completion { + case .failure: + XCTFail("error getting user") + case .finished:() + } + }, receiveValue: { user in + XCTAssert(user.userStatus == 0, "invalid userStatus") + XCTAssert(user.email == "test@test.com", "invalid email") + XCTAssert(user.firstName == "Test", "invalid firstName") + XCTAssert(user.lastName == "Tester", "invalid lastName") + XCTAssert(user.password == "test!", "invalid password") + XCTAssert(user.phone == "867-5309", "invalid phone") + expectation.fulfill() + + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeleteUser() { + let expectation = self.expectation(description: "testDeleteUser") + UserAPI.deleteUser(username: "test@test.com").sink(receiveCompletion: { (completion) in + switch completion { + case .failure(let errorType): + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error deleting user") + } + case .finished:() + } + }, receiveValue: { _ in + expectation.fulfill() + }).store(in: &anyCancellables) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/pom.xml b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/pom.xml new file mode 100644 index 0000000000..6c11fe371b --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5RxSwiftPetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 RxSwift Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_xcodebuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/run_xcodebuild.sh new file mode 100755 index 0000000000..79520c7fc3 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/SwaggerClientTests/run_xcodebuild.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +pod install + +xcodebuild -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" test -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/combineLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/combineLibrary/docs/AdditionalPropertiesClass.md new file mode 100644 index 0000000000..e22d28be1d --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Animal.md b/samples/client/petstore/swift5/combineLibrary/docs/Animal.md new file mode 100644 index 0000000000..69c601455c --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/AnimalFarm.md b/samples/client/petstore/swift5/combineLibrary/docs/AnimalFarm.md new file mode 100644 index 0000000000..df6bab21da --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/AnotherFakeAPI.md new file mode 100644 index 0000000000..aead5f1f98 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/AnotherFakeAPI.md @@ -0,0 +1,59 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/ApiResponse.md b/samples/client/petstore/swift5/combineLibrary/docs/ApiResponse.md new file mode 100644 index 0000000000..c6d9768fe9 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/combineLibrary/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 0000000000..c6fceff5e0 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/combineLibrary/docs/ArrayOfNumberOnly.md new file mode 100644 index 0000000000..f09f8fa6f7 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/ArrayTest.md b/samples/client/petstore/swift5/combineLibrary/docs/ArrayTest.md new file mode 100644 index 0000000000..bf416b8330 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Capitalization.md b/samples/client/petstore/swift5/combineLibrary/docs/Capitalization.md new file mode 100644 index 0000000000..95374216c7 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Cat.md b/samples/client/petstore/swift5/combineLibrary/docs/Cat.md new file mode 100644 index 0000000000..fb5949b157 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/combineLibrary/docs/CatAllOf.md new file mode 100644 index 0000000000..79789be61c --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Category.md b/samples/client/petstore/swift5/combineLibrary/docs/Category.md new file mode 100644 index 0000000000..5ca5408c0f --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/ClassModel.md b/samples/client/petstore/swift5/combineLibrary/docs/ClassModel.md new file mode 100644 index 0000000000..e3912fdf0f --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Client.md b/samples/client/petstore/swift5/combineLibrary/docs/Client.md new file mode 100644 index 0000000000..0de1b238c3 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Dog.md b/samples/client/petstore/swift5/combineLibrary/docs/Dog.md new file mode 100644 index 0000000000..4824786da0 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/combineLibrary/docs/DogAllOf.md new file mode 100644 index 0000000000..9302ef52e9 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/EnumArrays.md b/samples/client/petstore/swift5/combineLibrary/docs/EnumArrays.md new file mode 100644 index 0000000000..b9a9807d3c --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/EnumClass.md b/samples/client/petstore/swift5/combineLibrary/docs/EnumClass.md new file mode 100644 index 0000000000..67f017becd --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/EnumTest.md b/samples/client/petstore/swift5/combineLibrary/docs/EnumTest.md new file mode 100644 index 0000000000..bc9b036dd7 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md new file mode 100644 index 0000000000..49d4d3fb6a --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/FakeAPI.md @@ -0,0 +1,662 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/combineLibrary/docs/FakeClassnameTags123API.md new file mode 100644 index 0000000000..9f24b46edb --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/FakeClassnameTags123API.md @@ -0,0 +1,59 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/File.md b/samples/client/petstore/swift5/combineLibrary/docs/File.md new file mode 100644 index 0000000000..3edfef17b7 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/combineLibrary/docs/FileSchemaTestClass.md new file mode 100644 index 0000000000..afdacc60b2 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/combineLibrary/docs/FormatTest.md new file mode 100644 index 0000000000..f74d94f6c4 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/combineLibrary/docs/HasOnlyReadOnly.md new file mode 100644 index 0000000000..57b6e3a17e --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/List.md b/samples/client/petstore/swift5/combineLibrary/docs/List.md new file mode 100644 index 0000000000..b77718302e --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/MapTest.md b/samples/client/petstore/swift5/combineLibrary/docs/MapTest.md new file mode 100644 index 0000000000..56213c4113 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/combineLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 0000000000..fcffb8ecdb --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Model200Response.md b/samples/client/petstore/swift5/combineLibrary/docs/Model200Response.md new file mode 100644 index 0000000000..5865ea690c --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Name.md b/samples/client/petstore/swift5/combineLibrary/docs/Name.md new file mode 100644 index 0000000000..f7b180292c --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/NumberOnly.md b/samples/client/petstore/swift5/combineLibrary/docs/NumberOnly.md new file mode 100644 index 0000000000..72bd361168 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Order.md b/samples/client/petstore/swift5/combineLibrary/docs/Order.md new file mode 100644 index 0000000000..15487f0117 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/OuterComposite.md b/samples/client/petstore/swift5/combineLibrary/docs/OuterComposite.md new file mode 100644 index 0000000000..d6b3583bc3 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/OuterEnum.md b/samples/client/petstore/swift5/combineLibrary/docs/OuterEnum.md new file mode 100644 index 0000000000..06d413b016 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Pet.md b/samples/client/petstore/swift5/combineLibrary/docs/Pet.md new file mode 100644 index 0000000000..5c05f98fad --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md new file mode 100644 index 0000000000..27efe08334 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/PetAPI.md @@ -0,0 +1,469 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/combineLibrary/docs/ReadOnlyFirst.md new file mode 100644 index 0000000000..ed537b8759 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Return.md b/samples/client/petstore/swift5/combineLibrary/docs/Return.md new file mode 100644 index 0000000000..66d17c27c8 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/SpecialModelName.md b/samples/client/petstore/swift5/combineLibrary/docs/SpecialModelName.md new file mode 100644 index 0000000000..3ec27a38c2 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md new file mode 100644 index 0000000000..36365ca519 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md @@ -0,0 +1,206 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/StringBooleanMap.md b/samples/client/petstore/swift5/combineLibrary/docs/StringBooleanMap.md new file mode 100644 index 0000000000..7abf11ec68 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/Tag.md b/samples/client/petstore/swift5/combineLibrary/docs/Tag.md new file mode 100644 index 0000000000..ff4ac8aa45 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/combineLibrary/docs/TypeHolderDefault.md new file mode 100644 index 0000000000..5161394bdc --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/TypeHolderExample.md b/samples/client/petstore/swift5/combineLibrary/docs/TypeHolderExample.md new file mode 100644 index 0000000000..46d0471cd7 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/User.md b/samples/client/petstore/swift5/combineLibrary/docs/User.md new file mode 100644 index 0000000000..5a439de0ff --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/combineLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/UserAPI.md new file mode 100644 index 0000000000..380813bc68 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/docs/UserAPI.md @@ -0,0 +1,406 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/combineLibrary/git_push.sh b/samples/client/petstore/swift5/combineLibrary/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/combineLibrary/pom.xml b/samples/client/petstore/swift5/combineLibrary/pom.xml new file mode 100644 index 0000000000..c1b201eb3b --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/combineLibrary/project.yml b/samples/client/petstore/swift5/combineLibrary/project.yml new file mode 100644 index 0000000000..892005fdd5 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/project.yml @@ -0,0 +1,14 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + diff --git a/samples/client/petstore/swift5/combineLibrary/run_spmbuild.sh b/samples/client/petstore/swift5/combineLibrary/run_spmbuild.sh new file mode 100755 index 0000000000..1a9f585ad0 --- /dev/null +++ b/samples/client/petstore/swift5/combineLibrary/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/default/.gitignore b/samples/client/petstore/swift5/default/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/petstore/swift5/default/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/default/.openapi-generator-ignore b/samples/client/petstore/swift5/default/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/swift5/default/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION new file mode 100644 index 0000000000..58592f031f --- /dev/null +++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/default/Cartfile b/samples/client/petstore/swift5/default/Cartfile new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/samples/client/petstore/swift5/default/Cartfile @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/swift5/default/Info.plist b/samples/client/petstore/swift5/default/Info.plist new file mode 100644 index 0000000000..323e5ecfc4 --- /dev/null +++ b/samples/client/petstore/swift5/default/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/default/Package.swift b/samples/client/petstore/swift5/default/Package.swift new file mode 100644 index 0000000000..96dfff54ed --- /dev/null +++ b/samples/client/petstore/swift5/default/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: [], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift5/default/PetstoreClient.podspec b/samples/client/petstore/swift5/default/PetstoreClient.podspec new file mode 100644 index 0000000000..b61285f6b2 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' +end diff --git a/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6f8918eb33 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,536 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11F49B24B6239C324722572C /* URLSessionImplementations.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */, + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */, + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 0000000000..26d510552b --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 0000000000..2000700968 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? [Any?] { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? [Any?] { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 0000000000..e4cbda9c72 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,64 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetstoreClientAPI { + public static var basePath = "http://petstore.swagger.io:80/v2" + public static var credential: URLCredential? + public static var customHeaders: [String: String] = [:] + public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + public let parameters: [String: Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client. + public var onProgressReady: ((Progress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(PetstoreClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = PetstoreClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 0000000000..5bbf323f82 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,48 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class AnotherFakeAPI { + /** + To test special tags + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 0000000000..dfbb6b0224 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,619 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class FakeAPI { + /** + + - parameter body: (body) Input boolean as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input composite as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input number as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input string as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter query: (query) + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "query": query.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + To test \"client\" model + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "integer": integer?.encodeToJSON(), + "int32": int32?.encodeToJSON(), + "int64": int64?.encodeToJSON(), + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), + "date": date?.encodeToJSON(), + "dateTime": dateTime?.encodeToJSON(), + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - returns: RequestBuilder + */ + open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + Fake endpoint to test group parameters (optional) + + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), + "int64_group": int64Group?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + test inline additionalProperties + + - parameter param: (body) request body + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + test json serialization of form data + + - parameter param: (form) field1 + - parameter param2: (form) field2 + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 0000000000..48cfe7187b --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,51 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class FakeClassnameTags123API { + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 0000000000..0552d4a6c1 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,431 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetAPI { + /** + Add a new pet to the store + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Deletes a pet + + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + let nillableHeaders: [String: Any?] = [ + "api_key": apiKey?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + + - parameter status: (query) Status values that need to be considered for filter + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "status": status.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Finds Pets by tags + + - parameter tags: (query) Tags to filter by + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "tags": tags.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find pet by ID + + - parameter petId: (path) ID of pet to return + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Update an existing pet + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Updates a pet in the store with form data + + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image (required) + + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 0000000000..a8a83eda39 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,165 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class StoreAPI { + /** + Delete purchase order by ID + + - parameter orderId: (path) ID of the order that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Returns pet inventories by status + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find purchase order by ID + + - parameter orderId: (path) ID of pet that needs to be fetched + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Place an order for a pet + + - parameter body: (body) order placed for purchasing the pet + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { + let path = "/store/order" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 0000000000..505ed1b0c5 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,318 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class UserAPI { + /** + Create user + + - parameter body: (body) Created user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { + let path = "/user" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Delete user + + - parameter username: (path) The name that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Get user by user name + + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs user into the system + + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "username": username.encodeToJSON(), + "password": password.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs out current logged in user session + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + open class func logoutUserWithRequestBuilder() -> RequestBuilder { + let path = "/user/logout" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Updated user + + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 0000000000..32e194f6ee --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + open class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + open class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 0000000000..627d9adb75 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 0000000000..74fcfcf2ad --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 0000000000..b79e9f5e64 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 0000000000..02f78ffb47 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 0000000000..b9757b6cbc --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,51 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +public enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 0000000000..1af0315359 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,25 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 0000000000..5ed9f31e2a --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,20 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 0000000000..e09b0e9efd --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 0000000000..ec270da890 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,22 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 0000000000..6c252ed475 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 0000000000..e84eb5d650 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 0000000000..d2140933d1 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,28 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 0000000000..d1b3b27616 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,38 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 0000000000..7ab887f311 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,22 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 0000000000..a51ad0dffa --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,18 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 0000000000..eb8f7e5e19 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,20 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String = "default-name" + + public init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 0000000000..e2a7d4427a --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ +public struct ClassModel: Codable { + + public var _class: String? + + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 0000000000..00245ca372 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,18 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 0000000000..492c122800 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,22 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 0000000000..7786f8acc5 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,18 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 0000000000..9844e7c40e --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,33 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable, CaseIterable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable, CaseIterable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 0000000000..d4029d73f8 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 0000000000..789f583e1d --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,52 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable, CaseIterable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 0000000000..abf3ccffc4 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 0000000000..532f145793 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,20 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 0000000000..20bd6d103b --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,42 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 0000000000..906ddb06fb --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,20 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 0000000000..fe13d302cc --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,22 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 0000000000..4b6037f378 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,35 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 0000000000..c3deb2f289 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,22 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 0000000000..b61db7d6e7 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 0000000000..8ab4db44b7 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 0000000000..4d1dafcc2c --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,22 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 0000000000..40c30cc860 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,34 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 0000000000..18c3a024f1 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,28 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 0000000000..c3b778cbbe --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 0000000000..b9ce0e9332 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,34 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + + public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 0000000000..0acd21fd10 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,20 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 0000000000..c223f993a6 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ +public struct Return: Codable { + + public var _return: Int? + + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 0000000000..6e8650f76d --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,22 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 0000000000..3f1237fee4 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 0000000000..4dd8a9a9f5 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,20 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 0000000000..a9e088808e --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,34 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 0000000000..dff4083ae4 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,34 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 0000000000..79f271ed73 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,33 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 0000000000..e06208074c --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +public class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override public func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift new file mode 100644 index 0000000000..9e552cce09 --- /dev/null +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -0,0 +1,544 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +open class URLSessionRequestBuilder: RequestBuilder { + + let progress = Progress() + + private var observation: NSKeyValueObservation? + + deinit { + observation?.invalidate() + } + + fileprivate let sessionDelegate = SessionDelegate() + + /** + May be assigned if you want to control the authentication challenges. + */ + public var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - intercept and handle errors like authorization + - retry the request. + */ + public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the URLSession + configuration. + */ + open func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + + guard let url = URL(string: URLString) else { + throw DownloadException.requestMissingURL + } + + var originalRequest = URLRequest(url: url) + + originalRequest.httpMethod = method.rawValue + + buildHeaders().forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + headers.forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) + + return modifiedRequest + } + + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { + let urlSessionId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + let parameters: [String: Any] = self.parameters ?? [:] + + let fileKeys = parameters.filter { $1 is NSURL } + .map { $0.0 } + + let encoding: ParameterEncoding + if fileKeys.count > 0 { + encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) + } else if isBody { + encoding = JSONDataEncoding() + } else { + encoding = URLEncoding() + } + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsuported Http method - \(method)") + } + + let cleanupRequest = { + urlSessionStore[urlSessionId] = nil + self.observation?.invalidate() + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in + + guard let self = self else { return } + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in + + guard let self = self else { return } + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { + observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in + self.progress.totalUnitCount = newProgress.totalUnitCount + self.progress.completedUnitCount = newProgress.completedUnitCount + } + + onProgressReady?(progress) + } + + dataTask.resume() + + } catch { + apiResponseQueue.async { + cleanupRequest() + completion(.failure(ErrorResponse.error(415, nil, error))) + } + } + + } + + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: httpResponse, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, data, error))) + } + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = PetstoreClientAPI.customHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + case is Data.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + guard let data = data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + } + } +} + +private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + + var credential: URLCredential? + + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +public protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +private class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +private class FileUploadEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + for (k, v) in parameters ?? [:] { + switch v { + case let fileURL as URL: + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: fileURL.lastPathComponent, data: fileData, mimeType: mimetype) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, name: String, data: Data, mimeType: String?) -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody ?? Data() + + // https://stackoverflow.com/a/26163136/976628 + let boundary = "Boundary-\(UUID().uuidString)" + urlRequest.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") + + body.append("--\(boundary)\r\n") + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(name)\"\r\n") + + if let mimeType = mimeType { + body.append("Content-Type: \(mimeType)\r\n\r\n") + } + + body.append(data) + + body.append("\r\n") + + body.append("--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +fileprivate extension Data { + /// Append string to NSMutableData + /// + /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to NSData, and then add that data to the NSMutableData, this wraps it in a nice convenient little extension to NSMutableData. This converts using UTF-8. + /// + /// - parameter string: The string to be added to the `NSMutableData`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/petstore/swift5/default/README.md b/samples/client/petstore/swift5/default/README.md new file mode 100644 index 0000000000..a50bf382e3 --- /dev/null +++ b/samples/client/petstore/swift5/default/README.md @@ -0,0 +1,141 @@ +# Swift5 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/.gitignore b/samples/client/petstore/swift5/default/SwaggerClientTests/.gitignore new file mode 100644 index 0000000000..0269c2f56d --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/.gitignore @@ -0,0 +1,72 @@ +### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + + diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/Podfile b/samples/client/petstore/swift5/default/SwaggerClientTests/Podfile new file mode 100644 index 0000000000..77432f9eee --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/Podfile @@ -0,0 +1,13 @@ +platform :ios, '9.0' + +source 'https://cdn.cocoapods.org/' + +use_frameworks! + +target 'SwaggerClient' do + pod "PetstoreClient", :path => "../" + + target 'SwaggerClientTests' do + inherit! :search_paths + end +end diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift5/default/SwaggerClientTests/Podfile.lock new file mode 100644 index 0000000000..8749d25339 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - PetstoreClient (1.0.0) + +DEPENDENCIES: + - PetstoreClient (from `../`) + +EXTERNAL SOURCES: + PetstoreClient: + :path: "../" + +SPEC CHECKSUMS: + PetstoreClient: b26b235a3ece06dbf1da99dc67e48aa201659f21 + +PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c + +COCOAPODS: 1.8.4 diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..91b653b9d3 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -0,0 +1,554 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1A501F48219C3DC600F372F6 /* DateFormatTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */; }; + 23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */; }; + 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */; }; + 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB961C692C6300B96B06 /* ViewController.swift */; }; + 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB981C692C6300B96B06 /* Main.storyboard */; }; + 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */; }; + 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */; }; + 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */; }; + 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */; }; + 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */; }; + FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6D4EFB891C692C6300B96B06 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6D4EFB901C692C6300B96B06; + remoteInfo = SwaggerClient; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; + 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateFormatTests.swift; sourceTree = ""; }; + 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 6D4EFB961C692C6300B96B06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 6D4EFB991C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 6D4EFB9E1C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 6D4EFBA01C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D4EFBAB1C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = ""; }; + 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = ""; }; + 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = ""; }; + 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; + C07EC0A94AA0F86D60668B32 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; + ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6D4EFB8E1C692C6300B96B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA21C692C6300B96B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 203D4495376E4EB72474B091 /* Pods */ = { + isa = PBXGroup; + children = ( + 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */, + ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */, + E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */, + ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 3FABC56EC0BA84CBF4F99564 /* Frameworks */ = { + isa = PBXGroup; + children = ( + C07EC0A94AA0F86D60668B32 /* Pods.framework */, + 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */, + 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6D4EFB881C692C6300B96B06 = { + isa = PBXGroup; + children = ( + 6D4EFB931C692C6300B96B06 /* SwaggerClient */, + 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */, + 6D4EFB921C692C6300B96B06 /* Products */, + 3FABC56EC0BA84CBF4F99564 /* Frameworks */, + 203D4495376E4EB72474B091 /* Pods */, + ); + sourceTree = ""; + }; + 6D4EFB921C692C6300B96B06 /* Products */ = { + isa = PBXGroup; + children = ( + 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */, + 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 6D4EFB931C692C6300B96B06 /* SwaggerClient */ = { + isa = PBXGroup; + children = ( + 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */, + 6D4EFB961C692C6300B96B06 /* ViewController.swift */, + 6D4EFB981C692C6300B96B06 /* Main.storyboard */, + 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */, + 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */, + 6D4EFBA01C692C6300B96B06 /* Info.plist */, + ); + path = SwaggerClient; + sourceTree = ""; + }; + 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */ = { + isa = PBXGroup; + children = ( + 6D4EFBAB1C692C6300B96B06 /* Info.plist */, + 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */, + 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */, + 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */, + 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */, + ); + path = SwaggerClientTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 6D4EFB901C692C6300B96B06 /* SwaggerClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */; + buildPhases = ( + 5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */, + 6D4EFB8D1C692C6300B96B06 /* Sources */, + 6D4EFB8E1C692C6300B96B06 /* Frameworks */, + 6D4EFB8F1C692C6300B96B06 /* Resources */, + FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwaggerClient; + productName = SwaggerClient; + productReference = 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */; + productType = "com.apple.product-type.application"; + }; + 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */; + buildPhases = ( + EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */, + 6D4EFBA11C692C6300B96B06 /* Sources */, + 6D4EFBA21C692C6300B96B06 /* Frameworks */, + 6D4EFBA31C692C6300B96B06 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */, + ); + name = SwaggerClientTests; + productName = SwaggerClientTests; + productReference = 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6D4EFB891C692C6300B96B06 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = Swagger; + TargetAttributes = { + 6D4EFB901C692C6300B96B06 = { + CreatedOnToolsVersion = 7.2.1; + LastSwiftMigration = 1130; + }; + 6D4EFBA41C692C6300B96B06 = { + CreatedOnToolsVersion = 7.2.1; + LastSwiftMigration = 1130; + TestTargetID = 6D4EFB901C692C6300B96B06; + }; + }; + }; + buildConfigurationList = 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 6D4EFB881C692C6300B96B06; + productRefGroup = 6D4EFB921C692C6300B96B06 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6D4EFB901C692C6300B96B06 /* SwaggerClient */, + 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 6D4EFB8F1C692C6300B96B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */, + 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */, + 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA31C692C6300B96B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6D4EFB8D1C692C6300B96B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */, + 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA11C692C6300B96B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */, + 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */, + 1A501F48219C3DC600F372F6 /* DateFormatTests.swift in Sources */, + 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6D4EFB901C692C6300B96B06 /* SwaggerClient */; + targetProxy = 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 6D4EFB981C692C6300B96B06 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6D4EFB991C692C6300B96B06 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6D4EFB9E1C692C6300B96B06 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 6D4EFBAC1C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 6D4EFBAD1C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 6D4EFBAF1C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 6D4EFBB01C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 6D4EFBB21C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Debug; + }; + 6D4EFBB31C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBAC1C692C6300B96B06 /* Debug */, + 6D4EFBAD1C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBAF1C692C6300B96B06 /* Debug */, + 6D4EFBB01C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBB21C692C6300B96B06 /* Debug */, + 6D4EFBB31C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6D4EFB891C692C6300B96B06 /* Project object */; +} diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme new file mode 100644 index 0000000000..617a081d97 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..9b3fa18954 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift new file mode 100644 index 0000000000..b1896774c7 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/AppDelegate.swift @@ -0,0 +1,43 @@ +// +// AppDelegate.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + +} diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..1d060ed288 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..2e721e1833 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..3a2a49bad8 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Info.plist new file mode 100644 index 0000000000..bb71d00fa8 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/Info.plist @@ -0,0 +1,59 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/ViewController.swift new file mode 100644 index 0000000000..8dad16b10f --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClient/ViewController.swift @@ -0,0 +1,23 @@ +// +// ViewController.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift new file mode 100644 index 0000000000..e18a104f3a --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift @@ -0,0 +1,114 @@ +// +// DateFormatTests.swift +// SwaggerClientTests +// +// Created by James on 14/11/2018. +// Copyright © 2018 Swagger. All rights reserved. +// + +import Foundation +import XCTest +@testable import PetstoreClient +@testable import SwaggerClient + +class DateFormatTests: XCTestCase { + + struct DateTest: Codable { + let date: Date + } + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testEncodeToJSONAlwaysResultsInUTCEncodedDate() { + var dateComponents = DateComponents() + dateComponents.calendar = Calendar(identifier: .gregorian) + dateComponents.year = 2018 + dateComponents.month = 11 + dateComponents.day = 14 + dateComponents.hour = 11 + dateComponents.minute = 35 + dateComponents.second = 43 + dateComponents.nanosecond = 500 + + // Testing a date with a timezone of +00:00 (UTC) + dateComponents.timeZone = TimeZone(secondsFromGMT: 0) + XCTAssert(dateComponents.isValidDate) + + guard let utcDate = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + var encodedDate = utcDate.encodeToJSON() as! String + XCTAssert(encodedDate.hasSuffix("Z")) + + // test with a positive timzone offset from UTC + dateComponents.timeZone = TimeZone(secondsFromGMT: 60 * 60) // +01:00 + XCTAssert(dateComponents.isValidDate) + + guard let nonUTCDate1 = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + encodedDate = nonUTCDate1.encodeToJSON() as! String + XCTAssert(encodedDate.hasSuffix("Z")) + + // test with a negative timzone offset from UTC + dateComponents.timeZone = TimeZone(secondsFromGMT: -(60 * 60)) // -01:00 + XCTAssert(dateComponents.isValidDate) + + guard let nonUTCDate2 = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + encodedDate = nonUTCDate2.encodeToJSON() as! String + XCTAssert(encodedDate.hasSuffix("Z")) + } + + func testCodableAlwaysResultsInUTCEncodedDate() throws { + CodableHelper.jsonEncoder.outputFormatting.remove(.prettyPrinted) + let jsonData = "{\"date\":\"1970-01-01T00:00:00.000Z\"}".data(using: .utf8)! + let decodeResult = CodableHelper.decode(DateTest.self, from: jsonData) + _ = try decodeResult.get() + + var dateComponents = DateComponents() + dateComponents.calendar = Calendar(identifier: .gregorian) + dateComponents.year = 1970 + dateComponents.month = 01 + dateComponents.day = 01 + dateComponents.hour = 00 + dateComponents.minute = 00 + dateComponents.second = 00 + + // Testing a date with a timezone of +00:00 (UTC) + dateComponents.timeZone = TimeZone(secondsFromGMT: 0) + XCTAssert(dateComponents.isValidDate) + + guard let date = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + let dateTest = DateTest(date: date) + let encodeResult = CodableHelper.encode(dateTest) + let data = try encodeResult.get() + guard let jsonString = String(data: data, encoding: .utf8) else { + XCTFail("Unable to convert encoded data to string.") + return + } + + let exampleJSONString = "{\"date\":\"1970-01-01T00:00:00.000Z\"}" + XCTAssert(jsonString == exampleJSONString, "Encoded JSON String: \(jsonString) should match: \(exampleJSONString)") + } + +} diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/Info.plist new file mode 100644 index 0000000000..802f84f540 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift new file mode 100644 index 0000000000..6be5bc6d29 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -0,0 +1,80 @@ +// +// PetAPITests.swift +// SwaggerClient +// +// Created by Robin Eggenkamp on 5/21/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import XCTest +@testable import SwaggerClient + +class PetAPITests: XCTestCase { + + let testTimeout = 10.0 + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func test1CreatePet() { + let expectation = self.expectation(description: "testCreatePet") + let category = PetstoreClient.Category(id: 1234, name: "eyeColor") + let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] + let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + + PetAPI.addPet(body: newPet) { (_, error) in + guard error == nil else { + XCTFail("error creating pet") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetPet() { + let expectation = self.expectation(description: "testGetPet") + + PetAPI.getPetById(petId: 1000) { (pet, error) in + guard error == nil else { + XCTFail("error retrieving pet") + return + } + + if let pet = pet { + XCTAssert(pet.id == 1000, "invalid id") + XCTAssert(pet.name == "Fluffy", "invalid name") + + expectation.fulfill() + } + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeletePet() { + let expectation = self.expectation(description: "testDeletePet") + + PetAPI.deletePet(petId: 1000) { (_, error) in + guard error == nil else { + XCTFail("error deleting pet") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift new file mode 100644 index 0000000000..c49f47eee0 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift @@ -0,0 +1,120 @@ +// +// StoreAPITests.swift +// SwaggerClient +// +// Created by Robin Eggenkamp on 5/21/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import XCTest +@testable import SwaggerClient + +class StoreAPITests: XCTestCase { + + let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" + + let testTimeout = 10.0 + + func test1PlaceOrder() { + // use explicit naming to reference the enum so that we test we don't regress on enum naming + let shipDate = Date() + let order = Order(id: 1000, petId: 1000, quantity: 10, shipDate: shipDate, status: .placed, complete: true) + let expectation = self.expectation(description: "testPlaceOrder") + + StoreAPI.placeOrder(body: order) { (order, error) in + guard error == nil else { + XCTFail("error placing order: \(error.debugDescription)") + return + } + + if let order = order { + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat), + "Date should be idempotent") + + expectation.fulfill() + } + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetOrder() { + let expectation = self.expectation(description: "testGetOrder") + + StoreAPI.getOrderById(orderId: 1000) { (order, error) in + guard error == nil else { + XCTFail("error retrieving order: \(error.debugDescription)") + return + } + + if let order = order { + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + + expectation.fulfill() + } + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeleteOrder() { + let expectation = self.expectation(description: "testDeleteOrder") + + StoreAPI.deleteOrder(orderId: "1000") { (response, error) in + guard error == nil else { + XCTFail("error deleting order") + return + } + + guard let _ = response else { + XCTFail("response is nil") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testDownloadProgress() { + let responseExpectation = self.expectation(description: "obtain response") + let progressExpectation = self.expectation(description: "obtain progress") + let requestBuilder = StoreAPI.getOrderByIdWithRequestBuilder(orderId: 1000) + + requestBuilder.onProgressReady = { (progress) in + progressExpectation.fulfill() + } + + requestBuilder.execute { _ in + responseExpectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} + +private extension Date { + + /** + Returns true if the dates are equal given the format string. + + - parameter date: The date to compare to. + - parameter format: The format string to use to compare. + + - returns: true if the dates are equal, given the format string. + */ + func isEqual(_ date: Date, format: String) -> Bool { + let fmt = DateFormatter() + fmt.dateFormat = format + return fmt.string(from: self).isEqual(fmt.string(from: date)) + } + +} diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift new file mode 100644 index 0000000000..0a1ca3902e --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift @@ -0,0 +1,67 @@ +// +// UserAPITests.swift +// SwaggerClient +// +// Created by Robin Eggenkamp on 5/21/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import XCTest +@testable import SwaggerClient + +class UserAPITests: XCTestCase { + + let testTimeout = 10.0 + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testLogin() { + let expectation = self.expectation(description: "testLogin") + + UserAPI.loginUser(username: "swiftTester", password: "swift") { (_, error) in + guard error == nil else { + XCTFail("error logging in") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testLogout() { + let expectation = self.expectation(description: "testLogout") + + UserAPI.logoutUser { (_, error) in + guard error == nil else { + XCTFail("error logging out") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testPathParamsAreEscaped() { + // The path for this operation is /user/{userId}. In order to make a usable path, + // then we must make sure that {userId} is percent-escaped when it is substituted + // into the path. So we intentionally introduce a path with spaces. + let userRequestBuilder = UserAPI.getUserByNameWithRequestBuilder(username: "User Name With Spaces") + let urlContainsSpace = userRequestBuilder.URLString.contains(" ") + + XCTAssert(!urlContainsSpace, "Expected URL to be escaped, but it was not.") + } + +} diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/pom.xml b/samples/client/petstore/swift5/default/SwaggerClientTests/pom.xml new file mode 100644 index 0000000000..4c495fbd00 --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_xcodebuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/default/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/swift5/default/SwaggerClientTests/run_xcodebuild.sh new file mode 100755 index 0000000000..19e1e06dad --- /dev/null +++ b/samples/client/petstore/swift5/default/SwaggerClientTests/run_xcodebuild.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +pod install + +xcodebuild clean build build-for-testing -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" && xcodebuild test-without-building -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md new file mode 100644 index 0000000000..e22d28be1d --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Animal.md b/samples/client/petstore/swift5/default/docs/Animal.md new file mode 100644 index 0000000000..69c601455c --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/AnimalFarm.md b/samples/client/petstore/swift5/default/docs/AnimalFarm.md new file mode 100644 index 0000000000..df6bab21da --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md new file mode 100644 index 0000000000..aead5f1f98 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md @@ -0,0 +1,59 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/docs/ApiResponse.md b/samples/client/petstore/swift5/default/docs/ApiResponse.md new file mode 100644 index 0000000000..c6d9768fe9 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/default/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 0000000000..c6fceff5e0 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/default/docs/ArrayOfNumberOnly.md new file mode 100644 index 0000000000..f09f8fa6f7 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/ArrayTest.md b/samples/client/petstore/swift5/default/docs/ArrayTest.md new file mode 100644 index 0000000000..bf416b8330 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Capitalization.md b/samples/client/petstore/swift5/default/docs/Capitalization.md new file mode 100644 index 0000000000..95374216c7 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Cat.md b/samples/client/petstore/swift5/default/docs/Cat.md new file mode 100644 index 0000000000..fb5949b157 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/CatAllOf.md b/samples/client/petstore/swift5/default/docs/CatAllOf.md new file mode 100644 index 0000000000..79789be61c --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Category.md b/samples/client/petstore/swift5/default/docs/Category.md new file mode 100644 index 0000000000..5ca5408c0f --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/ClassModel.md b/samples/client/petstore/swift5/default/docs/ClassModel.md new file mode 100644 index 0000000000..e3912fdf0f --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Client.md b/samples/client/petstore/swift5/default/docs/Client.md new file mode 100644 index 0000000000..0de1b238c3 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Dog.md b/samples/client/petstore/swift5/default/docs/Dog.md new file mode 100644 index 0000000000..4824786da0 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/DogAllOf.md b/samples/client/petstore/swift5/default/docs/DogAllOf.md new file mode 100644 index 0000000000..9302ef52e9 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/EnumArrays.md b/samples/client/petstore/swift5/default/docs/EnumArrays.md new file mode 100644 index 0000000000..b9a9807d3c --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/EnumClass.md b/samples/client/petstore/swift5/default/docs/EnumClass.md new file mode 100644 index 0000000000..67f017becd --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/EnumTest.md b/samples/client/petstore/swift5/default/docs/EnumTest.md new file mode 100644 index 0000000000..bc9b036dd7 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/FakeAPI.md b/samples/client/petstore/swift5/default/docs/FakeAPI.md new file mode 100644 index 0000000000..49d4d3fb6a --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/FakeAPI.md @@ -0,0 +1,662 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md new file mode 100644 index 0000000000..9f24b46edb --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/FakeClassnameTags123API.md @@ -0,0 +1,59 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/docs/File.md b/samples/client/petstore/swift5/default/docs/File.md new file mode 100644 index 0000000000..3edfef17b7 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/default/docs/FileSchemaTestClass.md new file mode 100644 index 0000000000..afdacc60b2 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/FormatTest.md b/samples/client/petstore/swift5/default/docs/FormatTest.md new file mode 100644 index 0000000000..f74d94f6c4 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/default/docs/HasOnlyReadOnly.md new file mode 100644 index 0000000000..57b6e3a17e --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/List.md b/samples/client/petstore/swift5/default/docs/List.md new file mode 100644 index 0000000000..b77718302e --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/MapTest.md b/samples/client/petstore/swift5/default/docs/MapTest.md new file mode 100644 index 0000000000..56213c4113 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 0000000000..fcffb8ecdb --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Model200Response.md b/samples/client/petstore/swift5/default/docs/Model200Response.md new file mode 100644 index 0000000000..5865ea690c --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Name.md b/samples/client/petstore/swift5/default/docs/Name.md new file mode 100644 index 0000000000..f7b180292c --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/NumberOnly.md b/samples/client/petstore/swift5/default/docs/NumberOnly.md new file mode 100644 index 0000000000..72bd361168 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Order.md b/samples/client/petstore/swift5/default/docs/Order.md new file mode 100644 index 0000000000..15487f0117 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/OuterComposite.md b/samples/client/petstore/swift5/default/docs/OuterComposite.md new file mode 100644 index 0000000000..d6b3583bc3 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/OuterEnum.md b/samples/client/petstore/swift5/default/docs/OuterEnum.md new file mode 100644 index 0000000000..06d413b016 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Pet.md b/samples/client/petstore/swift5/default/docs/Pet.md new file mode 100644 index 0000000000..5c05f98fad --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/PetAPI.md b/samples/client/petstore/swift5/default/docs/PetAPI.md new file mode 100644 index 0000000000..27efe08334 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/PetAPI.md @@ -0,0 +1,469 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/default/docs/ReadOnlyFirst.md new file mode 100644 index 0000000000..ed537b8759 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Return.md b/samples/client/petstore/swift5/default/docs/Return.md new file mode 100644 index 0000000000..66d17c27c8 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/SpecialModelName.md b/samples/client/petstore/swift5/default/docs/SpecialModelName.md new file mode 100644 index 0000000000..3ec27a38c2 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/StoreAPI.md b/samples/client/petstore/swift5/default/docs/StoreAPI.md new file mode 100644 index 0000000000..36365ca519 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/StoreAPI.md @@ -0,0 +1,206 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/docs/StringBooleanMap.md b/samples/client/petstore/swift5/default/docs/StringBooleanMap.md new file mode 100644 index 0000000000..7abf11ec68 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/Tag.md b/samples/client/petstore/swift5/default/docs/Tag.md new file mode 100644 index 0000000000..ff4ac8aa45 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/default/docs/TypeHolderDefault.md new file mode 100644 index 0000000000..5161394bdc --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/TypeHolderExample.md b/samples/client/petstore/swift5/default/docs/TypeHolderExample.md new file mode 100644 index 0000000000..46d0471cd7 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/User.md b/samples/client/petstore/swift5/default/docs/User.md new file mode 100644 index 0000000000..5a439de0ff --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/default/docs/UserAPI.md b/samples/client/petstore/swift5/default/docs/UserAPI.md new file mode 100644 index 0000000000..380813bc68 --- /dev/null +++ b/samples/client/petstore/swift5/default/docs/UserAPI.md @@ -0,0 +1,406 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/default/git_push.sh b/samples/client/petstore/swift5/default/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/client/petstore/swift5/default/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/default/pom.xml b/samples/client/petstore/swift5/default/pom.xml new file mode 100644 index 0000000000..c1b201eb3b --- /dev/null +++ b/samples/client/petstore/swift5/default/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/default/project.yml b/samples/client/petstore/swift5/default/project.yml new file mode 100644 index 0000000000..892005fdd5 --- /dev/null +++ b/samples/client/petstore/swift5/default/project.yml @@ -0,0 +1,14 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + diff --git a/samples/client/petstore/swift5/default/run_spmbuild.sh b/samples/client/petstore/swift5/default/run_spmbuild.sh new file mode 100755 index 0000000000..1a9f585ad0 --- /dev/null +++ b/samples/client/petstore/swift5/default/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/nonPublicApi/.gitignore b/samples/client/petstore/swift5/nonPublicApi/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator-ignore b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION new file mode 100644 index 0000000000..58592f031f --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/nonPublicApi/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/nonPublicApi/Cartfile b/samples/client/petstore/swift5/nonPublicApi/Cartfile new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/Cartfile @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/swift5/nonPublicApi/Info.plist b/samples/client/petstore/swift5/nonPublicApi/Info.plist new file mode 100644 index 0000000000..323e5ecfc4 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/nonPublicApi/Package.swift b/samples/client/petstore/swift5/nonPublicApi/Package.swift new file mode 100644 index 0000000000..96dfff54ed --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: [], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.podspec b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.podspec new file mode 100644 index 0000000000..b61285f6b2 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' +end diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6f8918eb33 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,536 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11F49B24B6239C324722572C /* URLSessionImplementations.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */, + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */, + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 0000000000..26d510552b --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 0000000000..8641eb7ebf --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct APIHelper { + internal static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + internal static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? [Any?] { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + internal static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + internal static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + internal static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? [Any?] { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 0000000000..743d9aa443 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,64 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal class PetstoreClientAPI { + internal static var basePath = "http://petstore.swagger.io:80/v2" + internal static var credential: URLCredential? + internal static var customHeaders: [String: String] = [:] + internal static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() + internal static var apiResponseQueue: DispatchQueue = .main +} + +internal class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + internal let parameters: [String: Any]? + internal let isBody: Bool + internal let method: String + internal let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client. + internal var onProgressReady: ((Progress) -> Void)? + + required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(PetstoreClientAPI.customHeaders) + } + + internal func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + internal func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + internal func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + internal func addCredential() -> Self { + self.credential = PetstoreClientAPI.credential + return self + } +} + +internal protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 0000000000..174e6c12ae --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,48 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal class AnotherFakeAPI { + /** + To test special tags + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + internal class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 0000000000..93a7c43079 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,619 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal class FakeAPI { + /** + + - parameter body: (body) Input boolean as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + internal class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input composite as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + internal class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input number as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + internal class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input string as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + internal class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + internal class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter query: (query) + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + internal class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "query": query.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + To test \"client\" model + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + internal class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter number: (form) None + - parameter float: (form) None (optional) + - parameter double: (form) None + - parameter string: (form) None (optional) + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testEndpointParametersWithRequestBuilder(integer: integer, int32: int32, int64: int64, number: number, float: float, double: double, string: string, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter number: (form) None + - parameter float: (form) None (optional) + - parameter double: (form) None + - parameter string: (form) None (optional) + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + internal class func testEndpointParametersWithRequestBuilder(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "integer": integer?.encodeToJSON(), + "int32": int32?.encodeToJSON(), + "int64": int64?.encodeToJSON(), + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), + "date": date?.encodeToJSON(), + "dateTime": dateTime?.encodeToJSON(), + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + * enum for parameter enumHeaderStringArray + */ + internal enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + internal enum EnumHeaderString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + internal enum EnumQueryStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + internal enum EnumQueryString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + internal enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + internal enum EnumQueryDouble_testEnumParameters: Double, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + internal enum EnumFormStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + internal enum EnumFormString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - returns: RequestBuilder + */ + internal class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + Fake endpoint to test group parameters (optional) + + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + internal class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), + "int64_group": int64Group?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + test inline additionalProperties + + - parameter param: (body) request body + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + internal class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + test json serialization of form data + + - parameter param: (form) field1 + - parameter param2: (form) field2 + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + internal class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 0000000000..548c5fb352 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,51 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal class FakeClassnameTags123API { + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + internal class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 0000000000..4802f256c1 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,431 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal class PetAPI { + /** + Add a new pet to the store + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + internal class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Deletes a pet + + - parameter apiKey: (header) (optional) + - parameter petId: (path) Pet id to delete + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func deletePet(apiKey: String? = nil, petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deletePetWithRequestBuilder(apiKey: apiKey, petId: petId).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter apiKey: (header) (optional) + - parameter petId: (path) Pet id to delete + - returns: RequestBuilder + */ + internal class func deletePetWithRequestBuilder(apiKey: String? = nil, petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + let nillableHeaders: [String: Any?] = [ + "api_key": apiKey?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + * enum for parameter status + */ + internal enum Status_findPetsByStatus: String, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + + - parameter status: (query) Status values that need to be considered for filter + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + internal class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "status": status.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Finds Pets by tags + + - parameter tags: (query) Tags to filter by + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + internal class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "tags": tags.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find pet by ID + + - parameter petId: (path) ID of pet to return + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + internal class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Update an existing pet + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + internal class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Updates a pet in the store with form data + + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + internal class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + internal class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image (required) + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter requiredFile: (form) file to upload + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter requiredFile: (form) file to upload + - returns: RequestBuilder + */ + internal class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 0000000000..f1e423111d --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,165 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal class StoreAPI { + /** + Delete purchase order by ID + + - parameter orderId: (path) ID of the order that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + internal class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Returns pet inventories by status + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + internal class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find purchase order by ID + + - parameter orderId: (path) ID of pet that needs to be fetched + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + internal class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Place an order for a pet + + - parameter body: (body) order placed for purchasing the pet + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + internal class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { + let path = "/store/order" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 0000000000..c8d714e899 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,318 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal class UserAPI { + /** + Create user + + - parameter body: (body) Created user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + internal class func createUserWithRequestBuilder(body: User) -> RequestBuilder { + let path = "/user" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + internal class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + internal class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Delete user + + - parameter username: (path) The name that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + internal class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Get user by user name + + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + internal class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs user into the system + + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + internal class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "username": username.encodeToJSON(), + "password": password.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs out current logged in user session + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + internal class func logoutUserWithRequestBuilder() -> RequestBuilder { + let path = "/user/logout" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Updated user + + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + internal class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + internal class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 0000000000..f14bd48ace --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + internal static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + internal static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + internal static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + internal class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + internal class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 0000000000..4dfbe7b0cd --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + internal static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 0000000000..66f407c1c5 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + internal mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + internal mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + internal mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + internal mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + internal func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + internal func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + internal func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 0000000000..6b69f3b1bd --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + internal func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + internal static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 0000000000..7d8f433dfe --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal class JSONEncodingHelper { + + internal class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + internal class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 0000000000..b5f1df522b --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,51 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +internal enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +internal enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +internal enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +internal class Response { + internal let statusCode: Int + internal let header: [String: String] + internal let body: T? + + internal init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + internal convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 0000000000..b4d5ae6faf --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,25 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct AdditionalPropertiesClass: Codable { + + internal var mapString: [String: String]? + internal var mapMapString: [String: [String: String]]? + + internal init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 0000000000..ada7f86de5 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,20 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct Animal: Codable { + + internal var className: String + internal var color: String? = "red" + + internal init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 0000000000..3ebe9e9a5d --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 0000000000..b60d8999b4 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,22 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct ApiResponse: Codable { + + internal var code: Int? + internal var type: String? + internal var message: String? + + internal init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 0000000000..67371b816b --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct ArrayOfArrayOfNumberOnly: Codable { + + internal var arrayArrayNumber: [[Double]]? + + internal init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 0000000000..2c7047eac4 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct ArrayOfNumberOnly: Codable { + + internal var arrayNumber: [Double]? + + internal init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 0000000000..9c3a3a9f5e --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,28 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct ArrayTest: Codable { + + internal var arrayOfString: [String]? + internal var arrayArrayOfInteger: [[Int64]]? + internal var arrayArrayOfModel: [[ReadOnlyFirst]]? + + internal init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 0000000000..965ec5aefb --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,38 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct Capitalization: Codable { + + internal var smallCamel: String? + internal var capitalCamel: String? + internal var smallSnake: String? + internal var capitalSnake: String? + internal var sCAETHFlowPoints: String? + /** Name of the pet */ + internal var ATT_NAME: String? + + internal init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 0000000000..8a603dee5f --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,22 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct Cat: Codable { + + internal var className: String + internal var color: String? = "red" + internal var declawed: Bool? + + internal init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 0000000000..45b7dbb26d --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,18 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct CatAllOf: Codable { + + internal var declawed: Bool? + + internal init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 0000000000..849bf788df --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,20 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct Category: Codable { + + internal var id: Int64? + internal var name: String = "default-name" + + internal init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 0000000000..0f1bc19fe5 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ +internal struct ClassModel: Codable { + + internal var _class: String? + + internal init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 0000000000..ddee836043 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,18 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct Client: Codable { + + internal var client: String? + + internal init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 0000000000..6b5250de4a --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,22 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct Dog: Codable { + + internal var className: String + internal var color: String? = "red" + internal var breed: String? + + internal init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 0000000000..ef3ff7f1d7 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,18 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct DogAllOf: Codable { + + internal var breed: String? + + internal init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 0000000000..bb9f64cfb4 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,33 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct EnumArrays: Codable { + + internal enum JustSymbol: String, Codable, CaseIterable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + internal enum ArrayEnum: String, Codable, CaseIterable { + case fish = "fish" + case crab = "crab" + } + internal var justSymbol: JustSymbol? + internal var arrayEnum: [ArrayEnum]? + + internal init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 0000000000..71fd29e0d2 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal enum EnumClass: String, Codable, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 0000000000..421aa5436b --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,52 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct EnumTest: Codable { + + internal enum EnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + internal enum EnumStringRequired: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + internal enum EnumInteger: Int, Codable, CaseIterable { + case _1 = 1 + case number1 = -1 + } + internal enum EnumNumber: Double, Codable, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + internal var enumString: EnumString? + internal var enumStringRequired: EnumStringRequired + internal var enumInteger: EnumInteger? + internal var enumNumber: EnumNumber? + internal var outerEnum: OuterEnum? + + internal init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 0000000000..632402fb9e --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ +internal struct File: Codable { + + /** Test capitalization */ + internal var sourceURI: String? + + internal init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 0000000000..e478e6c4b7 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,20 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct FileSchemaTestClass: Codable { + + internal var file: File? + internal var files: [File]? + + internal init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 0000000000..23395c93b5 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,42 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct FormatTest: Codable { + + internal var integer: Int? + internal var int32: Int? + internal var int64: Int64? + internal var number: Double + internal var float: Float? + internal var double: Double? + internal var string: String? + internal var byte: Data + internal var binary: URL? + internal var date: Date + internal var dateTime: Date? + internal var uuid: UUID? + internal var password: String + + internal init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 0000000000..831963ba2e --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,20 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct HasOnlyReadOnly: Codable { + + internal var bar: String? + internal var foo: String? + + internal init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 0000000000..c5960de215 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,22 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct List: Codable { + + internal var _123list: String? + + internal init(_123list: String?) { + self._123list = _123list + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 0000000000..db4f8f436a --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,35 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct MapTest: Codable { + + internal enum MapOfEnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + } + internal var mapMapOfString: [String: [String: String]]? + internal var mapOfEnumString: [String: String]? + internal var directMap: [String: Bool]? + internal var indirectMap: StringBooleanMap? + + internal init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 0000000000..c71bb9256b --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,22 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + internal var uuid: UUID? + internal var dateTime: Date? + internal var map: [String: Animal]? + + internal init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 0000000000..5d31a885f7 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ +internal struct Model200Response: Codable { + + internal var name: Int? + internal var _class: String? + + internal init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 0000000000..2aa8fb1524 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ +internal struct Name: Codable { + + internal var name: Int + internal var snakeCase: Int? + internal var property: String? + internal var _123number: Int? + + internal init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 0000000000..49d73706e3 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,22 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct NumberOnly: Codable { + + internal var justNumber: Double? + + internal init(justNumber: Double?) { + self.justNumber = justNumber + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 0000000000..dcefb40efa --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,34 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct Order: Codable { + + internal enum Status: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + internal var id: Int64? + internal var petId: Int64? + internal var quantity: Int? + internal var shipDate: Date? + /** Order Status */ + internal var status: Status? + internal var complete: Bool? = false + + internal init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 0000000000..c61c2c4a46 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,28 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct OuterComposite: Codable { + + internal var myNumber: Double? + internal var myString: String? + internal var myBoolean: Bool? + + internal init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 0000000000..e0cdcbea05 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal enum OuterEnum: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 0000000000..b71700544d --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,34 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct Pet: Codable { + + internal enum Status: String, Codable, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + internal var id: Int64? + internal var category: Category? + internal var name: String + internal var photoUrls: [String] + internal var tags: [Tag]? + /** pet status in the store */ + internal var status: Status? + + internal init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 0000000000..d02c6cc5fd --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,20 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct ReadOnlyFirst: Codable { + + internal var bar: String? + internal var baz: String? + + internal init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 0000000000..95a18b571a --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ +internal struct Return: Codable { + + internal var _return: Int? + + internal init(_return: Int?) { + self._return = _return + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 0000000000..b6ac3651f0 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,22 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SpecialModelName: Codable { + + internal var specialPropertyName: Int64? + + internal init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 0000000000..dc3d00e130 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct StringBooleanMap: Codable { + + internal var additionalProperties: [String: Bool] = [:] + + internal subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + internal func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + internal init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 0000000000..1e4de951fb --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,20 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct Tag: Codable { + + internal var id: Int64? + internal var name: String? + + internal init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 0000000000..83908bb4fc --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,34 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct TypeHolderDefault: Codable { + + internal var stringItem: String = "what" + internal var numberItem: Double + internal var integerItem: Int + internal var boolItem: Bool = true + internal var arrayItem: [Int] + + internal init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 0000000000..3e2c6193aa --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,34 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct TypeHolderExample: Codable { + + internal var stringItem: String + internal var numberItem: Double + internal var integerItem: Int + internal var boolItem: Bool + internal var arrayItem: [Int] + + internal init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + internal enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 0000000000..ada8a7f82d --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,33 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct User: Codable { + + internal var id: Int64? + internal var username: String? + internal var firstName: String? + internal var lastName: String? + internal var email: String? + internal var password: String? + internal var phone: String? + /** User Status */ + internal var userStatus: Int? + + internal init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 0000000000..cc04b4e3a4 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +internal class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override internal func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift new file mode 100644 index 0000000000..2f430c08e2 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -0,0 +1,544 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +internal class URLSessionRequestBuilder: RequestBuilder { + + let progress = Progress() + + private var observation: NSKeyValueObservation? + + deinit { + observation?.invalidate() + } + + fileprivate let sessionDelegate = SessionDelegate() + + /** + May be assigned if you want to control the authentication challenges. + */ + internal var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - intercept and handle errors like authorization + - retry the request. + */ + internal var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? + + required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the URLSession + configuration. + */ + internal func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + internal func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + internal func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + + guard let url = URL(string: URLString) else { + throw DownloadException.requestMissingURL + } + + var originalRequest = URLRequest(url: url) + + originalRequest.httpMethod = method.rawValue + + buildHeaders().forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + headers.forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) + + return modifiedRequest + } + + override internal func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { + let urlSessionId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + let parameters: [String: Any] = self.parameters ?? [:] + + let fileKeys = parameters.filter { $1 is NSURL } + .map { $0.0 } + + let encoding: ParameterEncoding + if fileKeys.count > 0 { + encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) + } else if isBody { + encoding = JSONDataEncoding() + } else { + encoding = URLEncoding() + } + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsuported Http method - \(method)") + } + + let cleanupRequest = { + urlSessionStore[urlSessionId] = nil + self.observation?.invalidate() + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in + + guard let self = self else { return } + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in + + guard let self = self else { return } + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { + observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in + self.progress.totalUnitCount = newProgress.totalUnitCount + self.progress.completedUnitCount = newProgress.completedUnitCount + } + + onProgressReady?(progress) + } + + dataTask.resume() + + } catch { + apiResponseQueue.async { + cleanupRequest() + completion(.failure(ErrorResponse.error(415, nil, error))) + } + } + + } + + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: httpResponse, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, data, error))) + } + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + internal func buildHeaders() -> [String: String] { + var httpHeaders = PetstoreClientAPI.customHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +internal class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + case is Data.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + guard let data = data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + } + } +} + +private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + + var credential: URLCredential? + + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +internal enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +internal protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +private class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +private class FileUploadEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + for (k, v) in parameters ?? [:] { + switch v { + case let fileURL as URL: + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: fileURL.lastPathComponent, data: fileData, mimeType: mimetype) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, name: String, data: Data, mimeType: String?) -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody ?? Data() + + // https://stackoverflow.com/a/26163136/976628 + let boundary = "Boundary-\(UUID().uuidString)" + urlRequest.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") + + body.append("--\(boundary)\r\n") + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(name)\"\r\n") + + if let mimeType = mimeType { + body.append("Content-Type: \(mimeType)\r\n\r\n") + } + + body.append(data) + + body.append("\r\n") + + body.append("--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +fileprivate extension Data { + /// Append string to NSMutableData + /// + /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to NSData, and then add that data to the NSMutableData, this wraps it in a nice convenient little extension to NSMutableData. This converts using UTF-8. + /// + /// - parameter string: The string to be added to the `NSMutableData`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/petstore/swift5/nonPublicApi/README.md b/samples/client/petstore/swift5/nonPublicApi/README.md new file mode 100644 index 0000000000..a50bf382e3 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/README.md @@ -0,0 +1,141 @@ +# Swift5 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/nonPublicApi/docs/AdditionalPropertiesClass.md new file mode 100644 index 0000000000..e22d28be1d --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Animal.md b/samples/client/petstore/swift5/nonPublicApi/docs/Animal.md new file mode 100644 index 0000000000..69c601455c --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/AnimalFarm.md b/samples/client/petstore/swift5/nonPublicApi/docs/AnimalFarm.md new file mode 100644 index 0000000000..df6bab21da --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/AnotherFakeAPI.md new file mode 100644 index 0000000000..387f5f5bb0 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/AnotherFakeAPI.md @@ -0,0 +1,59 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + internal class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/ApiResponse.md b/samples/client/petstore/swift5/nonPublicApi/docs/ApiResponse.md new file mode 100644 index 0000000000..c6d9768fe9 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/nonPublicApi/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 0000000000..c6fceff5e0 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/nonPublicApi/docs/ArrayOfNumberOnly.md new file mode 100644 index 0000000000..f09f8fa6f7 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/ArrayTest.md b/samples/client/petstore/swift5/nonPublicApi/docs/ArrayTest.md new file mode 100644 index 0000000000..bf416b8330 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Capitalization.md b/samples/client/petstore/swift5/nonPublicApi/docs/Capitalization.md new file mode 100644 index 0000000000..95374216c7 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Cat.md b/samples/client/petstore/swift5/nonPublicApi/docs/Cat.md new file mode 100644 index 0000000000..fb5949b157 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/CatAllOf.md b/samples/client/petstore/swift5/nonPublicApi/docs/CatAllOf.md new file mode 100644 index 0000000000..79789be61c --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Category.md b/samples/client/petstore/swift5/nonPublicApi/docs/Category.md new file mode 100644 index 0000000000..5ca5408c0f --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/ClassModel.md b/samples/client/petstore/swift5/nonPublicApi/docs/ClassModel.md new file mode 100644 index 0000000000..e3912fdf0f --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Client.md b/samples/client/petstore/swift5/nonPublicApi/docs/Client.md new file mode 100644 index 0000000000..0de1b238c3 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Dog.md b/samples/client/petstore/swift5/nonPublicApi/docs/Dog.md new file mode 100644 index 0000000000..4824786da0 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/DogAllOf.md b/samples/client/petstore/swift5/nonPublicApi/docs/DogAllOf.md new file mode 100644 index 0000000000..9302ef52e9 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/EnumArrays.md b/samples/client/petstore/swift5/nonPublicApi/docs/EnumArrays.md new file mode 100644 index 0000000000..b9a9807d3c --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/EnumClass.md b/samples/client/petstore/swift5/nonPublicApi/docs/EnumClass.md new file mode 100644 index 0000000000..67f017becd --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/EnumTest.md b/samples/client/petstore/swift5/nonPublicApi/docs/EnumTest.md new file mode 100644 index 0000000000..bc9b036dd7 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md new file mode 100644 index 0000000000..f8e42ac4df --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FakeAPI.md @@ -0,0 +1,662 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + internal class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + internal class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + internal class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + internal class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + internal class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + internal class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + internal class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + internal class func testEndpointParameters(integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, number: Double, float: Float? = nil, double: Double, string: String? = nil, patternWithoutDelimiter: String, byte: Data, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let number = 987 // Double | None +let float = 987 // Float | None (optional) +let double = 987 // Double | None +let string = "string_example" // String | None (optional) +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(integer: integer, int32: int32, int64: int64, number: number, float: float, double: double, string: string, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **number** | **Double** | None | + **float** | **Float** | None | [optional] + **double** | **Double** | None | + **string** | **String** | None | [optional] + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + internal class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + internal class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + internal class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + internal class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/nonPublicApi/docs/FakeClassnameTags123API.md new file mode 100644 index 0000000000..4d82fa29a5 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FakeClassnameTags123API.md @@ -0,0 +1,59 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + internal class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/File.md b/samples/client/petstore/swift5/nonPublicApi/docs/File.md new file mode 100644 index 0000000000..3edfef17b7 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/nonPublicApi/docs/FileSchemaTestClass.md new file mode 100644 index 0000000000..afdacc60b2 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/FormatTest.md b/samples/client/petstore/swift5/nonPublicApi/docs/FormatTest.md new file mode 100644 index 0000000000..f74d94f6c4 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/nonPublicApi/docs/HasOnlyReadOnly.md new file mode 100644 index 0000000000..57b6e3a17e --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/List.md b/samples/client/petstore/swift5/nonPublicApi/docs/List.md new file mode 100644 index 0000000000..b77718302e --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/MapTest.md b/samples/client/petstore/swift5/nonPublicApi/docs/MapTest.md new file mode 100644 index 0000000000..56213c4113 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 0000000000..fcffb8ecdb --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Model200Response.md b/samples/client/petstore/swift5/nonPublicApi/docs/Model200Response.md new file mode 100644 index 0000000000..5865ea690c --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Name.md b/samples/client/petstore/swift5/nonPublicApi/docs/Name.md new file mode 100644 index 0000000000..f7b180292c --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/NumberOnly.md b/samples/client/petstore/swift5/nonPublicApi/docs/NumberOnly.md new file mode 100644 index 0000000000..72bd361168 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Order.md b/samples/client/petstore/swift5/nonPublicApi/docs/Order.md new file mode 100644 index 0000000000..15487f0117 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/OuterComposite.md b/samples/client/petstore/swift5/nonPublicApi/docs/OuterComposite.md new file mode 100644 index 0000000000..d6b3583bc3 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/OuterEnum.md b/samples/client/petstore/swift5/nonPublicApi/docs/OuterEnum.md new file mode 100644 index 0000000000..06d413b016 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Pet.md b/samples/client/petstore/swift5/nonPublicApi/docs/Pet.md new file mode 100644 index 0000000000..5c05f98fad --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md new file mode 100644 index 0000000000..8fd9872c0e --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/PetAPI.md @@ -0,0 +1,469 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + internal class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + internal class func deletePet(apiKey: String? = nil, petId: Int64, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let apiKey = "apiKey_example" // String | (optional) +let petId = 987 // Int64 | Pet id to delete + +// Deletes a pet +PetAPI.deletePet(apiKey: apiKey, petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **apiKey** | **String** | | [optional] + **petId** | **Int64** | Pet id to delete | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + internal class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + internal class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + internal class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + internal class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + internal class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let requiredFile = URL(string: "https://example.com")! // URL | file to upload + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **requiredFile** | **URL** | file to upload | + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/nonPublicApi/docs/ReadOnlyFirst.md new file mode 100644 index 0000000000..ed537b8759 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Return.md b/samples/client/petstore/swift5/nonPublicApi/docs/Return.md new file mode 100644 index 0000000000..66d17c27c8 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/SpecialModelName.md b/samples/client/petstore/swift5/nonPublicApi/docs/SpecialModelName.md new file mode 100644 index 0000000000..3ec27a38c2 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md new file mode 100644 index 0000000000..cec8acecb8 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md @@ -0,0 +1,206 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + internal class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + internal class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + internal class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + internal class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/StringBooleanMap.md b/samples/client/petstore/swift5/nonPublicApi/docs/StringBooleanMap.md new file mode 100644 index 0000000000..7abf11ec68 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/Tag.md b/samples/client/petstore/swift5/nonPublicApi/docs/Tag.md new file mode 100644 index 0000000000..ff4ac8aa45 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/nonPublicApi/docs/TypeHolderDefault.md new file mode 100644 index 0000000000..5161394bdc --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/TypeHolderExample.md b/samples/client/petstore/swift5/nonPublicApi/docs/TypeHolderExample.md new file mode 100644 index 0000000000..46d0471cd7 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/User.md b/samples/client/petstore/swift5/nonPublicApi/docs/User.md new file mode 100644 index 0000000000..5a439de0ff --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/UserAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/UserAPI.md new file mode 100644 index 0000000000..56fba1b3c9 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/docs/UserAPI.md @@ -0,0 +1,406 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + internal class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + internal class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + internal class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + internal class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + internal class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + internal class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + internal class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + internal class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/nonPublicApi/git_push.sh b/samples/client/petstore/swift5/nonPublicApi/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/nonPublicApi/pom.xml b/samples/client/petstore/swift5/nonPublicApi/pom.xml new file mode 100644 index 0000000000..c1b201eb3b --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/nonPublicApi/project.yml b/samples/client/petstore/swift5/nonPublicApi/project.yml new file mode 100644 index 0000000000..892005fdd5 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/project.yml @@ -0,0 +1,14 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + diff --git a/samples/client/petstore/swift5/nonPublicApi/run_spmbuild.sh b/samples/client/petstore/swift5/nonPublicApi/run_spmbuild.sh new file mode 100755 index 0000000000..1a9f585ad0 --- /dev/null +++ b/samples/client/petstore/swift5/nonPublicApi/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/objcCompatible/.gitignore b/samples/client/petstore/swift5/objcCompatible/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator-ignore b/samples/client/petstore/swift5/objcCompatible/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION new file mode 100644 index 0000000000..58592f031f --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/objcCompatible/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/objcCompatible/Cartfile b/samples/client/petstore/swift5/objcCompatible/Cartfile new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/Cartfile @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/swift5/objcCompatible/Info.plist b/samples/client/petstore/swift5/objcCompatible/Info.plist new file mode 100644 index 0000000000..323e5ecfc4 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/objcCompatible/Package.swift b/samples/client/petstore/swift5/objcCompatible/Package.swift new file mode 100644 index 0000000000..96dfff54ed --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: [], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient.podspec b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.podspec new file mode 100644 index 0000000000..b61285f6b2 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' +end diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6f8918eb33 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,536 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11F49B24B6239C324722572C /* URLSessionImplementations.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */, + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */, + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 0000000000..26d510552b --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 0000000000..2000700968 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? [Any?] { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? [Any?] { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 0000000000..e4cbda9c72 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,64 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetstoreClientAPI { + public static var basePath = "http://petstore.swagger.io:80/v2" + public static var credential: URLCredential? + public static var customHeaders: [String: String] = [:] + public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + public let parameters: [String: Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client. + public var onProgressReady: ((Progress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(PetstoreClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = PetstoreClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 0000000000..5bbf323f82 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,48 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class AnotherFakeAPI { + /** + To test special tags + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 0000000000..dfbb6b0224 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,619 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class FakeAPI { + /** + + - parameter body: (body) Input boolean as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input composite as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input number as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input string as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter query: (query) + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "query": query.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + To test \"client\" model + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "integer": integer?.encodeToJSON(), + "int32": int32?.encodeToJSON(), + "int64": int64?.encodeToJSON(), + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), + "date": date?.encodeToJSON(), + "dateTime": dateTime?.encodeToJSON(), + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - returns: RequestBuilder + */ + open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + Fake endpoint to test group parameters (optional) + + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), + "int64_group": int64Group?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + test inline additionalProperties + + - parameter param: (body) request body + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + test json serialization of form data + + - parameter param: (form) field1 + - parameter param2: (form) field2 + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 0000000000..48cfe7187b --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,51 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class FakeClassnameTags123API { + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 0000000000..0552d4a6c1 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,431 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetAPI { + /** + Add a new pet to the store + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Deletes a pet + + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + let nillableHeaders: [String: Any?] = [ + "api_key": apiKey?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + + - parameter status: (query) Status values that need to be considered for filter + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "status": status.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Finds Pets by tags + + - parameter tags: (query) Tags to filter by + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "tags": tags.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find pet by ID + + - parameter petId: (path) ID of pet to return + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Update an existing pet + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Updates a pet in the store with form data + + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image (required) + + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 0000000000..a8a83eda39 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,165 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class StoreAPI { + /** + Delete purchase order by ID + + - parameter orderId: (path) ID of the order that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Returns pet inventories by status + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find purchase order by ID + + - parameter orderId: (path) ID of pet that needs to be fetched + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Place an order for a pet + + - parameter body: (body) order placed for purchasing the pet + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { + let path = "/store/order" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 0000000000..505ed1b0c5 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,318 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class UserAPI { + /** + Create user + + - parameter body: (body) Created user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { + let path = "/user" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Delete user + + - parameter username: (path) The name that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Get user by user name + + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs user into the system + + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "username": username.encodeToJSON(), + "password": password.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs out current logged in user session + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + open class func logoutUserWithRequestBuilder() -> RequestBuilder { + let path = "/user/logout" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Updated user + + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 0000000000..32e194f6ee --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + open class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + open class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 0000000000..627d9adb75 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 0000000000..74fcfcf2ad --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 0000000000..b79e9f5e64 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 0000000000..02f78ffb47 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 0000000000..b9757b6cbc --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,51 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +public enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 0000000000..1af0315359 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,25 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 0000000000..5ed9f31e2a --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,20 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 0000000000..e09b0e9efd --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 0000000000..ec270da890 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,22 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 0000000000..6c252ed475 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 0000000000..e84eb5d650 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 0000000000..d2140933d1 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,28 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 0000000000..d1b3b27616 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,38 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 0000000000..7d819cbcc8 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,27 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + public var declawedNum: NSNumber? { + get { + return declawed.map({ return NSNumber(value: $0) }) + } + } + + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 0000000000..a51ad0dffa --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,18 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 0000000000..620031f88c --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,25 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var _id: Int64? + public var name: String = "default-name" + + public init(_id: Int64?, name: String) { + self._id = _id + self.name = name + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _id = "id" + case name + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 0000000000..e2a7d4427a --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ +public struct ClassModel: Codable { + + public var _class: String? + + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 0000000000..00245ca372 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,18 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 0000000000..492c122800 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,22 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 0000000000..7786f8acc5 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,18 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 0000000000..9844e7c40e --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,33 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable, CaseIterable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable, CaseIterable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 0000000000..d4029d73f8 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 0000000000..789f583e1d --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,52 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable, CaseIterable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 0000000000..abf3ccffc4 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 0000000000..532f145793 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,20 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 0000000000..20bd6d103b --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,42 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 0000000000..906ddb06fb --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,20 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 0000000000..fe13d302cc --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,22 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 0000000000..4b6037f378 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,35 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 0000000000..c3deb2f289 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,22 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 0000000000..b61db7d6e7 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 0000000000..8ab4db44b7 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 0000000000..4d1dafcc2c --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,22 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 0000000000..50f6f9bb74 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,43 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var _id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + + public init(_id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self._id = _id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _id = "id" + case petId + case quantity + case shipDate + case status + case complete + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 0000000000..18c3a024f1 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,28 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 0000000000..c3b778cbbe --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 0000000000..e769462ea7 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,43 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var _id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + + public init(_id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self._id = _id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _id = "id" + case category + case name + case photoUrls + case tags + case status + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 0000000000..0acd21fd10 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,20 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 0000000000..c223f993a6 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ +public struct Return: Codable { + + public var _return: Int? + + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 0000000000..6e8650f76d --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,22 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 0000000000..3f1237fee4 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 0000000000..632eaf6fb4 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,25 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var _id: Int64? + public var name: String? + + public init(_id: Int64?, name: String?) { + self._id = _id + self.name = name + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _id = "id" + case name + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 0000000000..a9e088808e --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,34 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 0000000000..dff4083ae4 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,34 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 0000000000..72e264d628 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,44 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var _id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + + public init(_id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self._id = _id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _id = "id" + case username + case firstName + case lastName + case email + case password + case phone + case userStatus + } + +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 0000000000..e06208074c --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +public class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override public func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift new file mode 100644 index 0000000000..9e552cce09 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -0,0 +1,544 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +open class URLSessionRequestBuilder: RequestBuilder { + + let progress = Progress() + + private var observation: NSKeyValueObservation? + + deinit { + observation?.invalidate() + } + + fileprivate let sessionDelegate = SessionDelegate() + + /** + May be assigned if you want to control the authentication challenges. + */ + public var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - intercept and handle errors like authorization + - retry the request. + */ + public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the URLSession + configuration. + */ + open func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + + guard let url = URL(string: URLString) else { + throw DownloadException.requestMissingURL + } + + var originalRequest = URLRequest(url: url) + + originalRequest.httpMethod = method.rawValue + + buildHeaders().forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + headers.forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) + + return modifiedRequest + } + + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { + let urlSessionId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + let parameters: [String: Any] = self.parameters ?? [:] + + let fileKeys = parameters.filter { $1 is NSURL } + .map { $0.0 } + + let encoding: ParameterEncoding + if fileKeys.count > 0 { + encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) + } else if isBody { + encoding = JSONDataEncoding() + } else { + encoding = URLEncoding() + } + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsuported Http method - \(method)") + } + + let cleanupRequest = { + urlSessionStore[urlSessionId] = nil + self.observation?.invalidate() + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in + + guard let self = self else { return } + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in + + guard let self = self else { return } + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { + observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in + self.progress.totalUnitCount = newProgress.totalUnitCount + self.progress.completedUnitCount = newProgress.completedUnitCount + } + + onProgressReady?(progress) + } + + dataTask.resume() + + } catch { + apiResponseQueue.async { + cleanupRequest() + completion(.failure(ErrorResponse.error(415, nil, error))) + } + } + + } + + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: httpResponse, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, data, error))) + } + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = PetstoreClientAPI.customHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + case is Data.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + guard let data = data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + } + } +} + +private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + + var credential: URLCredential? + + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +public protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +private class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +private class FileUploadEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + for (k, v) in parameters ?? [:] { + switch v { + case let fileURL as URL: + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: fileURL.lastPathComponent, data: fileData, mimeType: mimetype) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, name: String, data: Data, mimeType: String?) -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody ?? Data() + + // https://stackoverflow.com/a/26163136/976628 + let boundary = "Boundary-\(UUID().uuidString)" + urlRequest.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") + + body.append("--\(boundary)\r\n") + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(name)\"\r\n") + + if let mimeType = mimeType { + body.append("Content-Type: \(mimeType)\r\n\r\n") + } + + body.append(data) + + body.append("\r\n") + + body.append("--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +fileprivate extension Data { + /// Append string to NSMutableData + /// + /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to NSData, and then add that data to the NSMutableData, this wraps it in a nice convenient little extension to NSMutableData. This converts using UTF-8. + /// + /// - parameter string: The string to be added to the `NSMutableData`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/petstore/swift5/objcCompatible/README.md b/samples/client/petstore/swift5/objcCompatible/README.md new file mode 100644 index 0000000000..a50bf382e3 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/README.md @@ -0,0 +1,141 @@ +# Swift5 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/objcCompatible/docs/AdditionalPropertiesClass.md new file mode 100644 index 0000000000..e22d28be1d --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Animal.md b/samples/client/petstore/swift5/objcCompatible/docs/Animal.md new file mode 100644 index 0000000000..69c601455c --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/AnimalFarm.md b/samples/client/petstore/swift5/objcCompatible/docs/AnimalFarm.md new file mode 100644 index 0000000000..df6bab21da --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/AnotherFakeAPI.md new file mode 100644 index 0000000000..aead5f1f98 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/AnotherFakeAPI.md @@ -0,0 +1,59 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/ApiResponse.md b/samples/client/petstore/swift5/objcCompatible/docs/ApiResponse.md new file mode 100644 index 0000000000..c6d9768fe9 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/objcCompatible/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 0000000000..c6fceff5e0 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/objcCompatible/docs/ArrayOfNumberOnly.md new file mode 100644 index 0000000000..f09f8fa6f7 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/ArrayTest.md b/samples/client/petstore/swift5/objcCompatible/docs/ArrayTest.md new file mode 100644 index 0000000000..bf416b8330 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Capitalization.md b/samples/client/petstore/swift5/objcCompatible/docs/Capitalization.md new file mode 100644 index 0000000000..95374216c7 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Cat.md b/samples/client/petstore/swift5/objcCompatible/docs/Cat.md new file mode 100644 index 0000000000..fb5949b157 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/CatAllOf.md b/samples/client/petstore/swift5/objcCompatible/docs/CatAllOf.md new file mode 100644 index 0000000000..79789be61c --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Category.md b/samples/client/petstore/swift5/objcCompatible/docs/Category.md new file mode 100644 index 0000000000..f9bf59e4ac --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/ClassModel.md b/samples/client/petstore/swift5/objcCompatible/docs/ClassModel.md new file mode 100644 index 0000000000..e3912fdf0f --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Client.md b/samples/client/petstore/swift5/objcCompatible/docs/Client.md new file mode 100644 index 0000000000..0de1b238c3 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Dog.md b/samples/client/petstore/swift5/objcCompatible/docs/Dog.md new file mode 100644 index 0000000000..4824786da0 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/DogAllOf.md b/samples/client/petstore/swift5/objcCompatible/docs/DogAllOf.md new file mode 100644 index 0000000000..9302ef52e9 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/EnumArrays.md b/samples/client/petstore/swift5/objcCompatible/docs/EnumArrays.md new file mode 100644 index 0000000000..b9a9807d3c --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/EnumClass.md b/samples/client/petstore/swift5/objcCompatible/docs/EnumClass.md new file mode 100644 index 0000000000..67f017becd --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/EnumTest.md b/samples/client/petstore/swift5/objcCompatible/docs/EnumTest.md new file mode 100644 index 0000000000..bc9b036dd7 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md new file mode 100644 index 0000000000..c7e27b881f --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/FakeAPI.md @@ -0,0 +1,662 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(_id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/objcCompatible/docs/FakeClassnameTags123API.md new file mode 100644 index 0000000000..9f24b46edb --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/FakeClassnameTags123API.md @@ -0,0 +1,59 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/File.md b/samples/client/petstore/swift5/objcCompatible/docs/File.md new file mode 100644 index 0000000000..3edfef17b7 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/objcCompatible/docs/FileSchemaTestClass.md new file mode 100644 index 0000000000..afdacc60b2 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/FormatTest.md b/samples/client/petstore/swift5/objcCompatible/docs/FormatTest.md new file mode 100644 index 0000000000..f74d94f6c4 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/objcCompatible/docs/HasOnlyReadOnly.md new file mode 100644 index 0000000000..57b6e3a17e --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/List.md b/samples/client/petstore/swift5/objcCompatible/docs/List.md new file mode 100644 index 0000000000..b77718302e --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/MapTest.md b/samples/client/petstore/swift5/objcCompatible/docs/MapTest.md new file mode 100644 index 0000000000..56213c4113 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 0000000000..fcffb8ecdb --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Model200Response.md b/samples/client/petstore/swift5/objcCompatible/docs/Model200Response.md new file mode 100644 index 0000000000..5865ea690c --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Name.md b/samples/client/petstore/swift5/objcCompatible/docs/Name.md new file mode 100644 index 0000000000..f7b180292c --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/NumberOnly.md b/samples/client/petstore/swift5/objcCompatible/docs/NumberOnly.md new file mode 100644 index 0000000000..72bd361168 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Order.md b/samples/client/petstore/swift5/objcCompatible/docs/Order.md new file mode 100644 index 0000000000..006916ec74 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/OuterComposite.md b/samples/client/petstore/swift5/objcCompatible/docs/OuterComposite.md new file mode 100644 index 0000000000..d6b3583bc3 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/OuterEnum.md b/samples/client/petstore/swift5/objcCompatible/docs/OuterEnum.md new file mode 100644 index 0000000000..06d413b016 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Pet.md b/samples/client/petstore/swift5/objcCompatible/docs/Pet.md new file mode 100644 index 0000000000..26c07cc4ba --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md new file mode 100644 index 0000000000..c03e60bc08 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/PetAPI.md @@ -0,0 +1,469 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(_id: 123, category: Category(_id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(_id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(_id: 123, category: Category(_id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(_id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/objcCompatible/docs/ReadOnlyFirst.md new file mode 100644 index 0000000000..ed537b8759 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Return.md b/samples/client/petstore/swift5/objcCompatible/docs/Return.md new file mode 100644 index 0000000000..66d17c27c8 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/SpecialModelName.md b/samples/client/petstore/swift5/objcCompatible/docs/SpecialModelName.md new file mode 100644 index 0000000000..3ec27a38c2 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md new file mode 100644 index 0000000000..ba59be9d54 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md @@ -0,0 +1,206 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(_id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/StringBooleanMap.md b/samples/client/petstore/swift5/objcCompatible/docs/StringBooleanMap.md new file mode 100644 index 0000000000..7abf11ec68 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/Tag.md b/samples/client/petstore/swift5/objcCompatible/docs/Tag.md new file mode 100644 index 0000000000..24a050117a --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/objcCompatible/docs/TypeHolderDefault.md new file mode 100644 index 0000000000..5161394bdc --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/TypeHolderExample.md b/samples/client/petstore/swift5/objcCompatible/docs/TypeHolderExample.md new file mode 100644 index 0000000000..46d0471cd7 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/User.md b/samples/client/petstore/swift5/objcCompatible/docs/User.md new file mode 100644 index 0000000000..a8791643e7 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/objcCompatible/docs/UserAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/UserAPI.md new file mode 100644 index 0000000000..18e233420a --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/docs/UserAPI.md @@ -0,0 +1,406 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(_id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(_id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(_id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(_id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/objcCompatible/git_push.sh b/samples/client/petstore/swift5/objcCompatible/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/objcCompatible/pom.xml b/samples/client/petstore/swift5/objcCompatible/pom.xml new file mode 100644 index 0000000000..c1b201eb3b --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/objcCompatible/project.yml b/samples/client/petstore/swift5/objcCompatible/project.yml new file mode 100644 index 0000000000..892005fdd5 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/project.yml @@ -0,0 +1,14 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + diff --git a/samples/client/petstore/swift5/objcCompatible/run_spmbuild.sh b/samples/client/petstore/swift5/objcCompatible/run_spmbuild.sh new file mode 100755 index 0000000000..1a9f585ad0 --- /dev/null +++ b/samples/client/petstore/swift5/objcCompatible/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/promisekitLibrary/.gitignore b/samples/client/petstore/swift5/promisekitLibrary/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator-ignore b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION new file mode 100644 index 0000000000..58592f031f --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/promisekitLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/Cartfile b/samples/client/petstore/swift5/promisekitLibrary/Cartfile new file mode 100644 index 0000000000..01fd3663de --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/Cartfile @@ -0,0 +1,2 @@ + +github "mxcl/PromiseKit" ~> 6.12.0 diff --git a/samples/client/petstore/swift5/promisekitLibrary/Info.plist b/samples/client/petstore/swift5/promisekitLibrary/Info.plist new file mode 100644 index 0000000000..323e5ecfc4 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/Package.resolved b/samples/client/petstore/swift5/promisekitLibrary/Package.resolved new file mode 100644 index 0000000000..b74611fc3d --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "PromiseKit", + "repositoryURL": "https://github.com/mxcl/PromiseKit.git", + "state": { + "branch": null, + "revision": "80963d4317bcdc03891e0fbaa744f20511d1bc08", + "version": "6.12.0" + } + } + ] + }, + "version": 1 +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/Package.swift b/samples/client/petstore/swift5/promisekitLibrary/Package.swift new file mode 100644 index 0000000000..4445c97949 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/Package.swift @@ -0,0 +1,32 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.12.0") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["PromiseKit" ], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec new file mode 100644 index 0000000000..ef330727bf --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' + s.dependency 'PromiseKit/CorePromise', '~> 6.12.0' +end diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..31525ebfdc --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,584 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 731043E4ECC8708558821B31 /* PromiseKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A586582C92491DF9C12D27E2 /* PromiseKit.framework */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11F49B24B6239C324722572C /* URLSessionImplementations.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A586582C92491DF9C12D27E2 /* PromiseKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = PromiseKit.framework; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D1990C2A394CCF025EF98A2F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 731043E4ECC8708558821B31 /* PromiseKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7861EE241895128F64DD7873 /* Carthage */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */, + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */, + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 7861EE241895128F64DD7873 /* Carthage */ = { + isa = PBXGroup; + children = ( + A012205B41CB71A62B86EECD /* iOS */, + ); + name = Carthage; + path = Carthage/Build; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + A012205B41CB71A62B86EECD /* iOS */ = { + isa = PBXGroup; + children = ( + A586582C92491DF9C12D27E2 /* PromiseKit.framework */, + ); + path = iOS; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 0000000000..26d510552b --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 0000000000..2000700968 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? [Any?] { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? [Any?] { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 0000000000..e4cbda9c72 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,64 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetstoreClientAPI { + public static var basePath = "http://petstore.swagger.io:80/v2" + public static var credential: URLCredential? + public static var customHeaders: [String: String] = [:] + public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + public let parameters: [String: Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client. + public var onProgressReady: ((Progress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(PetstoreClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = PetstoreClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 0000000000..c3a97ff074 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,51 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import PromiseKit + +open class AnotherFakeAPI { + /** + To test special tags + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func call123testSpecialTags( body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 0000000000..1a37c8113c --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,644 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import PromiseKit + +open class FakeAPI { + /** + + - parameter body: (body) Input boolean as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func fakeOuterBooleanSerialize( body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input composite as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func fakeOuterCompositeSerialize( body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input number as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func fakeOuterNumberSerialize( body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input string as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func fakeOuterStringSerialize( body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func testBodyWithFileSchema( body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter query: (query) + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func testBodyWithQueryParams( query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "query": query.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + To test \"client\" model + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func testClientModel( body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "integer": integer?.encodeToJSON(), + "int32": int32?.encodeToJSON(), + "int64": int64?.encodeToJSON(), + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), + "date": date?.encodeToJSON(), + "dateTime": dateTime?.encodeToJSON(), + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func testEnumParameters( enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - returns: RequestBuilder + */ + open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + Fake endpoint to test group parameters (optional) + + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), + "int64_group": int64Group?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + test inline additionalProperties + + - parameter param: (body) request body + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func testInlineAdditionalProperties( param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + test json serialization of form data + + - parameter param: (form) field1 + - parameter param2: (form) field2 + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func testJsonFormData( param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 0000000000..3a05f8eaf6 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,54 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import PromiseKit + +open class FakeClassnameTags123API { + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func testClassname( body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 0000000000..4514fc8f10 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,450 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import PromiseKit + +open class PetAPI { + /** + Add a new pet to the store + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func addPet( body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Deletes a pet + + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func deletePet( petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + let nillableHeaders: [String: Any?] = [ + "api_key": apiKey?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + + - parameter status: (query) Status values that need to be considered for filter + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise<[Pet]> + */ + open class func findPetsByStatus( status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<[Pet]> { + let deferred = Promise<[Pet]>.pending() + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "status": status.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Finds Pets by tags + + - parameter tags: (query) Tags to filter by + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise<[Pet]> + */ + open class func findPetsByTags( tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<[Pet]> { + let deferred = Promise<[Pet]>.pending() + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "tags": tags.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find pet by ID + + - parameter petId: (path) ID of pet to return + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func getPetById( petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Update an existing pet + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func updatePet( body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Updates a pet in the store with form data + + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image (required) + + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 0000000000..20fc8a1468 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,174 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import PromiseKit + +open class StoreAPI { + /** + Delete purchase order by ID + + - parameter orderId: (path) ID of the order that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func deleteOrder( orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Returns pet inventories by status + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise<[String:Int]> + */ + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<[String: Int]> { + let deferred = Promise<[String: Int]>.pending() + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find purchase order by ID + + - parameter orderId: (path) ID of pet that needs to be fetched + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func getOrderById( orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Place an order for a pet + + - parameter body: (body) order placed for purchasing the pet + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func placeOrder( body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { + let path = "/store/order" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 0000000000..89c48c3b28 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,335 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import PromiseKit + +open class UserAPI { + /** + Create user + + - parameter body: (body) Created user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func createUser( body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { + let path = "/user" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func createUsersWithArrayInput( body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func createUsersWithListInput( body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Delete user + + - parameter username: (path) The name that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func deleteUser( username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Get user by user name + + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func getUserByName( username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs user into the system + + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func loginUser( username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + deferred.resolver.fulfill(response.body!) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "username": username.encodeToJSON(), + "password": password.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs out current logged in user session + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + open class func logoutUserWithRequestBuilder() -> RequestBuilder { + let path = "/user/logout" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Updated user + + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Promise + */ + open class func updateUser( username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + let deferred = Promise.pending() + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + deferred.resolver.fulfill(()) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 0000000000..32e194f6ee --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + open class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + open class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 0000000000..627d9adb75 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 0000000000..4bfdc72277 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,189 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import PromiseKit + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} + +extension RequestBuilder { + public func execute() -> Promise> { + let deferred = Promise>.pending() + self.execute { result in + switch result { + case let .success(response): + deferred.resolver.fulfill(response) + case let .failure(error): + deferred.resolver.reject(error) + } + } + return deferred.promise + } +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 0000000000..b79e9f5e64 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 0000000000..02f78ffb47 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 0000000000..b9757b6cbc --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,51 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +public enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 0000000000..1af0315359 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,25 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 0000000000..5ed9f31e2a --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,20 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 0000000000..e09b0e9efd --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 0000000000..ec270da890 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,22 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 0000000000..6c252ed475 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 0000000000..e84eb5d650 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 0000000000..d2140933d1 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,28 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 0000000000..d1b3b27616 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,38 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 0000000000..7ab887f311 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,22 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 0000000000..a51ad0dffa --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,18 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 0000000000..eb8f7e5e19 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,20 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String = "default-name" + + public init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 0000000000..e2a7d4427a --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ +public struct ClassModel: Codable { + + public var _class: String? + + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 0000000000..00245ca372 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,18 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 0000000000..492c122800 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,22 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 0000000000..7786f8acc5 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,18 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 0000000000..9844e7c40e --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,33 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable, CaseIterable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable, CaseIterable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 0000000000..d4029d73f8 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 0000000000..789f583e1d --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,52 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable, CaseIterable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 0000000000..abf3ccffc4 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 0000000000..532f145793 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,20 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 0000000000..20bd6d103b --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,42 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 0000000000..906ddb06fb --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,20 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 0000000000..fe13d302cc --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,22 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 0000000000..4b6037f378 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,35 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 0000000000..c3deb2f289 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,22 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 0000000000..b61db7d6e7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 0000000000..8ab4db44b7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 0000000000..4d1dafcc2c --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,22 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 0000000000..40c30cc860 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,34 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 0000000000..18c3a024f1 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,28 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 0000000000..c3b778cbbe --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 0000000000..b9ce0e9332 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,34 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + + public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 0000000000..0acd21fd10 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,20 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 0000000000..c223f993a6 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ +public struct Return: Codable { + + public var _return: Int? + + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 0000000000..6e8650f76d --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,22 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 0000000000..3f1237fee4 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 0000000000..4dd8a9a9f5 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,20 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 0000000000..a9e088808e --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,34 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 0000000000..dff4083ae4 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,34 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 0000000000..79f271ed73 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,33 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 0000000000..e06208074c --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +public class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override public func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift new file mode 100644 index 0000000000..9e552cce09 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -0,0 +1,544 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +open class URLSessionRequestBuilder: RequestBuilder { + + let progress = Progress() + + private var observation: NSKeyValueObservation? + + deinit { + observation?.invalidate() + } + + fileprivate let sessionDelegate = SessionDelegate() + + /** + May be assigned if you want to control the authentication challenges. + */ + public var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - intercept and handle errors like authorization + - retry the request. + */ + public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the URLSession + configuration. + */ + open func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + + guard let url = URL(string: URLString) else { + throw DownloadException.requestMissingURL + } + + var originalRequest = URLRequest(url: url) + + originalRequest.httpMethod = method.rawValue + + buildHeaders().forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + headers.forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) + + return modifiedRequest + } + + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { + let urlSessionId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + let parameters: [String: Any] = self.parameters ?? [:] + + let fileKeys = parameters.filter { $1 is NSURL } + .map { $0.0 } + + let encoding: ParameterEncoding + if fileKeys.count > 0 { + encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) + } else if isBody { + encoding = JSONDataEncoding() + } else { + encoding = URLEncoding() + } + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsuported Http method - \(method)") + } + + let cleanupRequest = { + urlSessionStore[urlSessionId] = nil + self.observation?.invalidate() + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in + + guard let self = self else { return } + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in + + guard let self = self else { return } + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { + observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in + self.progress.totalUnitCount = newProgress.totalUnitCount + self.progress.completedUnitCount = newProgress.completedUnitCount + } + + onProgressReady?(progress) + } + + dataTask.resume() + + } catch { + apiResponseQueue.async { + cleanupRequest() + completion(.failure(ErrorResponse.error(415, nil, error))) + } + } + + } + + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: httpResponse, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, data, error))) + } + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = PetstoreClientAPI.customHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + case is Data.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + guard let data = data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + } + } +} + +private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + + var credential: URLCredential? + + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +public protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +private class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +private class FileUploadEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + for (k, v) in parameters ?? [:] { + switch v { + case let fileURL as URL: + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: fileURL.lastPathComponent, data: fileData, mimeType: mimetype) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, name: String, data: Data, mimeType: String?) -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody ?? Data() + + // https://stackoverflow.com/a/26163136/976628 + let boundary = "Boundary-\(UUID().uuidString)" + urlRequest.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") + + body.append("--\(boundary)\r\n") + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(name)\"\r\n") + + if let mimeType = mimeType { + body.append("Content-Type: \(mimeType)\r\n\r\n") + } + + body.append(data) + + body.append("\r\n") + + body.append("--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +fileprivate extension Data { + /// Append string to NSMutableData + /// + /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to NSData, and then add that data to the NSMutableData, this wraps it in a nice convenient little extension to NSMutableData. This converts using UTF-8. + /// + /// - parameter string: The string to be added to the `NSMutableData`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/petstore/swift5/promisekitLibrary/README.md b/samples/client/petstore/swift5/promisekitLibrary/README.md new file mode 100644 index 0000000000..a50bf382e3 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/README.md @@ -0,0 +1,141 @@ +# Swift5 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/.gitignore b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/.gitignore new file mode 100644 index 0000000000..0269c2f56d --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/.gitignore @@ -0,0 +1,72 @@ +### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile new file mode 100644 index 0000000000..77432f9eee --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile @@ -0,0 +1,13 @@ +platform :ios, '9.0' + +source 'https://cdn.cocoapods.org/' + +use_frameworks! + +target 'SwaggerClient' do + pod "PetstoreClient", :path => "../" + + target 'SwaggerClientTests' do + inherit! :search_paths + end +end diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile.lock new file mode 100644 index 0000000000..fa73b83598 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/Podfile.lock @@ -0,0 +1,23 @@ +PODS: + - PetstoreClient (1.0.0): + - PromiseKit/CorePromise (~> 6.12.0) + - PromiseKit/CorePromise (6.12.0) + +DEPENDENCIES: + - PetstoreClient (from `../`) + +SPEC REPOS: + trunk: + - PromiseKit + +EXTERNAL SOURCES: + PetstoreClient: + :path: "../" + +SPEC CHECKSUMS: + PetstoreClient: 97929409c1dd42edb2cf067b2cc182434d87f1aa + PromiseKit: c06835ba442ce5454ce3cdde470232804a6e4ff8 + +PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c + +COCOAPODS: 1.8.4 diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..1e0ed2f7ca --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -0,0 +1,544 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 54DA06C1D70D78EC0EC72B61 /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */; }; + 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */; }; + 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB961C692C6300B96B06 /* ViewController.swift */; }; + 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB981C692C6300B96B06 /* Main.storyboard */; }; + 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */; }; + 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */; }; + 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */; }; + 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */; }; + 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */; }; + 751C65B82F596107A3DC8ED9 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6D4EFB891C692C6300B96B06 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6D4EFB901C692C6300B96B06; + remoteInfo = SwaggerClient; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; + 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 6D4EFB961C692C6300B96B06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 6D4EFB991C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 6D4EFB9E1C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 6D4EFBA01C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D4EFBAB1C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = ""; }; + 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = ""; }; + 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = ""; }; + 8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; + B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; + C07EC0A94AA0F86D60668B32 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6D4EFB8E1C692C6300B96B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 751C65B82F596107A3DC8ED9 /* Pods_SwaggerClient.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA21C692C6300B96B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 54DA06C1D70D78EC0EC72B61 /* Pods_SwaggerClientTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0CAA98BEFA303B94D3664C7D /* Pods */ = { + isa = PBXGroup; + children = ( + A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */, + FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */, + 289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */, + B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 3FABC56EC0BA84CBF4F99564 /* Frameworks */ = { + isa = PBXGroup; + children = ( + C07EC0A94AA0F86D60668B32 /* Pods.framework */, + 8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */, + F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6D4EFB881C692C6300B96B06 = { + isa = PBXGroup; + children = ( + 6D4EFB931C692C6300B96B06 /* SwaggerClient */, + 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */, + 6D4EFB921C692C6300B96B06 /* Products */, + 3FABC56EC0BA84CBF4F99564 /* Frameworks */, + 0CAA98BEFA303B94D3664C7D /* Pods */, + ); + sourceTree = ""; + }; + 6D4EFB921C692C6300B96B06 /* Products */ = { + isa = PBXGroup; + children = ( + 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */, + 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 6D4EFB931C692C6300B96B06 /* SwaggerClient */ = { + isa = PBXGroup; + children = ( + 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */, + 6D4EFB961C692C6300B96B06 /* ViewController.swift */, + 6D4EFB981C692C6300B96B06 /* Main.storyboard */, + 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */, + 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */, + 6D4EFBA01C692C6300B96B06 /* Info.plist */, + ); + path = SwaggerClient; + sourceTree = ""; + }; + 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */ = { + isa = PBXGroup; + children = ( + 6D4EFBAB1C692C6300B96B06 /* Info.plist */, + 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */, + 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */, + 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */, + ); + path = SwaggerClientTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 6D4EFB901C692C6300B96B06 /* SwaggerClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */; + buildPhases = ( + 1F03F780DC2D9727E5E64BA9 /* [CP] Check Pods Manifest.lock */, + 6D4EFB8D1C692C6300B96B06 /* Sources */, + 6D4EFB8E1C692C6300B96B06 /* Frameworks */, + 6D4EFB8F1C692C6300B96B06 /* Resources */, + 4485A75250058E2D5BBDF63F /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwaggerClient; + productName = SwaggerClient; + productReference = 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */; + productType = "com.apple.product-type.application"; + }; + 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */; + buildPhases = ( + 79FE27B09B2DD354C831BD49 /* [CP] Check Pods Manifest.lock */, + 6D4EFBA11C692C6300B96B06 /* Sources */, + 6D4EFBA21C692C6300B96B06 /* Frameworks */, + 6D4EFBA31C692C6300B96B06 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */, + ); + name = SwaggerClientTests; + productName = SwaggerClientTests; + productReference = 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6D4EFB891C692C6300B96B06 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = Swagger; + TargetAttributes = { + 6D4EFB901C692C6300B96B06 = { + CreatedOnToolsVersion = 7.2.1; + LastSwiftMigration = 1130; + }; + 6D4EFBA41C692C6300B96B06 = { + CreatedOnToolsVersion = 7.2.1; + LastSwiftMigration = 1130; + TestTargetID = 6D4EFB901C692C6300B96B06; + }; + }; + }; + buildConfigurationList = 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 6D4EFB881C692C6300B96B06; + productRefGroup = 6D4EFB921C692C6300B96B06 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6D4EFB901C692C6300B96B06 /* SwaggerClient */, + 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 6D4EFB8F1C692C6300B96B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */, + 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */, + 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA31C692C6300B96B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 1F03F780DC2D9727E5E64BA9 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 4485A75250058E2D5BBDF63F /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework", + "${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PromiseKit.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 79FE27B09B2DD354C831BD49 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6D4EFB8D1C692C6300B96B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */, + 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA11C692C6300B96B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */, + 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */, + 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6D4EFB901C692C6300B96B06 /* SwaggerClient */; + targetProxy = 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 6D4EFB981C692C6300B96B06 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6D4EFB991C692C6300B96B06 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6D4EFB9E1C692C6300B96B06 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 6D4EFBAC1C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 6D4EFBAD1C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 6D4EFBAF1C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 6D4EFBB01C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 6D4EFBB21C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Debug; + }; + 6D4EFBB31C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBAC1C692C6300B96B06 /* Debug */, + 6D4EFBAD1C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBAF1C692C6300B96B06 /* Debug */, + 6D4EFBB01C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBB21C692C6300B96B06 /* Debug */, + 6D4EFBB31C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6D4EFB891C692C6300B96B06 /* Project object */; +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme new file mode 100644 index 0000000000..617a081d97 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..9b3fa18954 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift new file mode 100644 index 0000000000..b1896774c7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift @@ -0,0 +1,43 @@ +// +// AppDelegate.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..1d060ed288 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..2e721e1833 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..3a2a49bad8 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Info.plist new file mode 100644 index 0000000000..bb71d00fa8 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/Info.plist @@ -0,0 +1,59 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift new file mode 100644 index 0000000000..8dad16b10f --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift @@ -0,0 +1,23 @@ +// +// ViewController.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist new file mode 100644 index 0000000000..802f84f540 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift new file mode 100644 index 0000000000..46fa30ba0c --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -0,0 +1,63 @@ +// +// PetAPITests.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import PromiseKit +import XCTest +@testable import SwaggerClient + +class PetAPITests: XCTestCase { + + let testTimeout = 10.0 + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func test1CreatePet() { + let expectation = self.expectation(description: "testCreatePet") + let category = PetstoreClient.Category(id: 1234, name: "eyeColor") + let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] + let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + + PetAPI.addPet(body: newPet).done { + expectation.fulfill() + }.catch { _ in + XCTFail("error creating pet") + } + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetPet() { + let expectation = self.expectation(description: "testGetPet") + PetAPI.getPetById(petId: 1000).done { pet in + XCTAssert(pet.id == 1000, "invalid id") + XCTAssert(pet.name == "Fluffy", "invalid name") + expectation.fulfill() + }.catch { _ in + XCTFail("error creating pet") + } + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeletePet() { + let expectation = self.expectation(description: "testDeletePet") + PetAPI.deletePet(petId: 1000).done { + expectation.fulfill() + }.catch { (_) in + XCTFail("error deleting pet") + } + self.waitForExpectations(timeout: testTimeout, handler: nil) + } +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift new file mode 100644 index 0000000000..13a57aca3e --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift @@ -0,0 +1,80 @@ +// +// StoreAPITests.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import PromiseKit +import XCTest +@testable import SwaggerClient + +class StoreAPITests: XCTestCase { + + let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" + + let testTimeout = 10.0 + + func test1PlaceOrder() { + // use explicit naming to reference the enum so that we test we don't regress on enum naming + let shipDate = Date() + let order = Order(id: 1000, petId: 1000, quantity: 10, shipDate: shipDate, status: .placed, complete: true) + let expectation = self.expectation(description: "testPlaceOrder") + StoreAPI.placeOrder(body: order).done { order in + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat), + "Date should be idempotent") + + expectation.fulfill() + }.catch { _ in + XCTFail("error placing order") + } + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetOrder() { + let expectation = self.expectation(description: "testGetOrder") + StoreAPI.getOrderById(orderId: 1000).done { order in + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + expectation.fulfill() + }.catch { _ in + XCTFail("error placing order") + } + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeleteOrder() { + let expectation = self.expectation(description: "testDeleteOrder") + StoreAPI.deleteOrder(orderId: "1000").done { + expectation.fulfill() + }.catch { (_) in + XCTFail("error deleting order") + } + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} + +private extension Date { + + /** + Returns true if the dates are equal given the format string. + + - parameter date: The date to compare to. + - parameter format: The format string to use to compare. + + - returns: true if the dates are equal, given the format string. + */ + func isEqual(_ date: Date, format: String) -> Bool { + let fmt = DateFormatter() + fmt.dateFormat = format + return fmt.string(from: self).isEqual(fmt.string(from: date)) + } + +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift new file mode 100644 index 0000000000..d369895def --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift @@ -0,0 +1,37 @@ +// +// UserAPITests.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import PromiseKit +import XCTest +@testable import SwaggerClient + +class UserAPITests: XCTestCase { + + let testTimeout = 10.0 + + func testLogin() { + let expectation = self.expectation(description: "testLogin") + UserAPI.loginUser(username: "swiftTester", password: "swift").done { _ in + expectation.fulfill() + }.catch { _ in + XCTFail("login error") + } + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testLogout() { + let expectation = self.expectation(description: "testLogout") + UserAPI.logoutUser().done { + expectation.fulfill() + }.catch { _ in + XCTFail("") + } + self.waitForExpectations(timeout: testTimeout, handler: nil) + } +} diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/pom.xml b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/pom.xml new file mode 100644 index 0000000000..2aa6198e7a --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PromiseKitPetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 PromiseKit Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_xcodebuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/run_xcodebuild.sh new file mode 100755 index 0000000000..79520c7fc3 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/SwaggerClientTests/run_xcodebuild.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +pod install + +xcodebuild -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" test -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/promisekitLibrary/docs/AdditionalPropertiesClass.md new file mode 100644 index 0000000000..e22d28be1d --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Animal.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Animal.md new file mode 100644 index 0000000000..69c601455c --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/AnimalFarm.md b/samples/client/petstore/swift5/promisekitLibrary/docs/AnimalFarm.md new file mode 100644 index 0000000000..df6bab21da --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/AnotherFakeAPI.md new file mode 100644 index 0000000000..7ac52a2b12 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/AnotherFakeAPI.md @@ -0,0 +1,56 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags( body: Client) -> Promise +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/ApiResponse.md b/samples/client/petstore/swift5/promisekitLibrary/docs/ApiResponse.md new file mode 100644 index 0000000000..c6d9768fe9 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/promisekitLibrary/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 0000000000..c6fceff5e0 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/promisekitLibrary/docs/ArrayOfNumberOnly.md new file mode 100644 index 0000000000..f09f8fa6f7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/ArrayTest.md b/samples/client/petstore/swift5/promisekitLibrary/docs/ArrayTest.md new file mode 100644 index 0000000000..bf416b8330 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Capitalization.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Capitalization.md new file mode 100644 index 0000000000..95374216c7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Cat.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Cat.md new file mode 100644 index 0000000000..fb5949b157 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/promisekitLibrary/docs/CatAllOf.md new file mode 100644 index 0000000000..79789be61c --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Category.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Category.md new file mode 100644 index 0000000000..5ca5408c0f --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/ClassModel.md b/samples/client/petstore/swift5/promisekitLibrary/docs/ClassModel.md new file mode 100644 index 0000000000..e3912fdf0f --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Client.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Client.md new file mode 100644 index 0000000000..0de1b238c3 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Dog.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Dog.md new file mode 100644 index 0000000000..4824786da0 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/promisekitLibrary/docs/DogAllOf.md new file mode 100644 index 0000000000..9302ef52e9 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/EnumArrays.md b/samples/client/petstore/swift5/promisekitLibrary/docs/EnumArrays.md new file mode 100644 index 0000000000..b9a9807d3c --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/EnumClass.md b/samples/client/petstore/swift5/promisekitLibrary/docs/EnumClass.md new file mode 100644 index 0000000000..67f017becd --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/EnumTest.md b/samples/client/petstore/swift5/promisekitLibrary/docs/EnumTest.md new file mode 100644 index 0000000000..bc9b036dd7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md new file mode 100644 index 0000000000..bf8e514f03 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeAPI.md @@ -0,0 +1,626 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize( body: Bool? = nil) -> Promise +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize( body: OuterComposite? = nil) -> Promise +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize( body: Double? = nil) -> Promise +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize( body: String? = nil) -> Promise +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema( body: FileSchemaTestClass) -> Promise +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams( query: String, body: User) -> Promise +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel( body: Client) -> Promise +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters( number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Promise +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters( enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Promise +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Promise +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties( param: [String:String]) -> Promise +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData( param: String, param2: String) -> Promise +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeClassnameTags123API.md new file mode 100644 index 0000000000..1b1b9c1410 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FakeClassnameTags123API.md @@ -0,0 +1,56 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname( body: Client) -> Promise +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/File.md b/samples/client/petstore/swift5/promisekitLibrary/docs/File.md new file mode 100644 index 0000000000..3edfef17b7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FileSchemaTestClass.md new file mode 100644 index 0000000000..afdacc60b2 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/promisekitLibrary/docs/FormatTest.md new file mode 100644 index 0000000000..f74d94f6c4 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/promisekitLibrary/docs/HasOnlyReadOnly.md new file mode 100644 index 0000000000..57b6e3a17e --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/List.md b/samples/client/petstore/swift5/promisekitLibrary/docs/List.md new file mode 100644 index 0000000000..b77718302e --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/MapTest.md b/samples/client/petstore/swift5/promisekitLibrary/docs/MapTest.md new file mode 100644 index 0000000000..56213c4113 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 0000000000..fcffb8ecdb --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Model200Response.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Model200Response.md new file mode 100644 index 0000000000..5865ea690c --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Name.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Name.md new file mode 100644 index 0000000000..f7b180292c --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/NumberOnly.md b/samples/client/petstore/swift5/promisekitLibrary/docs/NumberOnly.md new file mode 100644 index 0000000000..72bd361168 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Order.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Order.md new file mode 100644 index 0000000000..15487f0117 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/OuterComposite.md b/samples/client/petstore/swift5/promisekitLibrary/docs/OuterComposite.md new file mode 100644 index 0000000000..d6b3583bc3 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/OuterEnum.md b/samples/client/petstore/swift5/promisekitLibrary/docs/OuterEnum.md new file mode 100644 index 0000000000..06d413b016 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Pet.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Pet.md new file mode 100644 index 0000000000..5c05f98fad --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md new file mode 100644 index 0000000000..e767ea772f --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/PetAPI.md @@ -0,0 +1,442 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet( body: Pet) -> Promise +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet( petId: Int64, apiKey: String? = nil) -> Promise +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus( status: [String]) -> Promise<[Pet]> +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags( tags: [String]) -> Promise<[Pet]> +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById( petId: Int64) -> Promise +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet( body: Pet) -> Promise +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil) -> Promise +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Promise +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Promise +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/promisekitLibrary/docs/ReadOnlyFirst.md new file mode 100644 index 0000000000..ed537b8759 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Return.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Return.md new file mode 100644 index 0000000000..66d17c27c8 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/SpecialModelName.md b/samples/client/petstore/swift5/promisekitLibrary/docs/SpecialModelName.md new file mode 100644 index 0000000000..3ec27a38c2 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md new file mode 100644 index 0000000000..085d479bce --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md @@ -0,0 +1,194 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder( orderId: String) -> Promise +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory() -> Promise<[String:Int]> +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory().then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById( orderId: Int64) -> Promise +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder( body: Order) -> Promise +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/StringBooleanMap.md b/samples/client/petstore/swift5/promisekitLibrary/docs/StringBooleanMap.md new file mode 100644 index 0000000000..7abf11ec68 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/Tag.md b/samples/client/petstore/swift5/promisekitLibrary/docs/Tag.md new file mode 100644 index 0000000000..ff4ac8aa45 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/promisekitLibrary/docs/TypeHolderDefault.md new file mode 100644 index 0000000000..5161394bdc --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/TypeHolderExample.md b/samples/client/petstore/swift5/promisekitLibrary/docs/TypeHolderExample.md new file mode 100644 index 0000000000..46d0471cd7 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/User.md b/samples/client/petstore/swift5/promisekitLibrary/docs/User.md new file mode 100644 index 0000000000..5a439de0ff --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/UserAPI.md new file mode 100644 index 0000000000..e18cc451e9 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/UserAPI.md @@ -0,0 +1,382 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser( body: User) -> Promise +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput( body: [User]) -> Promise +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput( body: [User]) -> Promise +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser( username: String) -> Promise +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName( username: String) -> Promise +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser( username: String, password: String) -> Promise +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser() -> Promise +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser().then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser( username: String, body: User) -> Promise +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body).then { + // when the promise is fulfilled + }.always { + // regardless of whether the promise is fulfilled, or rejected + }.catch { errorType in + // when the promise is rejected +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/promisekitLibrary/git_push.sh b/samples/client/petstore/swift5/promisekitLibrary/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/promisekitLibrary/pom.xml b/samples/client/petstore/swift5/promisekitLibrary/pom.xml new file mode 100644 index 0000000000..c1b201eb3b --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/promisekitLibrary/project.yml b/samples/client/petstore/swift5/promisekitLibrary/project.yml new file mode 100644 index 0000000000..3f6d4d9253 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/project.yml @@ -0,0 +1,15 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + dependencies: + - carthage: PromiseKit diff --git a/samples/client/petstore/swift5/promisekitLibrary/run_spmbuild.sh b/samples/client/petstore/swift5/promisekitLibrary/run_spmbuild.sh new file mode 100755 index 0000000000..1a9f585ad0 --- /dev/null +++ b/samples/client/petstore/swift5/promisekitLibrary/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/resultLibrary/.gitignore b/samples/client/petstore/swift5/resultLibrary/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator-ignore b/samples/client/petstore/swift5/resultLibrary/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION new file mode 100644 index 0000000000..58592f031f --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/resultLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/resultLibrary/Cartfile b/samples/client/petstore/swift5/resultLibrary/Cartfile new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/Cartfile @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/swift5/resultLibrary/Info.plist b/samples/client/petstore/swift5/resultLibrary/Info.plist new file mode 100644 index 0000000000..323e5ecfc4 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/resultLibrary/Package.swift b/samples/client/petstore/swift5/resultLibrary/Package.swift new file mode 100644 index 0000000000..96dfff54ed --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: [], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.podspec new file mode 100644 index 0000000000..b61285f6b2 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' +end diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6f8918eb33 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,536 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11F49B24B6239C324722572C /* URLSessionImplementations.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */, + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */, + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 0000000000..26d510552b --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 0000000000..2000700968 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? [Any?] { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? [Any?] { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 0000000000..e4cbda9c72 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,64 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetstoreClientAPI { + public static var basePath = "http://petstore.swagger.io:80/v2" + public static var credential: URLCredential? + public static var customHeaders: [String: String] = [:] + public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + public let parameters: [String: Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client. + public var onProgressReady: ((Progress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(PetstoreClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = PetstoreClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 0000000000..869f1ccd25 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,48 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class AnotherFakeAPI { + /** + To test special tags + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 0000000000..02d14692f9 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,619 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class FakeAPI { + /** + + - parameter body: (body) Input boolean as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input composite as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input number as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input string as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter query: (query) + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "query": query.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + To test \"client\" model + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "integer": integer?.encodeToJSON(), + "int32": int32?.encodeToJSON(), + "int64": int64?.encodeToJSON(), + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), + "date": date?.encodeToJSON(), + "dateTime": dateTime?.encodeToJSON(), + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - returns: RequestBuilder + */ + open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + Fake endpoint to test group parameters (optional) + + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), + "int64_group": int64Group?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + test inline additionalProperties + + - parameter param: (body) request body + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + test json serialization of form data + + - parameter param: (form) field1 + - parameter param2: (form) field2 + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 0000000000..5f21b82aa3 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,51 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class FakeClassnameTags123API { + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 0000000000..a9c5c89eb1 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,431 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetAPI { + /** + Add a new pet to the store + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Deletes a pet + + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + let nillableHeaders: [String: Any?] = [ + "api_key": apiKey?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + + - parameter status: (query) Status values that need to be considered for filter + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result<[Pet], Error>) -> Void)) { + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "status": status.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Finds Pets by tags + + - parameter tags: (query) Tags to filter by + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result<[Pet], Error>) -> Void)) { + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "tags": tags.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find pet by ID + + - parameter petId: (path) ID of pet to return + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Update an existing pet + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Updates a pet in the store with form data + + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image (required) + + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 0000000000..f67d192fa9 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,165 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class StoreAPI { + /** + Delete purchase order by ID + + - parameter orderId: (path) ID of the order that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Returns pet inventories by status + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result<[String: Int], Error>) -> Void)) { + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find purchase order by ID + + - parameter orderId: (path) ID of pet that needs to be fetched + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Place an order for a pet + + - parameter body: (body) order placed for purchasing the pet + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { + let path = "/store/order" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 0000000000..930d55d942 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,318 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class UserAPI { + /** + Create user + + - parameter body: (body) Created user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { + let path = "/user" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Delete user + + - parameter username: (path) The name that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Get user by user name + + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs user into the system + + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(.success(response.body!)) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "username": username.encodeToJSON(), + "password": password.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs out current logged in user session + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + open class func logoutUserWithRequestBuilder() -> RequestBuilder { + let path = "/user/logout" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Updated user + + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the result + */ + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Result) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion(.success(())) + case let .failure(error): + completion(.failure(error)) + } + } + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 0000000000..32e194f6ee --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + open class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + open class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 0000000000..627d9adb75 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 0000000000..74fcfcf2ad --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 0000000000..b79e9f5e64 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 0000000000..02f78ffb47 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 0000000000..b9757b6cbc --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,51 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +public enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 0000000000..1af0315359 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,25 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 0000000000..5ed9f31e2a --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,20 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 0000000000..e09b0e9efd --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 0000000000..ec270da890 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,22 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 0000000000..6c252ed475 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 0000000000..e84eb5d650 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 0000000000..d2140933d1 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,28 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 0000000000..d1b3b27616 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,38 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 0000000000..7ab887f311 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,22 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 0000000000..a51ad0dffa --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,18 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 0000000000..eb8f7e5e19 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,20 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String = "default-name" + + public init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 0000000000..e2a7d4427a --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ +public struct ClassModel: Codable { + + public var _class: String? + + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 0000000000..00245ca372 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,18 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 0000000000..492c122800 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,22 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 0000000000..7786f8acc5 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,18 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 0000000000..9844e7c40e --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,33 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable, CaseIterable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable, CaseIterable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 0000000000..d4029d73f8 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 0000000000..789f583e1d --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,52 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable, CaseIterable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 0000000000..abf3ccffc4 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 0000000000..532f145793 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,20 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 0000000000..20bd6d103b --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,42 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 0000000000..906ddb06fb --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,20 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 0000000000..fe13d302cc --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,22 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 0000000000..4b6037f378 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,35 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 0000000000..c3deb2f289 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,22 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 0000000000..b61db7d6e7 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 0000000000..8ab4db44b7 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 0000000000..4d1dafcc2c --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,22 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 0000000000..40c30cc860 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,34 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 0000000000..18c3a024f1 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,28 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 0000000000..c3b778cbbe --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 0000000000..b9ce0e9332 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,34 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + + public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 0000000000..0acd21fd10 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,20 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 0000000000..c223f993a6 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ +public struct Return: Codable { + + public var _return: Int? + + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 0000000000..6e8650f76d --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,22 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 0000000000..3f1237fee4 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 0000000000..4dd8a9a9f5 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,20 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 0000000000..a9e088808e --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,34 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 0000000000..dff4083ae4 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,34 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 0000000000..79f271ed73 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,33 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 0000000000..e06208074c --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +public class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override public func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift new file mode 100644 index 0000000000..9e552cce09 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -0,0 +1,544 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +open class URLSessionRequestBuilder: RequestBuilder { + + let progress = Progress() + + private var observation: NSKeyValueObservation? + + deinit { + observation?.invalidate() + } + + fileprivate let sessionDelegate = SessionDelegate() + + /** + May be assigned if you want to control the authentication challenges. + */ + public var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - intercept and handle errors like authorization + - retry the request. + */ + public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the URLSession + configuration. + */ + open func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + + guard let url = URL(string: URLString) else { + throw DownloadException.requestMissingURL + } + + var originalRequest = URLRequest(url: url) + + originalRequest.httpMethod = method.rawValue + + buildHeaders().forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + headers.forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) + + return modifiedRequest + } + + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { + let urlSessionId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + let parameters: [String: Any] = self.parameters ?? [:] + + let fileKeys = parameters.filter { $1 is NSURL } + .map { $0.0 } + + let encoding: ParameterEncoding + if fileKeys.count > 0 { + encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) + } else if isBody { + encoding = JSONDataEncoding() + } else { + encoding = URLEncoding() + } + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsuported Http method - \(method)") + } + + let cleanupRequest = { + urlSessionStore[urlSessionId] = nil + self.observation?.invalidate() + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in + + guard let self = self else { return } + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in + + guard let self = self else { return } + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { + observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in + self.progress.totalUnitCount = newProgress.totalUnitCount + self.progress.completedUnitCount = newProgress.completedUnitCount + } + + onProgressReady?(progress) + } + + dataTask.resume() + + } catch { + apiResponseQueue.async { + cleanupRequest() + completion(.failure(ErrorResponse.error(415, nil, error))) + } + } + + } + + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: httpResponse, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, data, error))) + } + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = PetstoreClientAPI.customHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + case is Data.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + guard let data = data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + } + } +} + +private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + + var credential: URLCredential? + + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +public protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +private class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +private class FileUploadEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + for (k, v) in parameters ?? [:] { + switch v { + case let fileURL as URL: + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: fileURL.lastPathComponent, data: fileData, mimeType: mimetype) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, name: String, data: Data, mimeType: String?) -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody ?? Data() + + // https://stackoverflow.com/a/26163136/976628 + let boundary = "Boundary-\(UUID().uuidString)" + urlRequest.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") + + body.append("--\(boundary)\r\n") + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(name)\"\r\n") + + if let mimeType = mimeType { + body.append("Content-Type: \(mimeType)\r\n\r\n") + } + + body.append(data) + + body.append("\r\n") + + body.append("--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +fileprivate extension Data { + /// Append string to NSMutableData + /// + /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to NSData, and then add that data to the NSMutableData, this wraps it in a nice convenient little extension to NSMutableData. This converts using UTF-8. + /// + /// - parameter string: The string to be added to the `NSMutableData`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/petstore/swift5/resultLibrary/README.md b/samples/client/petstore/swift5/resultLibrary/README.md new file mode 100644 index 0000000000..a50bf382e3 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/README.md @@ -0,0 +1,141 @@ +# Swift5 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/resultLibrary/docs/AdditionalPropertiesClass.md new file mode 100644 index 0000000000..e22d28be1d --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Animal.md b/samples/client/petstore/swift5/resultLibrary/docs/Animal.md new file mode 100644 index 0000000000..69c601455c --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/AnimalFarm.md b/samples/client/petstore/swift5/resultLibrary/docs/AnimalFarm.md new file mode 100644 index 0000000000..df6bab21da --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/AnotherFakeAPI.md new file mode 100644 index 0000000000..aead5f1f98 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/AnotherFakeAPI.md @@ -0,0 +1,59 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/ApiResponse.md b/samples/client/petstore/swift5/resultLibrary/docs/ApiResponse.md new file mode 100644 index 0000000000..c6d9768fe9 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/resultLibrary/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 0000000000..c6fceff5e0 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/resultLibrary/docs/ArrayOfNumberOnly.md new file mode 100644 index 0000000000..f09f8fa6f7 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/ArrayTest.md b/samples/client/petstore/swift5/resultLibrary/docs/ArrayTest.md new file mode 100644 index 0000000000..bf416b8330 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Capitalization.md b/samples/client/petstore/swift5/resultLibrary/docs/Capitalization.md new file mode 100644 index 0000000000..95374216c7 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Cat.md b/samples/client/petstore/swift5/resultLibrary/docs/Cat.md new file mode 100644 index 0000000000..fb5949b157 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/resultLibrary/docs/CatAllOf.md new file mode 100644 index 0000000000..79789be61c --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Category.md b/samples/client/petstore/swift5/resultLibrary/docs/Category.md new file mode 100644 index 0000000000..5ca5408c0f --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/ClassModel.md b/samples/client/petstore/swift5/resultLibrary/docs/ClassModel.md new file mode 100644 index 0000000000..e3912fdf0f --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Client.md b/samples/client/petstore/swift5/resultLibrary/docs/Client.md new file mode 100644 index 0000000000..0de1b238c3 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Dog.md b/samples/client/petstore/swift5/resultLibrary/docs/Dog.md new file mode 100644 index 0000000000..4824786da0 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/resultLibrary/docs/DogAllOf.md new file mode 100644 index 0000000000..9302ef52e9 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/EnumArrays.md b/samples/client/petstore/swift5/resultLibrary/docs/EnumArrays.md new file mode 100644 index 0000000000..b9a9807d3c --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/EnumClass.md b/samples/client/petstore/swift5/resultLibrary/docs/EnumClass.md new file mode 100644 index 0000000000..67f017becd --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/EnumTest.md b/samples/client/petstore/swift5/resultLibrary/docs/EnumTest.md new file mode 100644 index 0000000000..bc9b036dd7 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md new file mode 100644 index 0000000000..49d4d3fb6a --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/FakeAPI.md @@ -0,0 +1,662 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/resultLibrary/docs/FakeClassnameTags123API.md new file mode 100644 index 0000000000..9f24b46edb --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/FakeClassnameTags123API.md @@ -0,0 +1,59 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/File.md b/samples/client/petstore/swift5/resultLibrary/docs/File.md new file mode 100644 index 0000000000..3edfef17b7 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/resultLibrary/docs/FileSchemaTestClass.md new file mode 100644 index 0000000000..afdacc60b2 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/resultLibrary/docs/FormatTest.md new file mode 100644 index 0000000000..f74d94f6c4 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/resultLibrary/docs/HasOnlyReadOnly.md new file mode 100644 index 0000000000..57b6e3a17e --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/List.md b/samples/client/petstore/swift5/resultLibrary/docs/List.md new file mode 100644 index 0000000000..b77718302e --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/MapTest.md b/samples/client/petstore/swift5/resultLibrary/docs/MapTest.md new file mode 100644 index 0000000000..56213c4113 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 0000000000..fcffb8ecdb --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Model200Response.md b/samples/client/petstore/swift5/resultLibrary/docs/Model200Response.md new file mode 100644 index 0000000000..5865ea690c --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Name.md b/samples/client/petstore/swift5/resultLibrary/docs/Name.md new file mode 100644 index 0000000000..f7b180292c --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/NumberOnly.md b/samples/client/petstore/swift5/resultLibrary/docs/NumberOnly.md new file mode 100644 index 0000000000..72bd361168 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Order.md b/samples/client/petstore/swift5/resultLibrary/docs/Order.md new file mode 100644 index 0000000000..15487f0117 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/OuterComposite.md b/samples/client/petstore/swift5/resultLibrary/docs/OuterComposite.md new file mode 100644 index 0000000000..d6b3583bc3 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/OuterEnum.md b/samples/client/petstore/swift5/resultLibrary/docs/OuterEnum.md new file mode 100644 index 0000000000..06d413b016 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Pet.md b/samples/client/petstore/swift5/resultLibrary/docs/Pet.md new file mode 100644 index 0000000000..5c05f98fad --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md new file mode 100644 index 0000000000..27efe08334 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/PetAPI.md @@ -0,0 +1,469 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/resultLibrary/docs/ReadOnlyFirst.md new file mode 100644 index 0000000000..ed537b8759 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Return.md b/samples/client/petstore/swift5/resultLibrary/docs/Return.md new file mode 100644 index 0000000000..66d17c27c8 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/SpecialModelName.md b/samples/client/petstore/swift5/resultLibrary/docs/SpecialModelName.md new file mode 100644 index 0000000000..3ec27a38c2 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md new file mode 100644 index 0000000000..36365ca519 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md @@ -0,0 +1,206 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/StringBooleanMap.md b/samples/client/petstore/swift5/resultLibrary/docs/StringBooleanMap.md new file mode 100644 index 0000000000..7abf11ec68 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/Tag.md b/samples/client/petstore/swift5/resultLibrary/docs/Tag.md new file mode 100644 index 0000000000..ff4ac8aa45 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/resultLibrary/docs/TypeHolderDefault.md new file mode 100644 index 0000000000..5161394bdc --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/TypeHolderExample.md b/samples/client/petstore/swift5/resultLibrary/docs/TypeHolderExample.md new file mode 100644 index 0000000000..46d0471cd7 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/User.md b/samples/client/petstore/swift5/resultLibrary/docs/User.md new file mode 100644 index 0000000000..5a439de0ff --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/resultLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/UserAPI.md new file mode 100644 index 0000000000..380813bc68 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/docs/UserAPI.md @@ -0,0 +1,406 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/resultLibrary/git_push.sh b/samples/client/petstore/swift5/resultLibrary/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/resultLibrary/pom.xml b/samples/client/petstore/swift5/resultLibrary/pom.xml new file mode 100644 index 0000000000..c1b201eb3b --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/resultLibrary/project.yml b/samples/client/petstore/swift5/resultLibrary/project.yml new file mode 100644 index 0000000000..892005fdd5 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/project.yml @@ -0,0 +1,14 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + diff --git a/samples/client/petstore/swift5/resultLibrary/run_spmbuild.sh b/samples/client/petstore/swift5/resultLibrary/run_spmbuild.sh new file mode 100755 index 0000000000..1a9f585ad0 --- /dev/null +++ b/samples/client/petstore/swift5/resultLibrary/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.gitignore b/samples/client/petstore/swift5/rxswiftLibrary/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator-ignore b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION new file mode 100644 index 0000000000..58592f031f --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/Cartfile b/samples/client/petstore/swift5/rxswiftLibrary/Cartfile new file mode 100644 index 0000000000..72cbede959 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/Cartfile @@ -0,0 +1,2 @@ + +github "ReactiveX/RxSwift" ~> 5.0.1 diff --git a/samples/client/petstore/swift5/rxswiftLibrary/Info.plist b/samples/client/petstore/swift5/rxswiftLibrary/Info.plist new file mode 100644 index 0000000000..323e5ecfc4 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/Package.resolved b/samples/client/petstore/swift5/rxswiftLibrary/Package.resolved new file mode 100644 index 0000000000..e3afef806b --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "RxSwift", + "repositoryURL": "https://github.com/ReactiveX/RxSwift.git", + "state": { + "branch": null, + "revision": "b3e888b4972d9bc76495dd74d30a8c7fad4b9395", + "version": "5.0.1" + } + } + ] + }, + "version": 1 +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/Package.swift b/samples/client/petstore/swift5/rxswiftLibrary/Package.swift new file mode 100644 index 0000000000..24f9a6c99a --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/Package.swift @@ -0,0 +1,32 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "5.0.0") + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: ["RxSwift"], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec new file mode 100644 index 0000000000..76ab70698e --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' + s.dependency 'RxSwift', '~> 5.0.0' +end diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..8efc1d35ec --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,584 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11F49B24B6239C324722572C /* URLSessionImplementations.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + BC097E527F96131FEA12D864 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69DB3E1D94EB0566C0052331 /* RxSwift.framework */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 69DB3E1D94EB0566C0052331 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RxSwift.framework; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D1990C2A394CCF025EF98A2F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BC097E527F96131FEA12D864 /* RxSwift.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1E464C0937FE0D3A7A0FE29A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7861EE241895128F64DD7873 /* Carthage */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 1E464C0937FE0D3A7A0FE29A /* Frameworks */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */, + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */, + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 7861EE241895128F64DD7873 /* Carthage */ = { + isa = PBXGroup; + children = ( + A012205B41CB71A62B86EECD /* iOS */, + ); + name = Carthage; + path = Carthage/Build; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + A012205B41CB71A62B86EECD /* iOS */ = { + isa = PBXGroup; + children = ( + 69DB3E1D94EB0566C0052331 /* RxSwift.framework */, + ); + path = iOS; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + D1990C2A394CCF025EF98A2F /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 0000000000..26d510552b --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 0000000000..2000700968 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? [Any?] { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? [Any?] { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 0000000000..e4cbda9c72 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,64 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetstoreClientAPI { + public static var basePath = "http://petstore.swagger.io:80/v2" + public static var credential: URLCredential? + public static var customHeaders: [String: String] = [:] + public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + public let parameters: [String: Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client. + public var onProgressReady: ((Progress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(PetstoreClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = PetstoreClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 0000000000..792371b384 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,53 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import RxSwift + +open class AnotherFakeAPI { + /** + To test special tags + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 0000000000..cad139a00b --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,668 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import RxSwift + +open class FakeAPI { + /** + + - parameter body: (body) Input boolean as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input composite as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input number as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input string as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter query: (query) + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "query": query.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + To test \"client\" model + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "integer": integer?.encodeToJSON(), + "int32": int32?.encodeToJSON(), + "int64": int64?.encodeToJSON(), + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), + "date": date?.encodeToJSON(), + "dateTime": dateTime?.encodeToJSON(), + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - returns: RequestBuilder + */ + open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + Fake endpoint to test group parameters (optional) + + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), + "int64_group": int64Group?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + test inline additionalProperties + + - parameter param: (body) request body + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + test json serialization of form data + + - parameter param: (form) field1 + - parameter param2: (form) field2 + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 0000000000..989a914f37 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,56 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import RxSwift + +open class FakeClassnameTags123API { + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 0000000000..42bafcffce --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,468 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import RxSwift + +open class PetAPI { + /** + Add a new pet to the store + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Deletes a pet + + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + let nillableHeaders: [String: Any?] = [ + "api_key": apiKey?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + + - parameter status: (query) Status values that need to be considered for filter + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable<[Pet]> + */ + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<[Pet]> { + return Observable.create { observer -> Disposable in + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "status": status.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Finds Pets by tags + + - parameter tags: (query) Tags to filter by + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable<[Pet]> + */ + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<[Pet]> { + return Observable.create { observer -> Disposable in + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "tags": tags.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find pet by ID + + - parameter petId: (path) ID of pet to return + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Update an existing pet + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Updates a pet in the store with form data + + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image (required) + + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 0000000000..dea3933433 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,182 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import RxSwift + +open class StoreAPI { + /** + Delete purchase order by ID + + - parameter orderId: (path) ID of the order that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Returns pet inventories by status + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable<[String:Int]> + */ + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<[String: Int]> { + return Observable.create { observer -> Disposable in + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find purchase order by ID + + - parameter orderId: (path) ID of pet that needs to be fetched + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Place an order for a pet + + - parameter body: (body) order placed for purchasing the pet + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { + let path = "/store/order" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 0000000000..3447ea28c0 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,351 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +import RxSwift + +open class UserAPI { + /** + Create user + + - parameter body: (body) Created user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { + let path = "/user" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Delete user + + - parameter username: (path) The name that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Get user by user name + + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs user into the system + + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + observer.onNext(response.body!) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "username": username.encodeToJSON(), + "password": password.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs out current logged in user session + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + open class func logoutUserWithRequestBuilder() -> RequestBuilder { + let path = "/user/logout" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Updated user + + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - returns: Observable + */ + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + return Observable.create { observer -> Disposable in + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + observer.onNext(()) + case let .failure(error): + observer.onError(error) + } + observer.onCompleted() + } + return Disposables.create() + } + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 0000000000..32e194f6ee --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + open class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + open class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 0000000000..627d9adb75 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 0000000000..74fcfcf2ad --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 0000000000..b79e9f5e64 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 0000000000..02f78ffb47 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 0000000000..b9757b6cbc --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,51 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +public enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 0000000000..1af0315359 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,25 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 0000000000..5ed9f31e2a --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,20 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 0000000000..e09b0e9efd --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 0000000000..ec270da890 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,22 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 0000000000..6c252ed475 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 0000000000..e84eb5d650 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 0000000000..d2140933d1 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,28 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 0000000000..d1b3b27616 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,38 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 0000000000..7ab887f311 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,22 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 0000000000..a51ad0dffa --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,18 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 0000000000..eb8f7e5e19 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,20 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String = "default-name" + + public init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 0000000000..e2a7d4427a --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ +public struct ClassModel: Codable { + + public var _class: String? + + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 0000000000..00245ca372 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,18 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 0000000000..492c122800 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,22 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 0000000000..7786f8acc5 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,18 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 0000000000..9844e7c40e --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,33 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable, CaseIterable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable, CaseIterable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 0000000000..d4029d73f8 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 0000000000..789f583e1d --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,52 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable, CaseIterable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 0000000000..abf3ccffc4 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 0000000000..532f145793 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,20 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 0000000000..20bd6d103b --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,42 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 0000000000..906ddb06fb --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,20 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 0000000000..fe13d302cc --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,22 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 0000000000..4b6037f378 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,35 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 0000000000..c3deb2f289 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,22 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 0000000000..b61db7d6e7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 0000000000..8ab4db44b7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 0000000000..4d1dafcc2c --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,22 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 0000000000..40c30cc860 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,34 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 0000000000..18c3a024f1 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,28 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 0000000000..c3b778cbbe --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 0000000000..b9ce0e9332 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,34 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + + public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 0000000000..0acd21fd10 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,20 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 0000000000..c223f993a6 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ +public struct Return: Codable { + + public var _return: Int? + + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 0000000000..6e8650f76d --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,22 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 0000000000..3f1237fee4 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 0000000000..4dd8a9a9f5 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,20 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 0000000000..a9e088808e --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,34 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 0000000000..dff4083ae4 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,34 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 0000000000..79f271ed73 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,33 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 0000000000..e06208074c --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +public class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override public func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift new file mode 100644 index 0000000000..9e552cce09 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -0,0 +1,544 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +open class URLSessionRequestBuilder: RequestBuilder { + + let progress = Progress() + + private var observation: NSKeyValueObservation? + + deinit { + observation?.invalidate() + } + + fileprivate let sessionDelegate = SessionDelegate() + + /** + May be assigned if you want to control the authentication challenges. + */ + public var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - intercept and handle errors like authorization + - retry the request. + */ + public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the URLSession + configuration. + */ + open func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + + guard let url = URL(string: URLString) else { + throw DownloadException.requestMissingURL + } + + var originalRequest = URLRequest(url: url) + + originalRequest.httpMethod = method.rawValue + + buildHeaders().forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + headers.forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) + + return modifiedRequest + } + + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { + let urlSessionId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + let parameters: [String: Any] = self.parameters ?? [:] + + let fileKeys = parameters.filter { $1 is NSURL } + .map { $0.0 } + + let encoding: ParameterEncoding + if fileKeys.count > 0 { + encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) + } else if isBody { + encoding = JSONDataEncoding() + } else { + encoding = URLEncoding() + } + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsuported Http method - \(method)") + } + + let cleanupRequest = { + urlSessionStore[urlSessionId] = nil + self.observation?.invalidate() + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in + + guard let self = self else { return } + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in + + guard let self = self else { return } + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { + observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in + self.progress.totalUnitCount = newProgress.totalUnitCount + self.progress.completedUnitCount = newProgress.completedUnitCount + } + + onProgressReady?(progress) + } + + dataTask.resume() + + } catch { + apiResponseQueue.async { + cleanupRequest() + completion(.failure(ErrorResponse.error(415, nil, error))) + } + } + + } + + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: httpResponse, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, data, error))) + } + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = PetstoreClientAPI.customHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + case is Data.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + guard let data = data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + } + } +} + +private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + + var credential: URLCredential? + + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +public protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +private class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +private class FileUploadEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + for (k, v) in parameters ?? [:] { + switch v { + case let fileURL as URL: + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: fileURL.lastPathComponent, data: fileData, mimeType: mimetype) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, name: String, data: Data, mimeType: String?) -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody ?? Data() + + // https://stackoverflow.com/a/26163136/976628 + let boundary = "Boundary-\(UUID().uuidString)" + urlRequest.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") + + body.append("--\(boundary)\r\n") + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(name)\"\r\n") + + if let mimeType = mimeType { + body.append("Content-Type: \(mimeType)\r\n\r\n") + } + + body.append(data) + + body.append("\r\n") + + body.append("--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +fileprivate extension Data { + /// Append string to NSMutableData + /// + /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to NSData, and then add that data to the NSMutableData, this wraps it in a nice convenient little extension to NSMutableData. This converts using UTF-8. + /// + /// - parameter string: The string to be added to the `NSMutableData`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/README.md b/samples/client/petstore/swift5/rxswiftLibrary/README.md new file mode 100644 index 0000000000..a50bf382e3 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/README.md @@ -0,0 +1,141 @@ +# Swift5 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/.gitignore b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/.gitignore new file mode 100644 index 0000000000..0269c2f56d --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/.gitignore @@ -0,0 +1,72 @@ +### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile new file mode 100644 index 0000000000..77432f9eee --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile @@ -0,0 +1,13 @@ +platform :ios, '9.0' + +source 'https://cdn.cocoapods.org/' + +use_frameworks! + +target 'SwaggerClient' do + pod "PetstoreClient", :path => "../" + + target 'SwaggerClientTests' do + inherit! :search_paths + end +end diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile.lock new file mode 100644 index 0000000000..f83481941b --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/Podfile.lock @@ -0,0 +1,23 @@ +PODS: + - PetstoreClient (1.0.0): + - RxSwift (~> 5.0.0) + - RxSwift (5.0.1) + +DEPENDENCIES: + - PetstoreClient (from `../`) + +SPEC REPOS: + trunk: + - RxSwift + +EXTERNAL SOURCES: + PetstoreClient: + :path: "../" + +SPEC CHECKSUMS: + PetstoreClient: ca66372305d63921e72f65b3de84aeb705eba5a1 + RxSwift: e2dc62b366a3adf6a0be44ba9f405efd4c94e0c4 + +PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c + +COCOAPODS: 1.8.4 diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..4d5fe13137 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -0,0 +1,551 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + B024164FBFF71BF644D4419A /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 177A58DD5CF63F2989335DCC /* Pods_SwaggerClient.framework */; }; + B1D0246C8960F47A60098F37 /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F96A0131101344CC5406CB3 /* Pods_SwaggerClientTests.framework */; }; + B596E4BD205657A500B46F03 /* APIHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B596E4BC205657A500B46F03 /* APIHelperTests.swift */; }; + EAEC0BC21D4E30CE00C908A3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BC11D4E30CE00C908A3 /* AppDelegate.swift */; }; + EAEC0BC41D4E30CE00C908A3 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BC31D4E30CE00C908A3 /* ViewController.swift */; }; + EAEC0BC71D4E30CE00C908A3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EAEC0BC51D4E30CE00C908A3 /* Main.storyboard */; }; + EAEC0BC91D4E30CE00C908A3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EAEC0BC81D4E30CE00C908A3 /* Assets.xcassets */; }; + EAEC0BCC1D4E30CE00C908A3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EAEC0BCA1D4E30CE00C908A3 /* LaunchScreen.storyboard */; }; + EAEC0BE41D4E330700C908A3 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BE31D4E330700C908A3 /* PetAPITests.swift */; }; + EAEC0BE61D4E379000C908A3 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BE51D4E379000C908A3 /* StoreAPITests.swift */; }; + EAEC0BE81D4E38CB00C908A3 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEC0BE71D4E38CB00C908A3 /* UserAPITests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + EAEC0BD31D4E30CE00C908A3 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EAEC0BB61D4E30CE00C908A3 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EAEC0BBD1D4E30CE00C908A3; + remoteInfo = SwaggerClient; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 177A58DD5CF63F2989335DCC /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2DEFA8828BD4E38FA5262F53 /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; + 4EF2021609D112A6F5AE0F55 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; + 6F96A0131101344CC5406CB3 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D99518E8E05FD856A952698 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; + B596E4BC205657A500B46F03 /* APIHelperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelperTests.swift; sourceTree = ""; }; + EAEC0BBE1D4E30CE00C908A3 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; + EAEC0BC11D4E30CE00C908A3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + EAEC0BC31D4E30CE00C908A3 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + EAEC0BC61D4E30CE00C908A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + EAEC0BC81D4E30CE00C908A3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + EAEC0BCB1D4E30CE00C908A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + EAEC0BCD1D4E30CE00C908A3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EAEC0BD21D4E30CE00C908A3 /* SwaggerClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + EAEC0BD81D4E30CE00C908A3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EAEC0BE31D4E330700C908A3 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = ""; }; + EAEC0BE51D4E379000C908A3 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = ""; }; + EAEC0BE71D4E38CB00C908A3 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = ""; }; + EFD8AB05F53C74985527D117 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + EAEC0BBB1D4E30CE00C908A3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B024164FBFF71BF644D4419A /* Pods_SwaggerClient.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EAEC0BCF1D4E30CE00C908A3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B1D0246C8960F47A60098F37 /* Pods_SwaggerClientTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 55DC454FF5FFEF8A9CBC1CA3 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 177A58DD5CF63F2989335DCC /* Pods_SwaggerClient.framework */, + 6F96A0131101344CC5406CB3 /* Pods_SwaggerClientTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + CB19142D951AB5DD885404A8 /* Pods */ = { + isa = PBXGroup; + children = ( + 8D99518E8E05FD856A952698 /* Pods-SwaggerClient.debug.xcconfig */, + 2DEFA8828BD4E38FA5262F53 /* Pods-SwaggerClient.release.xcconfig */, + 4EF2021609D112A6F5AE0F55 /* Pods-SwaggerClientTests.debug.xcconfig */, + EFD8AB05F53C74985527D117 /* Pods-SwaggerClientTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + EAEC0BB51D4E30CE00C908A3 = { + isa = PBXGroup; + children = ( + EAEC0BC01D4E30CE00C908A3 /* SwaggerClient */, + EAEC0BD51D4E30CE00C908A3 /* SwaggerClientTests */, + EAEC0BBF1D4E30CE00C908A3 /* Products */, + CB19142D951AB5DD885404A8 /* Pods */, + 55DC454FF5FFEF8A9CBC1CA3 /* Frameworks */, + ); + sourceTree = ""; + }; + EAEC0BBF1D4E30CE00C908A3 /* Products */ = { + isa = PBXGroup; + children = ( + EAEC0BBE1D4E30CE00C908A3 /* SwaggerClient.app */, + EAEC0BD21D4E30CE00C908A3 /* SwaggerClientTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + EAEC0BC01D4E30CE00C908A3 /* SwaggerClient */ = { + isa = PBXGroup; + children = ( + EAEC0BC11D4E30CE00C908A3 /* AppDelegate.swift */, + EAEC0BC31D4E30CE00C908A3 /* ViewController.swift */, + EAEC0BC51D4E30CE00C908A3 /* Main.storyboard */, + EAEC0BC81D4E30CE00C908A3 /* Assets.xcassets */, + EAEC0BCA1D4E30CE00C908A3 /* LaunchScreen.storyboard */, + EAEC0BCD1D4E30CE00C908A3 /* Info.plist */, + ); + path = SwaggerClient; + sourceTree = ""; + }; + EAEC0BD51D4E30CE00C908A3 /* SwaggerClientTests */ = { + isa = PBXGroup; + children = ( + EAEC0BD81D4E30CE00C908A3 /* Info.plist */, + EAEC0BE31D4E330700C908A3 /* PetAPITests.swift */, + EAEC0BE51D4E379000C908A3 /* StoreAPITests.swift */, + EAEC0BE71D4E38CB00C908A3 /* UserAPITests.swift */, + B596E4BC205657A500B46F03 /* APIHelperTests.swift */, + ); + path = SwaggerClientTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + EAEC0BBD1D4E30CE00C908A3 /* SwaggerClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = EAEC0BDB1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClient" */; + buildPhases = ( + 898E536ECC2C4811DDDF67C1 /* [CP] Check Pods Manifest.lock */, + EAEC0BBA1D4E30CE00C908A3 /* Sources */, + EAEC0BBB1D4E30CE00C908A3 /* Frameworks */, + EAEC0BBC1D4E30CE00C908A3 /* Resources */, + 8A7961360961F06AADAF17C9 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwaggerClient; + productName = SwaggerClient; + productReference = EAEC0BBE1D4E30CE00C908A3 /* SwaggerClient.app */; + productType = "com.apple.product-type.application"; + }; + EAEC0BD11D4E30CE00C908A3 /* SwaggerClientTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = EAEC0BDE1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */; + buildPhases = ( + 82CB35D52E274C6177DAC0DD /* [CP] Check Pods Manifest.lock */, + EAEC0BCE1D4E30CE00C908A3 /* Sources */, + EAEC0BCF1D4E30CE00C908A3 /* Frameworks */, + EAEC0BD01D4E30CE00C908A3 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + EAEC0BD41D4E30CE00C908A3 /* PBXTargetDependency */, + ); + name = SwaggerClientTests; + productName = SwaggerClientTests; + productReference = EAEC0BD21D4E30CE00C908A3 /* SwaggerClientTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + EAEC0BB61D4E30CE00C908A3 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = Swagger; + TargetAttributes = { + EAEC0BBD1D4E30CE00C908A3 = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1130; + }; + EAEC0BD11D4E30CE00C908A3 = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1130; + TestTargetID = EAEC0BBD1D4E30CE00C908A3; + }; + }; + }; + buildConfigurationList = EAEC0BB91D4E30CE00C908A3 /* Build configuration list for PBXProject "SwaggerClient" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = EAEC0BB51D4E30CE00C908A3; + productRefGroup = EAEC0BBF1D4E30CE00C908A3 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + EAEC0BBD1D4E30CE00C908A3 /* SwaggerClient */, + EAEC0BD11D4E30CE00C908A3 /* SwaggerClientTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + EAEC0BBC1D4E30CE00C908A3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EAEC0BCC1D4E30CE00C908A3 /* LaunchScreen.storyboard in Resources */, + EAEC0BC91D4E30CE00C908A3 /* Assets.xcassets in Resources */, + EAEC0BC71D4E30CE00C908A3 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EAEC0BD01D4E30CE00C908A3 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 82CB35D52E274C6177DAC0DD /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 898E536ECC2C4811DDDF67C1 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 8A7961360961F06AADAF17C9 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework", + "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + EAEC0BBA1D4E30CE00C908A3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EAEC0BC41D4E30CE00C908A3 /* ViewController.swift in Sources */, + EAEC0BC21D4E30CE00C908A3 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EAEC0BCE1D4E30CE00C908A3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B596E4BD205657A500B46F03 /* APIHelperTests.swift in Sources */, + EAEC0BE81D4E38CB00C908A3 /* UserAPITests.swift in Sources */, + EAEC0BE61D4E379000C908A3 /* StoreAPITests.swift in Sources */, + EAEC0BE41D4E330700C908A3 /* PetAPITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + EAEC0BD41D4E30CE00C908A3 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EAEC0BBD1D4E30CE00C908A3 /* SwaggerClient */; + targetProxy = EAEC0BD31D4E30CE00C908A3 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + EAEC0BC51D4E30CE00C908A3 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + EAEC0BC61D4E30CE00C908A3 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + EAEC0BCA1D4E30CE00C908A3 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + EAEC0BCB1D4E30CE00C908A3 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + EAEC0BD91D4E30CE00C908A3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + }; + name = Debug; + }; + EAEC0BDA1D4E30CE00C908A3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + EAEC0BDC1D4E30CE00C908A3 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8D99518E8E05FD856A952698 /* Pods-SwaggerClient.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EAEC0BDD1D4E30CE00C908A3 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2DEFA8828BD4E38FA5262F53 /* Pods-SwaggerClient.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + EAEC0BDF1D4E30CE00C908A3 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4EF2021609D112A6F5AE0F55 /* Pods-SwaggerClientTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ENABLE_MODULES = YES; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Debug; + }; + EAEC0BE01D4E30CE00C908A3 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EFD8AB05F53C74985527D117 /* Pods-SwaggerClientTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ENABLE_MODULES = YES; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + EAEC0BB91D4E30CE00C908A3 /* Build configuration list for PBXProject "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EAEC0BD91D4E30CE00C908A3 /* Debug */, + EAEC0BDA1D4E30CE00C908A3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EAEC0BDB1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EAEC0BDC1D4E30CE00C908A3 /* Debug */, + EAEC0BDD1D4E30CE00C908A3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EAEC0BDE1D4E30CE00C908A3 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EAEC0BDF1D4E30CE00C908A3 /* Debug */, + EAEC0BE01D4E30CE00C908A3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = EAEC0BB61D4E30CE00C908A3 /* Project object */; +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..13bdd8ab8b --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme new file mode 100644 index 0000000000..b912ca00fe --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..9b3fa18954 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift new file mode 100644 index 0000000000..e8f911b0fa --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift @@ -0,0 +1,43 @@ +// +// AppDelegate.swift +// SwaggerClient +// +// Created by Tony Wang on 7/31/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..b8236c6534 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,48 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..2e721e1833 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..3a2a49bad8 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Info.plist new file mode 100644 index 0000000000..3d8b6fc4a7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/Info.plist @@ -0,0 +1,58 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift new file mode 100644 index 0000000000..3a45ba8fc5 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift @@ -0,0 +1,23 @@ +// +// ViewController.swift +// SwaggerClient +// +// Created by Tony Wang on 7/31/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift new file mode 100644 index 0000000000..4f51881a66 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/APIHelperTests.swift @@ -0,0 +1,55 @@ +// +// APIHelperTests.swift +// SwaggerClientTests +// +// Created by Daiki Matsudate on 2018/03/12. +// Copyright © 2018 Swagger. All rights reserved. +// + +import XCTest +import PetstoreClient +@testable import SwaggerClient + +class APIHelperTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testRejectNil() { + let source: [String: Any?] = ["a": 1, "b": nil, "c": ["1", nil, "2"], "d": true, "e": false] + let expected: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": true, "e": false] + let actual: [String: Any] = APIHelper.rejectNil(source)! + XCTAssert(NSDictionary(dictionary: actual).isEqual(to: expected)) + } + + func testRejectNilHeaders() { + let source: [String: Any?] = ["a": 1, "b": nil, "c": ["1", nil, "2"], "d": true, "e": false] + let expected: [String: String] = ["a": "1", "c": "1,2", "d": "true", "e": "false"] + let actual: [String: String] = APIHelper.rejectNilHeaders(source) + XCTAssert(NSDictionary(dictionary: actual).isEqual(to: expected)) + } + + func testConvertBoolToString() { + let source: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": true, "e": false] + let expected: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": "true", "e": "false"] + let actual: [String: Any] = APIHelper.convertBoolToString(source)! + XCTAssert(NSDictionary(dictionary: actual).isEqual(to: expected)) + } + + func testMapValuesToQueryItems() { + let source: [String: Any] = ["a": 1, "c": ["1", nil, "2"], "d": true, "e": false] + let expected: [URLQueryItem] = [URLQueryItem(name: "a", value: "1"), + URLQueryItem(name: "c", value: "1,2"), + URLQueryItem(name: "d", value: "true"), + URLQueryItem(name: "e", value: "false")].sorted(by: { $0.name > $1.name }) + let actual: [URLQueryItem] = APIHelper.mapValuesToQueryItems(source)!.sorted(by: { $0.name > $1.name }) + XCTAssert(actual == expected) + } +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist new file mode 100644 index 0000000000..619bf44ed7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift new file mode 100644 index 0000000000..5b75994742 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -0,0 +1,88 @@ +// +// PetAPITests.swift +// SwaggerClient +// +// Created by Tony Wang on 7/31/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import RxSwift +import XCTest +@testable import SwaggerClient + +class PetAPITests: XCTestCase { + + let testTimeout = 10.0 + let disposeBag = DisposeBag() + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func test1CreatePet() { + let expectation = self.expectation(description: "testCreatePet") + let category = PetstoreClient.Category(id: 1234, name: "eyeColor") + let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] + let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + + PetAPI.addPet(body: newPet).subscribe(onNext: { + expectation.fulfill() + }, onError: { _ in + XCTFail("error creating pet") + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetPet() { + let expectation = self.expectation(description: "testGetPet") + PetAPI.getPetById(petId: 1000).subscribe(onNext: { pet in + XCTAssert(pet.id == 1000, "invalid id") + XCTAssert(pet.name == "Fluffy", "invalid name") + XCTAssert(pet.category!.id == 1234, "invalid category id") + XCTAssert(pet.category!.name == "eyeColor", "invalid category name") + + let tag1 = pet.tags![0] + XCTAssert(tag1.id == 1234, "invalid tag id") + XCTAssert(tag1.name == "New York", "invalid tag name") + + let tag2 = pet.tags![1] + XCTAssert(tag2.id == 124321, "invalid tag id") + XCTAssert(tag2.name == "Jose", "invalid tag name") + + XCTAssert(pet.photoUrls[0] == "https://petstore.com/sample/photo1.jpg") + XCTAssert(pet.photoUrls[1] == "https://petstore.com/sample/photo2.jpg") + + expectation.fulfill() + }, onError: { _ in + XCTFail("error getting pet") + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeletePet() { + let expectation = self.expectation(description: "testDeletePet") + PetAPI.deletePet(petId: 1000).subscribe(onNext: { + expectation.fulfill() + }, onError: { errorType in + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error deleting pet") + } + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift new file mode 100644 index 0000000000..730f5c134e --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift @@ -0,0 +1,93 @@ +// +// StoreAPITests.swift +// SwaggerClient +// +// Created by Tony Wang on 7/31/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import RxSwift +import XCTest +@testable import SwaggerClient + +class StoreAPITests: XCTestCase { + + let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" + + let testTimeout = 10.0 + let disposeBag = DisposeBag() + + func test1PlaceOrder() { + // use explicit naming to reference the enum so that we test we don't regress on enum naming + let shipDate = Date() + let order = Order(id: 1000, petId: 1000, quantity: 10, shipDate: shipDate, status: .placed, complete: true) + let expectation = self.expectation(description: "testPlaceOrder") + StoreAPI.placeOrder(body: order).subscribe(onNext: { order in + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat), + "Date should be idempotent") + XCTAssert(order.complete == true, "invalid complete") + + expectation.fulfill() + }, onError: { _ in + XCTFail("error placing order") + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetOrder() { + let expectation = self.expectation(description: "testGetOrder") + StoreAPI.getOrderById(orderId: 1000).subscribe(onNext: { order -> Void in + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + XCTAssert(order.complete == true, "invalid complete") + expectation.fulfill() + }, onError: { _ in + XCTFail("error placing order") + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeleteOrder() { + let expectation = self.expectation(description: "testDeleteOrder") + StoreAPI.deleteOrder(orderId: "1000").subscribe(onNext: { + expectation.fulfill() + }, onError: { errorType -> Void in + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error deleting order") + } + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} + +private extension Date { + + /** + Returns true if the dates are equal given the format string. + + - parameter date: The date to compare to. + - parameter format: The format string to use to compare. + + - returns: true if the dates are equal, given the format string. + */ + func isEqual(_ date: Date, format: String) -> Bool { + let fmt = DateFormatter() + fmt.dateFormat = format + return fmt.string(from: self).isEqual(fmt.string(from: date)) + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift new file mode 100644 index 0000000000..ae0994fa82 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift @@ -0,0 +1,125 @@ +// +// UserAPITests.swift +// SwaggerClient +// +// Created by Tony Wang on 7/31/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import RxSwift +import XCTest +@testable import SwaggerClient + +class UserAPITests: XCTestCase { + + let testTimeout = 10.0 + let disposeBag = DisposeBag() + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testLogin() { + let expectation = self.expectation(description: "testLogin") + UserAPI.loginUser(username: "swiftTester", password: "swift").subscribe(onNext: { _ in + expectation.fulfill() + }, onError: { errorType in + // The server isn't returning JSON - and currently the alamofire implementation + // always parses responses as JSON, so making an exception for this here + // Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 0." + // UserInfo={NSDebugDescription=Invalid value around character 0.} + let error = errorType as NSError + if error.code == 3840 { + expectation.fulfill() + } else { + XCTFail("error logging in") + } + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testLogout() { + let expectation = self.expectation(description: "testLogout") + UserAPI.logoutUser().subscribe(onNext: { + expectation.fulfill() + }, onError: { errorType in + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error logging out") + } + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test1CreateUser() { + let expectation = self.expectation(description: "testCreateUser") + let newUser = User(id: 1000, username: "test@test.com", firstName: "Test", lastName: "Tester", email: "test@test.com", password: "test!", phone: "867-5309", userStatus: 0) + UserAPI.createUser(body: newUser).subscribe(onNext: { + expectation.fulfill() + }, onError: { errorType in + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error creating user") + } + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetUser() { + let expectation = self.expectation(description: "testGetUser") + UserAPI.getUserByName(username: "test@test.com").subscribe(onNext: {user -> Void in + XCTAssert(user.userStatus == 0, "invalid userStatus") + XCTAssert(user.email == "test@test.com", "invalid email") + XCTAssert(user.firstName == "Test", "invalid firstName") + XCTAssert(user.lastName == "Tester", "invalid lastName") + XCTAssert(user.password == "test!", "invalid password") + XCTAssert(user.phone == "867-5309", "invalid phone") + expectation.fulfill() + }, onError: { _ in + XCTFail("error getting user") + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeleteUser() { + let expectation = self.expectation(description: "testDeleteUser") + UserAPI.deleteUser(username: "test@test.com").subscribe(onNext: { + expectation.fulfill() + }, onError: { errorType -> Void in + // The server gives us no data back so alamofire parsing fails - at least + // verify that is the error we get here + // Error Domain=com.alamofire.error Code=-6006 "JSON could not be serialized. Input data was nil or zero + // length." UserInfo={NSLocalizedFailureReason=JSON could not be serialized. Input data was nil or zero + // length.} + let error = errorType as NSError + if error.code == -6006 { + expectation.fulfill() + } else { + XCTFail("error deleting user") + } + }).disposed(by: disposeBag) + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/pom.xml b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/pom.xml new file mode 100644 index 0000000000..6c11fe371b --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5RxSwiftPetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 RxSwift Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_xcodebuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/run_xcodebuild.sh new file mode 100755 index 0000000000..79520c7fc3 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/SwaggerClientTests/run_xcodebuild.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +pod install + +xcodebuild -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" test -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/AdditionalPropertiesClass.md new file mode 100644 index 0000000000..e22d28be1d --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Animal.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Animal.md new file mode 100644 index 0000000000..69c601455c --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/AnimalFarm.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/AnimalFarm.md new file mode 100644 index 0000000000..df6bab21da --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/AnotherFakeAPI.md new file mode 100644 index 0000000000..dcd62507d9 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/AnotherFakeAPI.md @@ -0,0 +1,49 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client) -> Observable +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/ApiResponse.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/ApiResponse.md new file mode 100644 index 0000000000..c6d9768fe9 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 0000000000..c6fceff5e0 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayOfNumberOnly.md new file mode 100644 index 0000000000..f09f8fa6f7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayTest.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayTest.md new file mode 100644 index 0000000000..bf416b8330 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Capitalization.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Capitalization.md new file mode 100644 index 0000000000..95374216c7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Cat.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Cat.md new file mode 100644 index 0000000000..fb5949b157 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/CatAllOf.md new file mode 100644 index 0000000000..79789be61c --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Category.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Category.md new file mode 100644 index 0000000000..5ca5408c0f --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/ClassModel.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/ClassModel.md new file mode 100644 index 0000000000..e3912fdf0f --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Client.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Client.md new file mode 100644 index 0000000000..0de1b238c3 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Dog.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Dog.md new file mode 100644 index 0000000000..4824786da0 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/DogAllOf.md new file mode 100644 index 0000000000..9302ef52e9 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/EnumArrays.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/EnumArrays.md new file mode 100644 index 0000000000..b9a9807d3c --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/EnumClass.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/EnumClass.md new file mode 100644 index 0000000000..67f017becd --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/EnumTest.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/EnumTest.md new file mode 100644 index 0000000000..bc9b036dd7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md new file mode 100644 index 0000000000..a9a6c32c98 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeAPI.md @@ -0,0 +1,548 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil) -> Observable +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil) -> Observable +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil) -> Observable +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil) -> Observable +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass) -> Observable +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User) -> Observable +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client) -> Observable +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> Observable +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> Observable +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> Observable +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String:String]) -> Observable +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String) -> Observable +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeClassnameTags123API.md new file mode 100644 index 0000000000..1b94500e79 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FakeClassnameTags123API.md @@ -0,0 +1,49 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client) -> Observable +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/File.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/File.md new file mode 100644 index 0000000000..3edfef17b7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FileSchemaTestClass.md new file mode 100644 index 0000000000..afdacc60b2 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/FormatTest.md new file mode 100644 index 0000000000..f74d94f6c4 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/HasOnlyReadOnly.md new file mode 100644 index 0000000000..57b6e3a17e --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/List.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/List.md new file mode 100644 index 0000000000..b77718302e --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/MapTest.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/MapTest.md new file mode 100644 index 0000000000..56213c4113 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 0000000000..fcffb8ecdb --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Model200Response.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Model200Response.md new file mode 100644 index 0000000000..5865ea690c --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Name.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Name.md new file mode 100644 index 0000000000..f7b180292c --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/NumberOnly.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/NumberOnly.md new file mode 100644 index 0000000000..72bd361168 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Order.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Order.md new file mode 100644 index 0000000000..15487f0117 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/OuterComposite.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/OuterComposite.md new file mode 100644 index 0000000000..d6b3583bc3 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/OuterEnum.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/OuterEnum.md new file mode 100644 index 0000000000..06d413b016 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Pet.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Pet.md new file mode 100644 index 0000000000..5c05f98fad --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md new file mode 100644 index 0000000000..c0ec8a91fb --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/PetAPI.md @@ -0,0 +1,379 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet) -> Observable +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil) -> Observable +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String]) -> Observable<[Pet]> +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String]) -> Observable<[Pet]> +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64) -> Observable +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet) -> Observable +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil) -> Observable +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> Observable +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> Observable +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/ReadOnlyFirst.md new file mode 100644 index 0000000000..ed537b8759 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Return.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Return.md new file mode 100644 index 0000000000..66d17c27c8 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/SpecialModelName.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/SpecialModelName.md new file mode 100644 index 0000000000..3ec27a38c2 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md new file mode 100644 index 0000000000..a648ce8859 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md @@ -0,0 +1,166 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String) -> Observable +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory() -> Observable<[String:Int]> +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64) -> Observable +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order) -> Observable +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/StringBooleanMap.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/StringBooleanMap.md new file mode 100644 index 0000000000..7abf11ec68 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/Tag.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/Tag.md new file mode 100644 index 0000000000..ff4ac8aa45 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/TypeHolderDefault.md new file mode 100644 index 0000000000..5161394bdc --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/TypeHolderExample.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/TypeHolderExample.md new file mode 100644 index 0000000000..46d0471cd7 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/User.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/User.md new file mode 100644 index 0000000000..5a439de0ff --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/UserAPI.md new file mode 100644 index 0000000000..a707c7085a --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/UserAPI.md @@ -0,0 +1,326 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User) -> Observable +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User]) -> Observable +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User]) -> Observable +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String) -> Observable +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String) -> Observable +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String) -> Observable +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser() -> Observable +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User) -> Observable +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// TODO RxSwift sample code not yet implemented. To contribute, please open a ticket via http://github.com/OpenAPITools/openapi-generator/issues/new +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/git_push.sh b/samples/client/petstore/swift5/rxswiftLibrary/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/pom.xml b/samples/client/petstore/swift5/rxswiftLibrary/pom.xml new file mode 100644 index 0000000000..c1b201eb3b --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/project.yml b/samples/client/petstore/swift5/rxswiftLibrary/project.yml new file mode 100644 index 0000000000..667956cb12 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/project.yml @@ -0,0 +1,15 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + dependencies: + - carthage: RxSwift diff --git a/samples/client/petstore/swift5/rxswiftLibrary/run_spmbuild.sh b/samples/client/petstore/swift5/rxswiftLibrary/run_spmbuild.sh new file mode 100755 index 0000000000..1a9f585ad0 --- /dev/null +++ b/samples/client/petstore/swift5/rxswiftLibrary/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/swift5_test_all.sh b/samples/client/petstore/swift5/swift5_test_all.sh new file mode 100755 index 0000000000..aeedfa99e1 --- /dev/null +++ b/samples/client/petstore/swift5/swift5_test_all.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +DIRECTORY=`dirname $0` + +# example project with unit tests +mvn -f $DIRECTORY/default/SwaggerClientTests/pom.xml integration-test +mvn -f $DIRECTORY/promisekitLibrary/SwaggerClientTests/pom.xml integration-test +mvn -f $DIRECTORY/rxswiftLibrary/SwaggerClientTests/pom.xml integration-test +mvn -f $DIRECTORY/urlsessionLibrary/SwaggerClientTests/pom.xml integration-test +mvn -f $DIRECTORY/alamofireLibrary/SwaggerClientTests/pom.xml integration-test +mvn -f $DIRECTORY/combineLibrary/SwaggerClientTests/pom.xml integration-test + +# spm build +mvn -f $DIRECTORY/default/pom.xml integration-test +mvn -f $DIRECTORY/nonPublicApi/pom.xml integration-test +mvn -f $DIRECTORY/objcCompatible/pom.xml integration-test +mvn -f $DIRECTORY/promisekitLibrary/pom.xml integration-test +mvn -f $DIRECTORY/resultLibrary/pom.xml integration-test +mvn -f $DIRECTORY/rxswiftLibrary/pom.xml integration-test +mvn -f $DIRECTORY/urlsessionLibrary/pom.xml integration-test +mvn -f $DIRECTORY/alamofireLibrary/pom.xml integration-test +mvn -f $DIRECTORY/combineLibrary/pom.xml integration-test diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.gitignore b/samples/client/petstore/swift5/urlsessionLibrary/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator-ignore b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION new file mode 100644 index 0000000000..58592f031f --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Cartfile b/samples/client/petstore/swift5/urlsessionLibrary/Cartfile new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/Cartfile @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Info.plist b/samples/client/petstore/swift5/urlsessionLibrary/Info.plist new file mode 100644 index 0000000000..323e5ecfc4 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Package.swift b/samples/client/petstore/swift5/urlsessionLibrary/Package.swift new file mode 100644 index 0000000000..96dfff54ed --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "PetstoreClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "PetstoreClient", + targets: ["PetstoreClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "PetstoreClient", + dependencies: [], + path: "PetstoreClient/Classes" + ) + ] +) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.podspec new file mode 100644 index 0000000000..b61285f6b2 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'PetstoreClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'PetstoreClient' + s.source_files = 'PetstoreClient/Classes/**/*.swift' +end diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6f8918eb33 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.pbxproj @@ -0,0 +1,536 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */; }; + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7986861626C2B1CB49AD7000 /* MapTest.swift */; }; + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6C3E1129526A353B963EFD7 /* Dog.swift */; }; + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27B2E9EF856E89FEAA359A3A /* Order.swift */; }; + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897716962D472FE162B723CB /* APIHelper.swift */; }; + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */; }; + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8C298FC8929DCB369053F11 /* Extensions.swift */; }; + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386FD590658E90509C121118 /* SpecialModelName.swift */; }; + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95568E7C35F119EB4A12B498 /* Animal.swift */; }; + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */; }; + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5565A447062C7B8F695F451 /* User.swift */; }; + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */; }; + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */; }; + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AD994DFAA0DA93C188A4DBA /* Name.swift */; }; + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DF825B8F3BADA2B2537D17 /* APIs.swift */; }; + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */; }; + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D22BE01748F51106DE02332 /* AnimalFarm.swift */; }; + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */; }; + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */; }; + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8E0B16084741FCB82389F58 /* NumberOnly.swift */; }; + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */; }; + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10503995D9EFD031A2EFB576 /* EnumArrays.swift */; }; + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C8D5F382979854D47F18DB1 /* UserAPI.swift */; }; + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3156CE41C001C80379B84BDB /* FormatTest.swift */; }; + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */; }; + 72547ECFB451A509409311EE /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A444949BBC254798C3B3DD /* Configuration.swift */; }; + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21A69C8402A60E01116ABBD /* DogAllOf.swift */; }; + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */; }; + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */; }; + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */; }; + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */; }; + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */; }; + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3933D3B2A3AC4577094D0C23 /* File.swift */; }; + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A6070F581E611FF44AFD40A /* List.swift */; }; + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */; }; + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */; }; + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD60AEA646791E0EDE885DE1 /* EnumTest.swift */; }; + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11F49B24B6239C324722572C /* URLSessionImplementations.swift */; }; + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */ = {isa = PBXBuildFile; fileRef = C81447828475F76C5CF4F08A /* Return.swift */; }; + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A019F500E546A3292CE716A /* PetAPI.swift */; }; + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1A0379CDFC55705AE76C998 /* ArrayTest.swift */; }; + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */; }; + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */; }; + AD594BFB99E31A5E07579237 /* Client.swift in Sources */ = {isa = PBXBuildFile; fileRef = A913A57E72D723632E9A718F /* Client.swift */; }; + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */; }; + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2896F8BFD1AA2965C8A3015 /* Tag.swift */; }; + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */; }; + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B38FA00A494D13F4C382A3 /* Capitalization.swift */; }; + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */; }; + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53274D99BBDE1B79BF3521C /* StoreAPI.swift */; }; + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8699F7966F748ED026A6FB4C /* Models.swift */; }; + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212AA914B7F1793A4E32C119 /* Cat.swift */; }; + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E00950725DC44436C5E238C /* FakeAPI.swift */; }; + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */; }; + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2985D01F8D60A4B1925C69 /* Category.swift */; }; + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */; }; + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = ""; }; + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderExample.swift; sourceTree = ""; }; + 212AA914B7F1793A4E32C119 /* Cat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = ""; }; + 27B2E9EF856E89FEAA359A3A /* Order.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Order.swift; sourceTree = ""; }; + 28A444949BBC254798C3B3DD /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + 3156CE41C001C80379B84BDB /* FormatTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTest.swift; sourceTree = ""; }; + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 37DF825B8F3BADA2B2537D17 /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 386FD590658E90509C121118 /* SpecialModelName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpecialModelName.swift; sourceTree = ""; }; + 3933D3B2A3AC4577094D0C23 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdditionalPropertiesClass.swift; sourceTree = ""; }; + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CatAllOf.swift; sourceTree = ""; }; + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassModel.swift; sourceTree = ""; }; + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringBooleanMap.swift; sourceTree = ""; }; + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumClass.swift; sourceTree = ""; }; + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSchemaTestClass.swift; sourceTree = ""; }; + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = ""; }; + 5AD994DFAA0DA93C188A4DBA /* Name.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = ""; }; + 6E00950725DC44436C5E238C /* FakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeAPI.swift; sourceTree = ""; }; + 6F2985D01F8D60A4B1925C69 /* Category.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = ""; }; + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadOnlyFirst.swift; sourceTree = ""; }; + 7986861626C2B1CB49AD7000 /* MapTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = ""; }; + 7A6070F581E611FF44AFD40A /* List.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = ""; }; + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = ""; }; + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model200Response.swift; sourceTree = ""; }; + 8699F7966F748ED026A6FB4C /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + 897716962D472FE162B723CB /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimalFarm.swift; sourceTree = ""; }; + 95568E7C35F119EB4A12B498 /* Animal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = ""; }; + 9A019F500E546A3292CE716A /* PetAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = ""; }; + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixedPropertiesAndAdditionalPropertiesClass.swift; sourceTree = ""; }; + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnotherFakeAPI.swift; sourceTree = ""; }; + A21A69C8402A60E01116ABBD /* DogAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DogAllOf.swift; sourceTree = ""; }; + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = ""; }; + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = ""; }; + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResponse.swift; sourceTree = ""; }; + A913A57E72D723632E9A718F /* Client.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Client.swift; sourceTree = ""; }; + B2896F8BFD1AA2965C8A3015 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = ""; }; + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = ""; }; + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = ""; }; + B8C298FC8929DCB369053F11 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + B8E0B16084741FCB82389F58 /* NumberOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = ""; }; + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = ""; }; + C6C3E1129526A353B963EFD7 /* Dog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = ""; }; + C81447828475F76C5CF4F08A /* Return.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = ""; }; + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + E5565A447062C7B8F695F451 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeHolderDefault.swift; sourceTree = ""; }; + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pet.swift; sourceTree = ""; }; + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = ""; }; + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OuterComposite.swift; sourceTree = ""; }; + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnumTest.swift; sourceTree = ""; }; + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 4FBDCF1330A9AB9122780DB3 /* Models */ = { + isa = PBXGroup; + children = ( + 396DEF3156BA0D12D0FC5C3C /* AdditionalPropertiesClass.swift */, + 95568E7C35F119EB4A12B498 /* Animal.swift */, + 8D22BE01748F51106DE02332 /* AnimalFarm.swift */, + A8E7B833748B4F0C7CDA90C6 /* ApiResponse.swift */, + 7B1B8B838B5D9D312F2002EB /* ArrayOfArrayOfNumberOnly.swift */, + B65BB72353DA24536A9049BE /* ArrayOfNumberOnly.swift */, + F1A0379CDFC55705AE76C998 /* ArrayTest.swift */, + A7B38FA00A494D13F4C382A3 /* Capitalization.swift */, + 212AA914B7F1793A4E32C119 /* Cat.swift */, + 3AD0F94F512DFBC09F9CC79A /* CatAllOf.swift */, + 6F2985D01F8D60A4B1925C69 /* Category.swift */, + 3C30827D8EAF8EA684E7BCEA /* ClassModel.swift */, + A913A57E72D723632E9A718F /* Client.swift */, + C6C3E1129526A353B963EFD7 /* Dog.swift */, + A21A69C8402A60E01116ABBD /* DogAllOf.swift */, + 10503995D9EFD031A2EFB576 /* EnumArrays.swift */, + 4B2C97AE6ACA1E5FB88F5BAA /* EnumClass.swift */, + FD60AEA646791E0EDE885DE1 /* EnumTest.swift */, + 3933D3B2A3AC4577094D0C23 /* File.swift */, + 4B3666552AA854DAF9C480A3 /* FileSchemaTestClass.swift */, + 3156CE41C001C80379B84BDB /* FormatTest.swift */, + 4C7FBC641752D2E13B150973 /* HasOnlyReadOnly.swift */, + 7A6070F581E611FF44AFD40A /* List.swift */, + 7986861626C2B1CB49AD7000 /* MapTest.swift */, + 9AD714C7CC59BDD18DE8DF4E /* MixedPropertiesAndAdditionalPropertiesClass.swift */, + 82A2C3DC2235F0114C2B08E5 /* Model200Response.swift */, + 5AD994DFAA0DA93C188A4DBA /* Name.swift */, + B8E0B16084741FCB82389F58 /* NumberOnly.swift */, + 27B2E9EF856E89FEAA359A3A /* Order.swift */, + F4E0AD8F60A91F72C7687560 /* OuterComposite.swift */, + C15008AABC804EB6FB4CDAC6 /* OuterEnum.swift */, + ECFEB4C6C257B3BB3CEA36D1 /* Pet.swift */, + 6FD42727E001E799E458C292 /* ReadOnlyFirst.swift */, + C81447828475F76C5CF4F08A /* Return.swift */, + 386FD590658E90509C121118 /* SpecialModelName.swift */, + 47B4DEBABEFE140768CFB70B /* StringBooleanMap.swift */, + B2896F8BFD1AA2965C8A3015 /* Tag.swift */, + EBC76F6D4D2AA8084B7EB50E /* TypeHolderDefault.swift */, + 19B65C66C97F082718DDD703 /* TypeHolderExample.swift */, + E5565A447062C7B8F695F451 /* User.swift */, + ); + path = Models; + sourceTree = ""; + }; + 5FBA6AE5F64CD737F88B4565 = { + isa = PBXGroup; + children = ( + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */, + 857F0DEA1890CE66D6DAD556 /* Products */, + ); + sourceTree = ""; + }; + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + 897716962D472FE162B723CB /* APIHelper.swift */, + 37DF825B8F3BADA2B2537D17 /* APIs.swift */, + 02A6F6BB2152ACEE1416D44A /* CodableHelper.swift */, + 28A444949BBC254798C3B3DD /* Configuration.swift */, + B8C298FC8929DCB369053F11 /* Extensions.swift */, + 10A7A27EE12A4DFEA1C0EE35 /* JSONDataEncoding.swift */, + 35D710108A69DD8A5297F926 /* JSONEncodingHelper.swift */, + 8699F7966F748ED026A6FB4C /* Models.swift */, + FD7A1702ACD8737DED6588CD /* OpenISO8601DateFormatter.swift */, + D138F6DA6160301F9281383E /* SynchronizedDictionary.swift */, + 11F49B24B6239C324722572C /* URLSessionImplementations.swift */, + F956D0CCAE23BCFD1C7BDD5D /* APIs */, + 4FBDCF1330A9AB9122780DB3 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 857F0DEA1890CE66D6DAD556 /* Products */ = { + isa = PBXGroup; + children = ( + 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 9B364C01750D7AA4F983B9E7 /* PetstoreClient */ = { + isa = PBXGroup; + children = ( + EF4C81BDD734856ED5023B77 /* Classes */, + ); + path = PetstoreClient; + sourceTree = ""; + }; + EF4C81BDD734856ED5023B77 /* Classes */ = { + isa = PBXGroup; + children = ( + 67BF3478113E6B4DF1C4E04F /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + F956D0CCAE23BCFD1C7BDD5D /* APIs */ = { + isa = PBXGroup; + children = ( + 9DF24D2714B9C4CF14146E88 /* AnotherFakeAPI.swift */, + 6E00950725DC44436C5E238C /* FakeAPI.swift */, + B42354B407EC173BEB54E042 /* FakeClassnameTags123API.swift */, + 9A019F500E546A3292CE716A /* PetAPI.swift */, + A53274D99BBDE1B79BF3521C /* StoreAPI.swift */, + 7C8D5F382979854D47F18DB1 /* UserAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C1282C2230015E0D204BEAED /* PetstoreClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */; + buildPhases = ( + E539708354CE60FE486F81ED /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PetstoreClient; + productName = PetstoreClient; + productReference = 164AD6EC9C4CCF634D7C4590 /* PetstoreClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E7D276EE2369D8C455513C2E /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 5FBA6AE5F64CD737F88B4565; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C1282C2230015E0D204BEAED /* PetstoreClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + E539708354CE60FE486F81ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E6C7C7F271A802DF8099330 /* APIHelper.swift in Sources */, + 40E3027D2E38D8329C6AB01F /* APIs.swift in Sources */, + 248F2F0F29E8FDAE9CAD64C5 /* AdditionalPropertiesClass.swift in Sources */, + 2B441CDFFFDDB343C04F5375 /* Animal.swift in Sources */, + 45B3B29D7A62049F824751F8 /* AnimalFarm.swift in Sources */, + CA9B9B19882EA044EAD0B359 /* AnotherFakeAPI.swift in Sources */, + 0299339D13C3571C4C57368A /* ApiResponse.swift in Sources */, + 4B4BE77747413A9188CDABD2 /* ArrayOfArrayOfNumberOnly.swift in Sources */, + 3691B017D3AA18404A563C67 /* ArrayOfNumberOnly.swift in Sources */, + A85E190556818FFA79896E92 /* ArrayTest.swift in Sources */, + BB1F3C6D50B8F0A8CC4F1749 /* Capitalization.swift in Sources */, + D95A5F83AAA7D5C95A29AB83 /* Cat.swift in Sources */, + 4A344DF7ECE721B4BBEDCB4A /* CatAllOf.swift in Sources */, + E8A58C6414E88AF3EAE45B69 /* Category.swift in Sources */, + 7441BBA84C31E06400338F89 /* ClassModel.swift in Sources */, + AD594BFB99E31A5E07579237 /* Client.swift in Sources */, + 6FBD978F4D1ED92E7071FFBB /* CodableHelper.swift in Sources */, + 72547ECFB451A509409311EE /* Configuration.swift in Sources */, + 0C1E4C682F2D0AF7D9E431EE /* Dog.swift in Sources */, + 72CE544C52BB33778D1B89B8 /* DogAllOf.swift in Sources */, + 61322FC4325F1A4FF24ACA48 /* EnumArrays.swift in Sources */, + ACF3037926301D4D6E848745 /* EnumClass.swift in Sources */, + 9DA1C6F8B4D6C8595F28C098 /* EnumTest.swift in Sources */, + 269E3103C458C78EA5726EE2 /* Extensions.swift in Sources */, + DDBD4C0FBA3CD6A4DA3DF376 /* FakeAPI.swift in Sources */, + 34C26979F4678B5B579D26E8 /* FakeClassnameTags123API.swift in Sources */, + 97F7B85BF07A325EEBF92C93 /* File.swift in Sources */, + DDF1D589267D56D9BED3C6E5 /* FileSchemaTestClass.swift in Sources */, + 6B638A04B34C82B2091D6EDD /* FormatTest.swift in Sources */, + 86DE714469BE8BA28AFF710F /* HasOnlyReadOnly.swift in Sources */, + 9D22720B1B12BE43D3B45ADE /* JSONDataEncoding.swift in Sources */, + 7588B7E2960253174ADCCF16 /* JSONEncodingHelper.swift in Sources */, + 9CA19AA4483F6EB50270A81E /* List.swift in Sources */, + 081C0B80A989B1AAF2665121 /* MapTest.swift in Sources */, + B301DB1B80F37C757550AA17 /* MixedPropertiesAndAdditionalPropertiesClass.swift in Sources */, + 9CF06ACDA32CB0C3E74E435C /* Model200Response.swift in Sources */, + D3BAB7C7A607392CA838C580 /* Models.swift in Sources */, + 37DEADD6CD0496690725B8A7 /* Name.swift in Sources */, + 555DEA47352B42E49082922B /* NumberOnly.swift in Sources */, + B637B9432565A6A8E7C73E7F /* OpenISO8601DateFormatter.swift in Sources */, + 0E6932F1C55BA6880693C478 /* Order.swift in Sources */, + 922BDADAB291907A7FD14314 /* OuterComposite.swift in Sources */, + 41A491E9B577C510F927D126 /* OuterEnum.swift in Sources */, + 2C29D5B60E00DDA3878F1BDE /* Pet.swift in Sources */, + A6E5A5629495DB0ED672B06F /* PetAPI.swift in Sources */, + 914F4D1FCB17773C067C4E68 /* ReadOnlyFirst.swift in Sources */, + A6E50CC6845FE58D8C236253 /* Return.swift in Sources */, + 294CDFA409BC369C0FDC5FB3 /* SpecialModelName.swift in Sources */, + CB68ABDBAADAF6B8D7B93A5D /* StoreAPI.swift in Sources */, + EDFC6C5121A43997014049CB /* StringBooleanMap.swift in Sources */, + AD3A3107C12F2634CD22163B /* SynchronizedDictionary.swift in Sources */, + B3E35FE2773D4A8BA15CFA88 /* Tag.swift in Sources */, + 5695497F5DBF6C08842755A3 /* TypeHolderDefault.swift in Sources */, + FECA2E8C9D0BDFEC459E8996 /* TypeHolderExample.swift in Sources */, + A3E16915AA7FD644C4FE162E /* URLSessionImplementations.swift in Sources */, + 31DFF71D8CCCA0D2D2F8AC90 /* User.swift in Sources */, + 64C48E3658CF53EBE8AF82F9 /* UserAPI.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 3B2C02AFB91CB5C82766ED5C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + A9EB0A02B94C427CBACFEC7C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + DD3EEB93949E9EBA4437E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + F81D4E5FECD46E9AA6DD2C29 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + B46EDEB1A7F0D78FE6394544 /* Build configuration list for PBXNativeTarget "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD3EEB93949E9EBA4437E9CD /* Debug */, + 3B2C02AFB91CB5C82766ED5C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; + ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A9EB0A02B94C427CBACFEC7C /* Debug */, + F81D4E5FECD46E9AA6DD2C29 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = E7D276EE2369D8C455513C2E /* Project object */; +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme new file mode 100644 index 0000000000..26d510552b --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.xcodeproj/xcshareddata/xcschemes/PetstoreClient.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 0000000000..2000700968 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? [Any?] { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? [Any?] { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 0000000000..e4cbda9c72 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,64 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetstoreClientAPI { + public static var basePath = "http://petstore.swagger.io:80/v2" + public static var credential: URLCredential? + public static var customHeaders: [String: String] = [:] + public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + public let parameters: [String: Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client. + public var onProgressReady: ((Progress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(PetstoreClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = PetstoreClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift new file mode 100644 index 0000000000..5bbf323f82 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -0,0 +1,48 @@ +// +// AnotherFakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class AnotherFakeAPI { + /** + To test special tags + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test special tags + - PATCH /another-fake/dummy + - To test special tags and operation ID starting with number + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/another-fake/dummy" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift new file mode 100644 index 0000000000..dfbb6b0224 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -0,0 +1,619 @@ +// +// FakeAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class FakeAPI { + /** + + - parameter body: (body) Input boolean as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/boolean + - Test serialization of outer boolean types + - parameter body: (body) Input boolean as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterBooleanSerializeWithRequestBuilder(body: Bool? = nil) -> RequestBuilder { + let path = "/fake/outer/boolean" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input composite as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/composite + - Test serialization of object with outer number type + - parameter body: (body) Input composite as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterCompositeSerializeWithRequestBuilder(body: OuterComposite? = nil) -> RequestBuilder { + let path = "/fake/outer/composite" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input number as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/number + - Test serialization of outer number types + - parameter body: (body) Input number as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterNumberSerializeWithRequestBuilder(body: Double? = nil) -> RequestBuilder { + let path = "/fake/outer/number" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) Input string as post body (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - POST /fake/outer/string + - Test serialization of outer string types + - parameter body: (body) Input string as post body (optional) + - returns: RequestBuilder + */ + open class func fakeOuterStringSerializeWithRequestBuilder(body: String? = nil) -> RequestBuilder { + let path = "/fake/outer/string" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - PUT /fake/body-with-file-schema + - For this test, the body for this request much reference a schema named `File`. + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithFileSchemaWithRequestBuilder(body: FileSchemaTestClass) -> RequestBuilder { + let path = "/fake/body-with-file-schema" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + + - parameter query: (query) + - parameter body: (body) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + - PUT /fake/body-with-query-params + - parameter query: (query) + - parameter body: (body) + - returns: RequestBuilder + */ + open class func testBodyWithQueryParamsWithRequestBuilder(query: String, body: User) -> RequestBuilder { + let path = "/fake/body-with-query-params" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "query": query.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + To test \"client\" model + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test \"client\" model + - PATCH /fake + - To test \"client\" model + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClientModelWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testEndpointParametersWithRequestBuilder(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - POST /fake + - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + - BASIC: + - type: http + - name: http_basic_test + - parameter number: (form) None + - parameter double: (form) None + - parameter patternWithoutDelimiter: (form) None + - parameter byte: (form) None + - parameter integer: (form) None (optional) + - parameter int32: (form) None (optional) + - parameter int64: (form) None (optional) + - parameter float: (form) None (optional) + - parameter string: (form) None (optional) + - parameter binary: (form) None (optional) + - parameter date: (form) None (optional) + - parameter dateTime: (form) None (optional) + - parameter password: (form) None (optional) + - parameter callback: (form) None (optional) + - returns: RequestBuilder + */ + open class func testEndpointParametersWithRequestBuilder(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "integer": integer?.encodeToJSON(), + "int32": int32?.encodeToJSON(), + "int64": int64?.encodeToJSON(), + "number": number.encodeToJSON(), + "float": float?.encodeToJSON(), + "double": double.encodeToJSON(), + "string": string?.encodeToJSON(), + "pattern_without_delimiter": patternWithoutDelimiter.encodeToJSON(), + "byte": byte.encodeToJSON(), + "binary": binary?.encodeToJSON(), + "date": date?.encodeToJSON(), + "dateTime": dateTime?.encodeToJSON(), + "password": password?.encodeToJSON(), + "callback": callback?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + * enum for parameter enumHeaderStringArray + */ + public enum EnumHeaderStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumHeaderString + */ + public enum EnumHeaderString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryStringArray + */ + public enum EnumQueryStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumQueryString + */ + public enum EnumQueryString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + * enum for parameter enumQueryInteger + */ + public enum EnumQueryInteger_testEnumParameters: Int, CaseIterable { + case _1 = 1 + case number2 = -2 + } + + /** + * enum for parameter enumQueryDouble + */ + public enum EnumQueryDouble_testEnumParameters: Double, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + + /** + * enum for parameter enumFormStringArray + */ + public enum EnumFormStringArray_testEnumParameters: String, CaseIterable { + case greaterThan = ">" + case dollar = "$" + } + + /** + * enum for parameter enumFormString + */ + public enum EnumFormString_testEnumParameters: String, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" + } + + /** + To test enum parameters + + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test enum parameters + - GET /fake + - To test enum parameters + - parameter enumHeaderStringArray: (header) Header parameter enum test (string array) (optional) + - parameter enumHeaderString: (header) Header parameter enum test (string) (optional, default to .efg) + - parameter enumQueryStringArray: (query) Query parameter enum test (string array) (optional) + - parameter enumQueryString: (query) Query parameter enum test (string) (optional, default to .efg) + - parameter enumQueryInteger: (query) Query parameter enum test (double) (optional) + - parameter enumQueryDouble: (query) Query parameter enum test (double) (optional) + - parameter enumFormStringArray: (form) Form parameter enum test (string array) (optional, default to .dollar) + - parameter enumFormString: (form) Form parameter enum test (string) (optional, default to .efg) + - returns: RequestBuilder + */ + open class func testEnumParametersWithRequestBuilder(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "enum_form_string_array": enumFormStringArray?.encodeToJSON(), + "enum_form_string": enumFormString?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "enum_query_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), + "enum_query_double": enumQueryDouble?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "enum_header_string_array": enumHeaderStringArray?.encodeToJSON(), + "enum_header_string": enumHeaderString?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + Fake endpoint to test group parameters (optional) + + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Fake endpoint to test group parameters (optional) + - DELETE /fake + - Fake endpoint to test group parameters (optional) + - parameter requiredStringGroup: (query) Required String in group parameters + - parameter requiredBooleanGroup: (header) Required Boolean in group parameters + - parameter requiredInt64Group: (query) Required Integer in group parameters + - parameter stringGroup: (query) String in group parameters (optional) + - parameter booleanGroup: (header) Boolean in group parameters (optional) + - parameter int64Group: (query) Integer in group parameters (optional) + - returns: RequestBuilder + */ + open class func testGroupParametersWithRequestBuilder(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil) -> RequestBuilder { + let path = "/fake" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), + "int64_group": int64Group?.encodeToJSON() + ]) + let nillableHeaders: [String: Any?] = [ + "required_boolean_group": requiredBooleanGroup.encodeToJSON(), + "boolean_group": booleanGroup?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + test inline additionalProperties + + - parameter param: (body) request body + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + test inline additionalProperties + - POST /fake/inline-additionalProperties + - parameter param: (body) request body + - returns: RequestBuilder + */ + open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> RequestBuilder { + let path = "/fake/inline-additionalProperties" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + test json serialization of form data + + - parameter param: (form) field1 + - parameter param2: (form) field2 + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + test json serialization of form data + - GET /fake/jsonFormData + - parameter param: (form) field1 + - parameter param2: (form) field2 + - returns: RequestBuilder + */ + open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { + let path = "/fake/jsonFormData" + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "param": param.encodeToJSON(), + "param2": param2.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift new file mode 100644 index 0000000000..48cfe7187b --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -0,0 +1,51 @@ +// +// FakeClassnameTags123API.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class FakeClassnameTags123API { + /** + To test class name in snake case + + - parameter body: (body) client model + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + To test class name in snake case + - PATCH /fake_classname_test + - To test class name in snake case + - API Key: + - type: apiKey api_key_query (QUERY) + - name: api_key_query + - parameter body: (body) client model + - returns: RequestBuilder + */ + open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder { + let path = "/fake_classname_test" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "PATCH", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift new file mode 100644 index 0000000000..0552d4a6c1 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -0,0 +1,431 @@ +// +// PetAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class PetAPI { + /** + Add a new pet to the store + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Add a new pet to the store + - POST /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func addPetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Deletes a pet + + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Deletes a pet + - DELETE /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) Pet id to delete + - parameter apiKey: (header) (optional) + - returns: RequestBuilder + */ + open class func deletePetWithRequestBuilder(petId: Int64, apiKey: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + let nillableHeaders: [String: Any?] = [ + "api_key": apiKey?.encodeToJSON() + ] + let headerParameters = APIHelper.rejectNilHeaders(nillableHeaders) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters) + } + + /** + * enum for parameter status + */ + public enum Status_findPetsByStatus: String, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + + /** + Finds Pets by status + + - parameter status: (query) Status values that need to be considered for filter + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Finds Pets by status + - GET /pet/findByStatus + - Multiple status values can be provided with comma separated strings + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter status: (query) Status values that need to be considered for filter + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByStatus" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "status": status.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Finds Pets by tags + + - parameter tags: (query) Tags to filter by + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Finds Pets by tags + - GET /pet/findByTags + - Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter tags: (query) Tags to filter by + - returns: RequestBuilder<[Pet]> + */ + open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { + let path = "/pet/findByTags" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "tags": tags.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder<[Pet]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find pet by ID + + - parameter petId: (path) ID of pet to return + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Find pet by ID + - GET /pet/{petId} + - Returns a single pet + - API Key: + - type: apiKey api_key + - name: api_key + - parameter petId: (path) ID of pet to return + - returns: RequestBuilder + */ + open class func getPetByIdWithRequestBuilder(petId: Int64) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Update an existing pet + + - parameter body: (body) Pet object that needs to be added to the store + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Update an existing pet + - PUT /pet + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter body: (body) Pet object that needs to be added to the store + - returns: RequestBuilder + */ + open class func updatePetWithRequestBuilder(body: Pet) -> RequestBuilder { + let path = "/pet" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Updates a pet in the store with form data + + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Updates a pet in the store with form data + - POST /pet/{petId} + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet that needs to be updated + - parameter name: (form) Updated name of the pet (optional) + - parameter status: (form) Updated status of the pet (optional) + - returns: RequestBuilder + */ + open class func updatePetWithFormWithRequestBuilder(petId: Int64, name: String? = nil, status: String? = nil) -> RequestBuilder { + var path = "/pet/{petId}" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "name": name?.encodeToJSON(), + "status": status?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image + + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + uploads an image + - POST /pet/{petId}/uploadImage + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter file: (form) file to upload (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequestBuilder(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil) -> RequestBuilder { + var path = "/pet/{petId}/uploadImage" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "file": file?.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + uploads an image (required) + + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + uploads an image (required) + - POST /fake/{petId}/uploadImageWithRequiredFile + - OAuth: + - type: oauth2 + - name: petstore_auth + - parameter petId: (path) ID of pet to update + - parameter requiredFile: (form) file to upload + - parameter additionalMetadata: (form) Additional data to pass to server (optional) + - returns: RequestBuilder + */ + open class func uploadFileWithRequiredFileWithRequestBuilder(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil) -> RequestBuilder { + var path = "/fake/{petId}/uploadImageWithRequiredFile" + let petIdPreEscape = "\(APIHelper.mapValueToPathItem(petId))" + let petIdPostEscape = petIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{petId}", with: petIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let formParams: [String: Any?] = [ + "additionalMetadata": additionalMetadata?.encodeToJSON(), + "requiredFile": requiredFile.encodeToJSON() + ] + + let nonNullParameters = APIHelper.rejectNil(formParams) + let parameters = APIHelper.convertBoolToString(nonNullParameters) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift new file mode 100644 index 0000000000..a8a83eda39 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -0,0 +1,165 @@ +// +// StoreAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class StoreAPI { + /** + Delete purchase order by ID + + - parameter orderId: (path) ID of the order that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete purchase order by ID + - DELETE /store/order/{order_id} + - For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + - parameter orderId: (path) ID of the order that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteOrderWithRequestBuilder(orderId: String) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Returns pet inventories by status + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Returns pet inventories by status + - GET /store/inventory + - Returns a map of status codes to quantities + - API Key: + - type: apiKey api_key + - name: api_key + - returns: RequestBuilder<[String:Int]> + */ + open class func getInventoryWithRequestBuilder() -> RequestBuilder<[String: Int]> { + let path = "/store/inventory" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Find purchase order by ID + + - parameter orderId: (path) ID of pet that needs to be fetched + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Find purchase order by ID + - GET /store/order/{order_id} + - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - parameter orderId: (path) ID of pet that needs to be fetched + - returns: RequestBuilder + */ + open class func getOrderByIdWithRequestBuilder(orderId: Int64) -> RequestBuilder { + var path = "/store/order/{order_id}" + let orderIdPreEscape = "\(APIHelper.mapValueToPathItem(orderId))" + let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{order_id}", with: orderIdPostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Place an order for a pet + + - parameter body: (body) order placed for purchasing the pet + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Place an order for a pet + - POST /store/order + - parameter body: (body) order placed for purchasing the pet + - returns: RequestBuilder + */ + open class func placeOrderWithRequestBuilder(body: Order) -> RequestBuilder { + let path = "/store/order" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift new file mode 100644 index 0000000000..505ed1b0c5 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -0,0 +1,318 @@ +// +// UserAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class UserAPI { + /** + Create user + + - parameter body: (body) Created user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Create user + - POST /user + - This can only be done by the logged in user. + - parameter body: (body) Created user object + - returns: RequestBuilder + */ + open class func createUserWithRequestBuilder(body: User) -> RequestBuilder { + let path = "/user" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithArray + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithArrayInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithArray" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Creates list of users with given input array + + - parameter body: (body) List of user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Creates list of users with given input array + - POST /user/createWithList + - parameter body: (body) List of user object + - returns: RequestBuilder + */ + open class func createUsersWithListInputWithRequestBuilder(body: [User]) -> RequestBuilder { + let path = "/user/createWithList" + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + + /** + Delete user + + - parameter username: (path) The name that needs to be deleted + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Delete user + - DELETE /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) The name that needs to be deleted + - returns: RequestBuilder + */ + open class func deleteUserWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Get user by user name + + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get user by user name + - GET /user/{username} + - parameter username: (path) The name that needs to be fetched. Use user1 for testing. + - returns: RequestBuilder + */ + open class func getUserByNameWithRequestBuilder(username: String) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs user into the system + + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Logs user into the system + - GET /user/login + - responseHeaders: [X-Rate-Limit(Int), X-Expires-After(Date)] + - parameter username: (query) The user name for login + - parameter password: (query) The password for login in clear text + - returns: RequestBuilder + */ + open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { + let path = "/user/login" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "username": username.encodeToJSON(), + "password": password.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Logs out current logged in user session + + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Logs out current logged in user session + - GET /user/logout + - returns: RequestBuilder + */ + open class func logoutUserWithRequestBuilder() -> RequestBuilder { + let path = "/user/logout" + let URLString = PetstoreClientAPI.basePath + path + let parameters: [String: Any]? = nil + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + + /** + Updated user + + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in + switch result { + case .success: + completion((), nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Updated user + - PUT /user/{username} + - This can only be done by the logged in user. + - parameter username: (path) name that need to be deleted + - parameter body: (body) Updated user object + - returns: RequestBuilder + */ + open class func updateUserWithRequestBuilder(username: String, body: User) -> RequestBuilder { + var path = "/user/{username}" + let usernamePreEscape = "\(APIHelper.mapValueToPathItem(username))" + let usernamePostEscape = usernamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{username}", with: usernamePostEscape, options: .literal, range: nil) + let URLString = PetstoreClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + + let url = URLComponents(string: URLString) + + let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 0000000000..32e194f6ee --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + open class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + open class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 0000000000..627d9adb75 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 0000000000..74fcfcf2ad --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 0000000000..b79e9f5e64 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 0000000000..02f78ffb47 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 0000000000..b9757b6cbc --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,51 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +public enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift new file mode 100644 index 0000000000..1af0315359 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -0,0 +1,25 @@ +// +// AdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct AdditionalPropertiesClass: Codable { + + public var mapString: [String: String]? + public var mapMapString: [String: [String: String]]? + + public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + self.mapString = mapString + self.mapMapString = mapMapString + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapString = "map_string" + case mapMapString = "map_map_string" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift new file mode 100644 index 0000000000..5ed9f31e2a --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -0,0 +1,20 @@ +// +// Animal.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Animal: Codable { + + public var className: String + public var color: String? = "red" + + public init(className: String, color: String?) { + self.className = className + self.color = color + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift new file mode 100644 index 0000000000..e09b0e9efd --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -0,0 +1,10 @@ +// +// AnimalFarm.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift new file mode 100644 index 0000000000..ec270da890 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -0,0 +1,22 @@ +// +// ApiResponse.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ApiResponse: Codable { + + public var code: Int? + public var type: String? + public var message: String? + + public init(code: Int?, type: String?, message: String?) { + self.code = code + self.type = type + self.message = message + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift new file mode 100644 index 0000000000..6c252ed475 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfArrayOfNumberOnly: Codable { + + public var arrayArrayNumber: [[Double]]? + + public init(arrayArrayNumber: [[Double]]?) { + self.arrayArrayNumber = arrayArrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayArrayNumber = "ArrayArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift new file mode 100644 index 0000000000..e84eb5d650 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -0,0 +1,22 @@ +// +// ArrayOfNumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayOfNumberOnly: Codable { + + public var arrayNumber: [Double]? + + public init(arrayNumber: [Double]?) { + self.arrayNumber = arrayNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayNumber = "ArrayNumber" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift new file mode 100644 index 0000000000..d2140933d1 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -0,0 +1,28 @@ +// +// ArrayTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ArrayTest: Codable { + + public var arrayOfString: [String]? + public var arrayArrayOfInteger: [[Int64]]? + public var arrayArrayOfModel: [[ReadOnlyFirst]]? + + public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) { + self.arrayOfString = arrayOfString + self.arrayArrayOfInteger = arrayArrayOfInteger + self.arrayArrayOfModel = arrayArrayOfModel + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case arrayOfString = "array_of_string" + case arrayArrayOfInteger = "array_array_of_integer" + case arrayArrayOfModel = "array_array_of_model" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift new file mode 100644 index 0000000000..d1b3b27616 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -0,0 +1,38 @@ +// +// Capitalization.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Capitalization: Codable { + + public var smallCamel: String? + public var capitalCamel: String? + public var smallSnake: String? + public var capitalSnake: String? + public var sCAETHFlowPoints: String? + /** Name of the pet */ + public var ATT_NAME: String? + + public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) { + self.smallCamel = smallCamel + self.capitalCamel = capitalCamel + self.smallSnake = smallSnake + self.capitalSnake = capitalSnake + self.sCAETHFlowPoints = sCAETHFlowPoints + self.ATT_NAME = ATT_NAME + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case smallCamel + case capitalCamel = "CapitalCamel" + case smallSnake = "small_Snake" + case capitalSnake = "Capital_Snake" + case sCAETHFlowPoints = "SCA_ETH_Flow_Points" + case ATT_NAME + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift new file mode 100644 index 0000000000..7ab887f311 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -0,0 +1,22 @@ +// +// Cat.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Cat: Codable { + + public var className: String + public var color: String? = "red" + public var declawed: Bool? + + public init(className: String, color: String?, declawed: Bool?) { + self.className = className + self.color = color + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift new file mode 100644 index 0000000000..a51ad0dffa --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -0,0 +1,18 @@ +// +// CatAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct CatAllOf: Codable { + + public var declawed: Bool? + + public init(declawed: Bool?) { + self.declawed = declawed + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift new file mode 100644 index 0000000000..eb8f7e5e19 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -0,0 +1,20 @@ +// +// Category.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Category: Codable { + + public var id: Int64? + public var name: String = "default-name" + + public init(id: Int64?, name: String) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift new file mode 100644 index 0000000000..e2a7d4427a --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -0,0 +1,19 @@ +// +// ClassModel.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model with \"_class\" property */ +public struct ClassModel: Codable { + + public var _class: String? + + public init(_class: String?) { + self._class = _class + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift new file mode 100644 index 0000000000..00245ca372 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -0,0 +1,18 @@ +// +// Client.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Client: Codable { + + public var client: String? + + public init(client: String?) { + self.client = client + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift new file mode 100644 index 0000000000..492c122800 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -0,0 +1,22 @@ +// +// Dog.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Dog: Codable { + + public var className: String + public var color: String? = "red" + public var breed: String? + + public init(className: String, color: String?, breed: String?) { + self.className = className + self.color = color + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift new file mode 100644 index 0000000000..7786f8acc5 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -0,0 +1,18 @@ +// +// DogAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct DogAllOf: Codable { + + public var breed: String? + + public init(breed: String?) { + self.breed = breed + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift new file mode 100644 index 0000000000..9844e7c40e --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -0,0 +1,33 @@ +// +// EnumArrays.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumArrays: Codable { + + public enum JustSymbol: String, Codable, CaseIterable { + case greaterThanOrEqualTo = ">=" + case dollar = "$" + } + public enum ArrayEnum: String, Codable, CaseIterable { + case fish = "fish" + case crab = "crab" + } + public var justSymbol: JustSymbol? + public var arrayEnum: [ArrayEnum]? + + public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) { + self.justSymbol = justSymbol + self.arrayEnum = arrayEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justSymbol = "just_symbol" + case arrayEnum = "array_enum" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift new file mode 100644 index 0000000000..d4029d73f8 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -0,0 +1,14 @@ +// +// EnumClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum EnumClass: String, Codable, CaseIterable { + case abc = "_abc" + case efg = "-efg" + case xyz = "(xyz)" +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift new file mode 100644 index 0000000000..789f583e1d --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -0,0 +1,52 @@ +// +// EnumTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct EnumTest: Codable { + + public enum EnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumStringRequired: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + case empty = "" + } + public enum EnumInteger: Int, Codable, CaseIterable { + case _1 = 1 + case number1 = -1 + } + public enum EnumNumber: Double, Codable, CaseIterable { + case _11 = 1.1 + case number12 = -1.2 + } + public var enumString: EnumString? + public var enumStringRequired: EnumStringRequired + public var enumInteger: EnumInteger? + public var enumNumber: EnumNumber? + public var outerEnum: OuterEnum? + + public init(enumString: EnumString?, enumStringRequired: EnumStringRequired, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) { + self.enumString = enumString + self.enumStringRequired = enumStringRequired + self.enumInteger = enumInteger + self.enumNumber = enumNumber + self.outerEnum = outerEnum + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case enumString = "enum_string" + case enumStringRequired = "enum_string_required" + case enumInteger = "enum_integer" + case enumNumber = "enum_number" + case outerEnum + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift new file mode 100644 index 0000000000..abf3ccffc4 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -0,0 +1,20 @@ +// +// File.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Must be named `File` for test. */ +public struct File: Codable { + + /** Test capitalization */ + public var sourceURI: String? + + public init(sourceURI: String?) { + self.sourceURI = sourceURI + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift new file mode 100644 index 0000000000..532f145793 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -0,0 +1,20 @@ +// +// FileSchemaTestClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FileSchemaTestClass: Codable { + + public var file: File? + public var files: [File]? + + public init(file: File?, files: [File]?) { + self.file = file + self.files = files + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift new file mode 100644 index 0000000000..20bd6d103b --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -0,0 +1,42 @@ +// +// FormatTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct FormatTest: Codable { + + public var integer: Int? + public var int32: Int? + public var int64: Int64? + public var number: Double + public var float: Float? + public var double: Double? + public var string: String? + public var byte: Data + public var binary: URL? + public var date: Date + public var dateTime: Date? + public var uuid: UUID? + public var password: String + + public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: URL?, date: Date, dateTime: Date?, uuid: UUID?, password: String) { + self.integer = integer + self.int32 = int32 + self.int64 = int64 + self.number = number + self.float = float + self.double = double + self.string = string + self.byte = byte + self.binary = binary + self.date = date + self.dateTime = dateTime + self.uuid = uuid + self.password = password + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift new file mode 100644 index 0000000000..906ddb06fb --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -0,0 +1,20 @@ +// +// HasOnlyReadOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct HasOnlyReadOnly: Codable { + + public var bar: String? + public var foo: String? + + public init(bar: String?, foo: String?) { + self.bar = bar + self.foo = foo + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift new file mode 100644 index 0000000000..fe13d302cc --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -0,0 +1,22 @@ +// +// List.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct List: Codable { + + public var _123list: String? + + public init(_123list: String?) { + self._123list = _123list + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _123list = "123-list" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift new file mode 100644 index 0000000000..4b6037f378 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -0,0 +1,35 @@ +// +// MapTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MapTest: Codable { + + public enum MapOfEnumString: String, Codable, CaseIterable { + case upper = "UPPER" + case lower = "lower" + } + public var mapMapOfString: [String: [String: String]]? + public var mapOfEnumString: [String: String]? + public var directMap: [String: Bool]? + public var indirectMap: StringBooleanMap? + + public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, indirectMap: StringBooleanMap?) { + self.mapMapOfString = mapMapOfString + self.mapOfEnumString = mapOfEnumString + self.directMap = directMap + self.indirectMap = indirectMap + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case mapMapOfString = "map_map_of_string" + case mapOfEnumString = "map_of_enum_string" + case directMap = "direct_map" + case indirectMap = "indirect_map" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift new file mode 100644 index 0000000000..c3deb2f289 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -0,0 +1,22 @@ +// +// MixedPropertiesAndAdditionalPropertiesClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + + public var uuid: UUID? + public var dateTime: Date? + public var map: [String: Animal]? + + public init(uuid: UUID?, dateTime: Date?, map: [String: Animal]?) { + self.uuid = uuid + self.dateTime = dateTime + self.map = map + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift new file mode 100644 index 0000000000..b61db7d6e7 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -0,0 +1,26 @@ +// +// Model200Response.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name starting with number */ +public struct Model200Response: Codable { + + public var name: Int? + public var _class: String? + + public init(name: Int?, _class: String?) { + self.name = name + self._class = _class + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case _class = "class" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift new file mode 100644 index 0000000000..8ab4db44b7 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -0,0 +1,32 @@ +// +// Name.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing model name same as property name */ +public struct Name: Codable { + + public var name: Int + public var snakeCase: Int? + public var property: String? + public var _123number: Int? + + public init(name: Int, snakeCase: Int?, property: String?, _123number: Int?) { + self.name = name + self.snakeCase = snakeCase + self.property = property + self._123number = _123number + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case name + case snakeCase = "snake_case" + case property + case _123number = "123Number" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift new file mode 100644 index 0000000000..4d1dafcc2c --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -0,0 +1,22 @@ +// +// NumberOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct NumberOnly: Codable { + + public var justNumber: Double? + + public init(justNumber: Double?) { + self.justNumber = justNumber + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case justNumber = "JustNumber" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift new file mode 100644 index 0000000000..40c30cc860 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -0,0 +1,34 @@ +// +// Order.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Order: Codable { + + public enum Status: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" + } + public var id: Int64? + public var petId: Int64? + public var quantity: Int? + public var shipDate: Date? + /** Order Status */ + public var status: Status? + public var complete: Bool? = false + + public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) { + self.id = id + self.petId = petId + self.quantity = quantity + self.shipDate = shipDate + self.status = status + self.complete = complete + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift new file mode 100644 index 0000000000..18c3a024f1 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -0,0 +1,28 @@ +// +// OuterComposite.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct OuterComposite: Codable { + + public var myNumber: Double? + public var myString: String? + public var myBoolean: Bool? + + public init(myNumber: Double?, myString: String?, myBoolean: Bool?) { + self.myNumber = myNumber + self.myString = myString + self.myBoolean = myBoolean + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case myNumber = "my_number" + case myString = "my_string" + case myBoolean = "my_boolean" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift new file mode 100644 index 0000000000..c3b778cbbe --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -0,0 +1,14 @@ +// +// OuterEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum OuterEnum: String, Codable, CaseIterable { + case placed = "placed" + case approved = "approved" + case delivered = "delivered" +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift new file mode 100644 index 0000000000..b9ce0e9332 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -0,0 +1,34 @@ +// +// Pet.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Pet: Codable { + + public enum Status: String, Codable, CaseIterable { + case available = "available" + case pending = "pending" + case sold = "sold" + } + public var id: Int64? + public var category: Category? + public var name: String + public var photoUrls: [String] + public var tags: [Tag]? + /** pet status in the store */ + public var status: Status? + + public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) { + self.id = id + self.category = category + self.name = name + self.photoUrls = photoUrls + self.tags = tags + self.status = status + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift new file mode 100644 index 0000000000..0acd21fd10 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -0,0 +1,20 @@ +// +// ReadOnlyFirst.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct ReadOnlyFirst: Codable { + + public var bar: String? + public var baz: String? + + public init(bar: String?, baz: String?) { + self.bar = bar + self.baz = baz + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift new file mode 100644 index 0000000000..c223f993a6 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -0,0 +1,23 @@ +// +// Return.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Model for testing reserved words */ +public struct Return: Codable { + + public var _return: Int? + + public init(_return: Int?) { + self._return = _return + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case _return = "return" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift new file mode 100644 index 0000000000..6e8650f76d --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -0,0 +1,22 @@ +// +// SpecialModelName.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SpecialModelName: Codable { + + public var specialPropertyName: Int64? + + public init(specialPropertyName: Int64?) { + self.specialPropertyName = specialPropertyName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case specialPropertyName = "$special[property.name]" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift new file mode 100644 index 0000000000..3f1237fee4 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -0,0 +1,45 @@ +// +// StringBooleanMap.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct StringBooleanMap: Codable { + + public var additionalProperties: [String: Bool] = [:] + + public subscript(key: String) -> Bool? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift new file mode 100644 index 0000000000..4dd8a9a9f5 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -0,0 +1,20 @@ +// +// Tag.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct Tag: Codable { + + public var id: Int64? + public var name: String? + + public init(id: Int64?, name: String?) { + self.id = id + self.name = name + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift new file mode 100644 index 0000000000..a9e088808e --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -0,0 +1,34 @@ +// +// TypeHolderDefault.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderDefault: Codable { + + public var stringItem: String = "what" + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool = true + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift new file mode 100644 index 0000000000..dff4083ae4 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -0,0 +1,34 @@ +// +// TypeHolderExample.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct TypeHolderExample: Codable { + + public var stringItem: String + public var numberItem: Double + public var integerItem: Int + public var boolItem: Bool + public var arrayItem: [Int] + + public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) { + self.stringItem = stringItem + self.numberItem = numberItem + self.integerItem = integerItem + self.boolItem = boolItem + self.arrayItem = arrayItem + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case stringItem = "string_item" + case numberItem = "number_item" + case integerItem = "integer_item" + case boolItem = "bool_item" + case arrayItem = "array_item" + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift new file mode 100644 index 0000000000..79f271ed73 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -0,0 +1,33 @@ +// +// User.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct User: Codable { + + public var id: Int64? + public var username: String? + public var firstName: String? + public var lastName: String? + public var email: String? + public var password: String? + public var phone: String? + /** User Status */ + public var userStatus: Int? + + public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) { + self.id = id + self.username = username + self.firstName = firstName + self.lastName = lastName + self.email = email + self.password = password + self.phone = phone + self.userStatus = userStatus + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 0000000000..e06208074c --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +public class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override public func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift new file mode 100644 index 0000000000..9e552cce09 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -0,0 +1,544 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +open class URLSessionRequestBuilder: RequestBuilder { + + let progress = Progress() + + private var observation: NSKeyValueObservation? + + deinit { + observation?.invalidate() + } + + fileprivate let sessionDelegate = SessionDelegate() + + /** + May be assigned if you want to control the authentication challenges. + */ + public var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - intercept and handle errors like authorization + - retry the request. + */ + public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the URLSession + configuration. + */ + open func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + + guard let url = URL(string: URLString) else { + throw DownloadException.requestMissingURL + } + + var originalRequest = URLRequest(url: url) + + originalRequest.httpMethod = method.rawValue + + buildHeaders().forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + headers.forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) + + return modifiedRequest + } + + override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { + let urlSessionId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + let parameters: [String: Any] = self.parameters ?? [:] + + let fileKeys = parameters.filter { $1 is NSURL } + .map { $0.0 } + + let encoding: ParameterEncoding + if fileKeys.count > 0 { + encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) + } else if isBody { + encoding = JSONDataEncoding() + } else { + encoding = URLEncoding() + } + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsuported Http method - \(method)") + } + + let cleanupRequest = { + urlSessionStore[urlSessionId] = nil + self.observation?.invalidate() + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in + + guard let self = self else { return } + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in + + guard let self = self else { return } + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { + observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in + self.progress.totalUnitCount = newProgress.totalUnitCount + self.progress.completedUnitCount = newProgress.completedUnitCount + } + + onProgressReady?(progress) + } + + dataTask.resume() + + } catch { + apiResponseQueue.async { + cleanupRequest() + completion(.failure(ErrorResponse.error(415, nil, error))) + } + } + + } + + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: httpResponse, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, data, error))) + } + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = PetstoreClientAPI.customHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + case is Data.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + guard let data = data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + } + } +} + +private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + + var credential: URLCredential? + + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +public protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +private class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +private class FileUploadEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + for (k, v) in parameters ?? [:] { + switch v { + case let fileURL as URL: + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: fileURL.lastPathComponent, data: fileData, mimeType: mimetype) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, name: String, data: Data, mimeType: String?) -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody ?? Data() + + // https://stackoverflow.com/a/26163136/976628 + let boundary = "Boundary-\(UUID().uuidString)" + urlRequest.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") + + body.append("--\(boundary)\r\n") + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(name)\"\r\n") + + if let mimeType = mimeType { + body.append("Content-Type: \(mimeType)\r\n\r\n") + } + + body.append(data) + + body.append("\r\n") + + body.append("--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +fileprivate extension Data { + /// Append string to NSMutableData + /// + /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to NSData, and then add that data to the NSMutableData, this wraps it in a nice convenient little extension to NSMutableData. This converts using UTF-8. + /// + /// - parameter string: The string to be added to the `NSMutableData`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/README.md b/samples/client/petstore/swift5/urlsessionLibrary/README.md new file mode 100644 index 0000000000..a50bf382e3 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/README.md @@ -0,0 +1,141 @@ +# Swift5 API client for PetstoreClient + +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeAPI* | [**call123testSpecialTags**](docs/AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeAPI* | [**fakeOuterBooleanSerialize**](docs/FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeAPI* | [**fakeOuterCompositeSerialize**](docs/FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeAPI* | [**fakeOuterNumberSerialize**](docs/FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeAPI* | [**fakeOuterStringSerialize**](docs/FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeAPI* | [**testBodyWithFileSchema**](docs/FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeAPI* | [**testBodyWithQueryParams**](docs/FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeAPI* | [**testClientModel**](docs/FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeAPI* | [**testEndpointParameters**](docs/FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeAPI* | [**testEnumParameters**](docs/FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeAPI* | [**testGroupParameters**](docs/FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeAPI* | [**testInlineAdditionalProperties**](docs/FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeAPI* | [**testJsonFormData**](docs/FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeClassnameTags123API* | [**testClassname**](docs/FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetAPI* | [**addPet**](docs/PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +*PetAPI* | [**deletePet**](docs/PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetAPI* | [**findPetsByStatus**](docs/PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetAPI* | [**findPetsByTags**](docs/PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetAPI* | [**getPetById**](docs/PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetAPI* | [**updatePet**](docs/PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +*PetAPI* | [**updatePetWithForm**](docs/PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetAPI* | [**uploadFile**](docs/PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetAPI* | [**uploadFileWithRequiredFile**](docs/PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreAPI* | [**deleteOrder**](docs/StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreAPI* | [**getInventory**](docs/StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreAPI* | [**getOrderById**](docs/StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreAPI* | [**placeOrder**](docs/StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserAPI* | [**createUser**](docs/UserAPI.md#createuser) | **POST** /user | Create user +*UserAPI* | [**createUsersWithArrayInput**](docs/UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserAPI* | [**createUsersWithListInput**](docs/UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserAPI* | [**deleteUser**](docs/UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserAPI* | [**getUserByName**](docs/UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserAPI* | [**loginUser**](docs/UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +*UserAPI* | [**logoutUser**](docs/UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**updateUser**](docs/UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Cat](docs/Cat.md) + - [CatAllOf](docs/CatAllOf.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [Dog](docs/Dog.md) + - [DogAllOf](docs/DogAllOf.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [EnumTest](docs/EnumTest.md) + - [File](docs/File.md) + - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [FormatTest](docs/FormatTest.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [List](docs/List.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](docs/Model200Response.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [SpecialModelName](docs/SpecialModelName.md) + - [StringBooleanMap](docs/StringBooleanMap.md) + - [Tag](docs/Tag.md) + - [TypeHolderDefault](docs/TypeHolderDefault.md) + - [TypeHolderExample](docs/TypeHolderExample.md) + - [User](docs/User.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + + +## Author + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/.gitignore b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/.gitignore new file mode 100644 index 0000000000..0269c2f56d --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/.gitignore @@ -0,0 +1,72 @@ +### https://raw.github.com/github/gitignore/7792e50daeaa6c07460484704671d1dc9f0045a7/Swift.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/Podfile b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/Podfile new file mode 100644 index 0000000000..77432f9eee --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/Podfile @@ -0,0 +1,13 @@ +platform :ios, '9.0' + +source 'https://cdn.cocoapods.org/' + +use_frameworks! + +target 'SwaggerClient' do + pod "PetstoreClient", :path => "../" + + target 'SwaggerClientTests' do + inherit! :search_paths + end +end diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/Podfile.lock b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/Podfile.lock new file mode 100644 index 0000000000..8749d25339 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - PetstoreClient (1.0.0) + +DEPENDENCIES: + - PetstoreClient (from `../`) + +EXTERNAL SOURCES: + PetstoreClient: + :path: "../" + +SPEC CHECKSUMS: + PetstoreClient: b26b235a3ece06dbf1da99dc67e48aa201659f21 + +PODFILE CHECKSUM: 509bec696cc1d8641751b52e4fe4bef04ac4542c + +COCOAPODS: 1.8.4 diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..91b653b9d3 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj @@ -0,0 +1,554 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1A501F48219C3DC600F372F6 /* DateFormatTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */; }; + 23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */; }; + 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */; }; + 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB961C692C6300B96B06 /* ViewController.swift */; }; + 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB981C692C6300B96B06 /* Main.storyboard */; }; + 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */; }; + 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */; }; + 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */; }; + 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */; }; + 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */; }; + FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6D4EFB891C692C6300B96B06 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6D4EFB901C692C6300B96B06; + remoteInfo = SwaggerClient; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = ""; }; + 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateFormatTests.swift; sourceTree = ""; }; + 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 6D4EFB961C692C6300B96B06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 6D4EFB991C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 6D4EFB9E1C692C6300B96B06 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 6D4EFBA01C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwaggerClientTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D4EFBAB1C692C6300B96B06 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = ""; }; + 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = ""; }; + 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = ""; }; + 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = ""; }; + C07EC0A94AA0F86D60668B32 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = ""; }; + ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6D4EFB8E1C692C6300B96B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA21C692C6300B96B06 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 203D4495376E4EB72474B091 /* Pods */ = { + isa = PBXGroup; + children = ( + 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */, + ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */, + E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */, + ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 3FABC56EC0BA84CBF4F99564 /* Frameworks */ = { + isa = PBXGroup; + children = ( + C07EC0A94AA0F86D60668B32 /* Pods.framework */, + 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */, + 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6D4EFB881C692C6300B96B06 = { + isa = PBXGroup; + children = ( + 6D4EFB931C692C6300B96B06 /* SwaggerClient */, + 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */, + 6D4EFB921C692C6300B96B06 /* Products */, + 3FABC56EC0BA84CBF4F99564 /* Frameworks */, + 203D4495376E4EB72474B091 /* Pods */, + ); + sourceTree = ""; + }; + 6D4EFB921C692C6300B96B06 /* Products */ = { + isa = PBXGroup; + children = ( + 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */, + 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 6D4EFB931C692C6300B96B06 /* SwaggerClient */ = { + isa = PBXGroup; + children = ( + 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */, + 6D4EFB961C692C6300B96B06 /* ViewController.swift */, + 6D4EFB981C692C6300B96B06 /* Main.storyboard */, + 6D4EFB9B1C692C6300B96B06 /* Assets.xcassets */, + 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */, + 6D4EFBA01C692C6300B96B06 /* Info.plist */, + ); + path = SwaggerClient; + sourceTree = ""; + }; + 6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */ = { + isa = PBXGroup; + children = ( + 6D4EFBAB1C692C6300B96B06 /* Info.plist */, + 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */, + 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */, + 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */, + 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */, + ); + path = SwaggerClientTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 6D4EFB901C692C6300B96B06 /* SwaggerClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */; + buildPhases = ( + 5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */, + 6D4EFB8D1C692C6300B96B06 /* Sources */, + 6D4EFB8E1C692C6300B96B06 /* Frameworks */, + 6D4EFB8F1C692C6300B96B06 /* Resources */, + FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwaggerClient; + productName = SwaggerClient; + productReference = 6D4EFB911C692C6300B96B06 /* SwaggerClient.app */; + productType = "com.apple.product-type.application"; + }; + 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */; + buildPhases = ( + EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */, + 6D4EFBA11C692C6300B96B06 /* Sources */, + 6D4EFBA21C692C6300B96B06 /* Frameworks */, + 6D4EFBA31C692C6300B96B06 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */, + ); + name = SwaggerClientTests; + productName = SwaggerClientTests; + productReference = 6D4EFBA51C692C6300B96B06 /* SwaggerClientTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6D4EFB891C692C6300B96B06 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = Swagger; + TargetAttributes = { + 6D4EFB901C692C6300B96B06 = { + CreatedOnToolsVersion = 7.2.1; + LastSwiftMigration = 1130; + }; + 6D4EFBA41C692C6300B96B06 = { + CreatedOnToolsVersion = 7.2.1; + LastSwiftMigration = 1130; + TestTargetID = 6D4EFB901C692C6300B96B06; + }; + }; + }; + buildConfigurationList = 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 6D4EFB881C692C6300B96B06; + productRefGroup = 6D4EFB921C692C6300B96B06 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6D4EFB901C692C6300B96B06 /* SwaggerClient */, + 6D4EFBA41C692C6300B96B06 /* SwaggerClientTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 6D4EFB8F1C692C6300B96B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFB9F1C692C6300B96B06 /* LaunchScreen.storyboard in Resources */, + 6D4EFB9C1C692C6300B96B06 /* Assets.xcassets in Resources */, + 6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA31C692C6300B96B06 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6D4EFB8D1C692C6300B96B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */, + 6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D4EFBA11C692C6300B96B06 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */, + 6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */, + 1A501F48219C3DC600F372F6 /* DateFormatTests.swift in Sources */, + 6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 6D4EFBA71C692C6300B96B06 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6D4EFB901C692C6300B96B06 /* SwaggerClient */; + targetProxy = 6D4EFBA61C692C6300B96B06 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 6D4EFB981C692C6300B96B06 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6D4EFB991C692C6300B96B06 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 6D4EFB9D1C692C6300B96B06 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6D4EFB9E1C692C6300B96B06 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 6D4EFBAC1C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 6D4EFBAD1C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 6D4EFBAF1C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 6D4EFBB01C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = SwaggerClient/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 6D4EFBB21C692C6300B96B06 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Debug; + }; + 6D4EFBB31C692C6300B96B06 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = SwaggerClientTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6D4EFB8C1C692C6300B96B06 /* Build configuration list for PBXProject "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBAC1C692C6300B96B06 /* Debug */, + 6D4EFBAD1C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBAF1C692C6300B96B06 /* Debug */, + 6D4EFBB01C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D4EFBB21C692C6300B96B06 /* Debug */, + 6D4EFBB31C692C6300B96B06 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6D4EFB891C692C6300B96B06 /* Project object */; +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme new file mode 100644 index 0000000000..617a081d97 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcodeproj/xcshareddata/xcschemes/SwaggerClient.xcscheme @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..9b3fa18954 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift new file mode 100644 index 0000000000..b1896774c7 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/AppDelegate.swift @@ -0,0 +1,43 @@ +// +// AppDelegate.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..1d060ed288 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..2e721e1833 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..3a2a49bad8 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Info.plist b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Info.plist new file mode 100644 index 0000000000..bb71d00fa8 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/Info.plist @@ -0,0 +1,59 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift new file mode 100644 index 0000000000..8dad16b10f --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClient/ViewController.swift @@ -0,0 +1,23 @@ +// +// ViewController.swift +// SwaggerClient +// +// Created by Joseph Zuromski on 2/8/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift new file mode 100644 index 0000000000..e18a104f3a --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/DateFormatTests.swift @@ -0,0 +1,114 @@ +// +// DateFormatTests.swift +// SwaggerClientTests +// +// Created by James on 14/11/2018. +// Copyright © 2018 Swagger. All rights reserved. +// + +import Foundation +import XCTest +@testable import PetstoreClient +@testable import SwaggerClient + +class DateFormatTests: XCTestCase { + + struct DateTest: Codable { + let date: Date + } + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testEncodeToJSONAlwaysResultsInUTCEncodedDate() { + var dateComponents = DateComponents() + dateComponents.calendar = Calendar(identifier: .gregorian) + dateComponents.year = 2018 + dateComponents.month = 11 + dateComponents.day = 14 + dateComponents.hour = 11 + dateComponents.minute = 35 + dateComponents.second = 43 + dateComponents.nanosecond = 500 + + // Testing a date with a timezone of +00:00 (UTC) + dateComponents.timeZone = TimeZone(secondsFromGMT: 0) + XCTAssert(dateComponents.isValidDate) + + guard let utcDate = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + var encodedDate = utcDate.encodeToJSON() as! String + XCTAssert(encodedDate.hasSuffix("Z")) + + // test with a positive timzone offset from UTC + dateComponents.timeZone = TimeZone(secondsFromGMT: 60 * 60) // +01:00 + XCTAssert(dateComponents.isValidDate) + + guard let nonUTCDate1 = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + encodedDate = nonUTCDate1.encodeToJSON() as! String + XCTAssert(encodedDate.hasSuffix("Z")) + + // test with a negative timzone offset from UTC + dateComponents.timeZone = TimeZone(secondsFromGMT: -(60 * 60)) // -01:00 + XCTAssert(dateComponents.isValidDate) + + guard let nonUTCDate2 = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + encodedDate = nonUTCDate2.encodeToJSON() as! String + XCTAssert(encodedDate.hasSuffix("Z")) + } + + func testCodableAlwaysResultsInUTCEncodedDate() throws { + CodableHelper.jsonEncoder.outputFormatting.remove(.prettyPrinted) + let jsonData = "{\"date\":\"1970-01-01T00:00:00.000Z\"}".data(using: .utf8)! + let decodeResult = CodableHelper.decode(DateTest.self, from: jsonData) + _ = try decodeResult.get() + + var dateComponents = DateComponents() + dateComponents.calendar = Calendar(identifier: .gregorian) + dateComponents.year = 1970 + dateComponents.month = 01 + dateComponents.day = 01 + dateComponents.hour = 00 + dateComponents.minute = 00 + dateComponents.second = 00 + + // Testing a date with a timezone of +00:00 (UTC) + dateComponents.timeZone = TimeZone(secondsFromGMT: 0) + XCTAssert(dateComponents.isValidDate) + + guard let date = dateComponents.date else { + XCTFail("Couldn't get a valid date") + return + } + + let dateTest = DateTest(date: date) + let encodeResult = CodableHelper.encode(dateTest) + let data = try encodeResult.get() + guard let jsonString = String(data: data, encoding: .utf8) else { + XCTFail("Unable to convert encoded data to string.") + return + } + + let exampleJSONString = "{\"date\":\"1970-01-01T00:00:00.000Z\"}" + XCTAssert(jsonString == exampleJSONString, "Encoded JSON String: \(jsonString) should match: \(exampleJSONString)") + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist new file mode 100644 index 0000000000..802f84f540 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSAppTransportSecurity + + NSExceptionDomains + + petstore.swagger.io + + + NSTemporaryExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift new file mode 100644 index 0000000000..6be5bc6d29 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/PetAPITests.swift @@ -0,0 +1,80 @@ +// +// PetAPITests.swift +// SwaggerClient +// +// Created by Robin Eggenkamp on 5/21/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import XCTest +@testable import SwaggerClient + +class PetAPITests: XCTestCase { + + let testTimeout = 10.0 + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func test1CreatePet() { + let expectation = self.expectation(description: "testCreatePet") + let category = PetstoreClient.Category(id: 1234, name: "eyeColor") + let tags = [Tag(id: 1234, name: "New York"), Tag(id: 124321, name: "Jose")] + let newPet = Pet(id: 1000, category: category, name: "Fluffy", photoUrls: ["https://petstore.com/sample/photo1.jpg", "https://petstore.com/sample/photo2.jpg"], tags: tags, status: .available) + + PetAPI.addPet(body: newPet) { (_, error) in + guard error == nil else { + XCTFail("error creating pet") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetPet() { + let expectation = self.expectation(description: "testGetPet") + + PetAPI.getPetById(petId: 1000) { (pet, error) in + guard error == nil else { + XCTFail("error retrieving pet") + return + } + + if let pet = pet { + XCTAssert(pet.id == 1000, "invalid id") + XCTAssert(pet.name == "Fluffy", "invalid name") + + expectation.fulfill() + } + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeletePet() { + let expectation = self.expectation(description: "testDeletePet") + + PetAPI.deletePet(petId: 1000) { (_, error) in + guard error == nil else { + XCTFail("error deleting pet") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift new file mode 100644 index 0000000000..c49f47eee0 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/StoreAPITests.swift @@ -0,0 +1,120 @@ +// +// StoreAPITests.swift +// SwaggerClient +// +// Created by Robin Eggenkamp on 5/21/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import XCTest +@testable import SwaggerClient + +class StoreAPITests: XCTestCase { + + let isoDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ" + + let testTimeout = 10.0 + + func test1PlaceOrder() { + // use explicit naming to reference the enum so that we test we don't regress on enum naming + let shipDate = Date() + let order = Order(id: 1000, petId: 1000, quantity: 10, shipDate: shipDate, status: .placed, complete: true) + let expectation = self.expectation(description: "testPlaceOrder") + + StoreAPI.placeOrder(body: order) { (order, error) in + guard error == nil else { + XCTFail("error placing order: \(error.debugDescription)") + return + } + + if let order = order { + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + XCTAssert(order.shipDate!.isEqual(shipDate, format: self.isoDateFormat), + "Date should be idempotent") + + expectation.fulfill() + } + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test2GetOrder() { + let expectation = self.expectation(description: "testGetOrder") + + StoreAPI.getOrderById(orderId: 1000) { (order, error) in + guard error == nil else { + XCTFail("error retrieving order: \(error.debugDescription)") + return + } + + if let order = order { + XCTAssert(order.id == 1000, "invalid id") + XCTAssert(order.quantity == 10, "invalid quantity") + XCTAssert(order.status == .placed, "invalid status") + + expectation.fulfill() + } + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func test3DeleteOrder() { + let expectation = self.expectation(description: "testDeleteOrder") + + StoreAPI.deleteOrder(orderId: "1000") { (response, error) in + guard error == nil else { + XCTFail("error deleting order") + return + } + + guard let _ = response else { + XCTFail("response is nil") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testDownloadProgress() { + let responseExpectation = self.expectation(description: "obtain response") + let progressExpectation = self.expectation(description: "obtain progress") + let requestBuilder = StoreAPI.getOrderByIdWithRequestBuilder(orderId: 1000) + + requestBuilder.onProgressReady = { (progress) in + progressExpectation.fulfill() + } + + requestBuilder.execute { _ in + responseExpectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + +} + +private extension Date { + + /** + Returns true if the dates are equal given the format string. + + - parameter date: The date to compare to. + - parameter format: The format string to use to compare. + + - returns: true if the dates are equal, given the format string. + */ + func isEqual(_ date: Date, format: String) -> Bool { + let fmt = DateFormatter() + fmt.dateFormat = format + return fmt.string(from: self).isEqual(fmt.string(from: date)) + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift new file mode 100644 index 0000000000..0a1ca3902e --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift @@ -0,0 +1,67 @@ +// +// UserAPITests.swift +// SwaggerClient +// +// Created by Robin Eggenkamp on 5/21/16. +// Copyright © 2016 Swagger. All rights reserved. +// + +import PetstoreClient +import XCTest +@testable import SwaggerClient + +class UserAPITests: XCTestCase { + + let testTimeout = 10.0 + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testLogin() { + let expectation = self.expectation(description: "testLogin") + + UserAPI.loginUser(username: "swiftTester", password: "swift") { (_, error) in + guard error == nil else { + XCTFail("error logging in") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testLogout() { + let expectation = self.expectation(description: "testLogout") + + UserAPI.logoutUser { (_, error) in + guard error == nil else { + XCTFail("error logging out") + return + } + + expectation.fulfill() + } + + self.waitForExpectations(timeout: testTimeout, handler: nil) + } + + func testPathParamsAreEscaped() { + // The path for this operation is /user/{userId}. In order to make a usable path, + // then we must make sure that {userId} is percent-escaped when it is substituted + // into the path. So we intentionally introduce a path with spaces. + let userRequestBuilder = UserAPI.getUserByNameWithRequestBuilder(username: "User Name With Spaces") + let urlContainsSpace = userRequestBuilder.URLString.contains(" ") + + XCTAssert(!urlContainsSpace, "Expected URL to be escaped, but it was not.") + } + +} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/pom.xml b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/pom.xml new file mode 100644 index 0000000000..bdaa6b98af --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift4PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift4 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_xcodebuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/run_xcodebuild.sh b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/run_xcodebuild.sh new file mode 100755 index 0000000000..19e1e06dad --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/SwaggerClientTests/run_xcodebuild.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +pod install + +xcodebuild clean build build-for-testing -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" && xcodebuild test-without-building -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 8,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/AdditionalPropertiesClass.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/AdditionalPropertiesClass.md new file mode 100644 index 0000000000..e22d28be1d --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapString** | **[String:String]** | | [optional] +**mapMapString** | [String:[String:String]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Animal.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Animal.md new file mode 100644 index 0000000000..69c601455c --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **String** | | +**color** | **String** | | [optional] [default to "red"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/AnimalFarm.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/AnimalFarm.md new file mode 100644 index 0000000000..df6bab21da --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/AnotherFakeAPI.md new file mode 100644 index 0000000000..aead5f1f98 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/AnotherFakeAPI.md @@ -0,0 +1,59 @@ +# AnotherFakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeAPI.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +```swift + open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test special tags +AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/ApiResponse.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/ApiResponse.md new file mode 100644 index 0000000000..c6d9768fe9 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**type** | **String** | | [optional] +**message** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 0000000000..c6fceff5e0 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayArrayNumber** | [[Double]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayOfNumberOnly.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayOfNumberOnly.md new file mode 100644 index 0000000000..f09f8fa6f7 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayNumber** | **[Double]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayTest.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayTest.md new file mode 100644 index 0000000000..bf416b8330 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **[String]** | | [optional] +**arrayArrayOfInteger** | [[Int64]] | | [optional] +**arrayArrayOfModel** | [[ReadOnlyFirst]] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Capitalization.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Capitalization.md new file mode 100644 index 0000000000..95374216c7 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Cat.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Cat.md new file mode 100644 index 0000000000..fb5949b157 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Cat.md @@ -0,0 +1,10 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/CatAllOf.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/CatAllOf.md new file mode 100644 index 0000000000..79789be61c --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/CatAllOf.md @@ -0,0 +1,10 @@ +# CatAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**declawed** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Category.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Category.md new file mode 100644 index 0000000000..5ca5408c0f --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [default to "default-name"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/ClassModel.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/ClassModel.md new file mode 100644 index 0000000000..e3912fdf0f --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Client.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Client.md new file mode 100644 index 0000000000..0de1b238c3 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Dog.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Dog.md new file mode 100644 index 0000000000..4824786da0 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Dog.md @@ -0,0 +1,10 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/DogAllOf.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/DogAllOf.md new file mode 100644 index 0000000000..9302ef52e9 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/DogAllOf.md @@ -0,0 +1,10 @@ +# DogAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**breed** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/EnumArrays.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/EnumArrays.md new file mode 100644 index 0000000000..b9a9807d3c --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/EnumClass.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/EnumClass.md new file mode 100644 index 0000000000..67f017becd --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/EnumTest.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/EnumTest.md new file mode 100644 index 0000000000..bc9b036dd7 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/EnumTest.md @@ -0,0 +1,14 @@ +# EnumTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **Int** | | [optional] +**enumNumber** | **Double** | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md new file mode 100644 index 0000000000..49d4d3fb6a --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeAPI.md @@ -0,0 +1,662 @@ +# FakeAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeAPI.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeAPI.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeAPI.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeAPI.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**testBodyWithFileSchema**](FakeAPI.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeAPI.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeAPI.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeAPI.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeAPI.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeAPI.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeAPI.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testJsonFormData**](FakeAPI.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data + + +# **fakeOuterBooleanSerialize** +```swift + open class func fakeOuterBooleanSerialize(body: Bool? = nil, completion: @escaping (_ data: Bool?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer boolean types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = false // Bool | Input boolean as post body (optional) + +FakeAPI.fakeOuterBooleanSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Bool** | Input boolean as post body | [optional] + +### Return type + +**Bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +```swift + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, completion: @escaping (_ data: OuterComposite?, _ error: Error?) -> Void) +``` + + + +Test serialization of object with outer number type + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = OuterComposite(myNumber: 123, myString: "myString_example", myBoolean: false) // OuterComposite | Input composite as post body (optional) + +FakeAPI.fakeOuterCompositeSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +```swift + open class func fakeOuterNumberSerialize(body: Double? = nil, completion: @escaping (_ data: Double?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer number types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = 987 // Double | Input number as post body (optional) + +FakeAPI.fakeOuterNumberSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **Double** | Input number as post body | [optional] + +### Return type + +**Double** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +```swift + open class func fakeOuterStringSerialize(body: String? = nil, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + + + +Test serialization of outer string types + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = "body_example" // String | Input string as post body (optional) + +FakeAPI.fakeOuterStringSerialize(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String** | Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +```swift + open class func testBodyWithFileSchema(body: FileSchemaTestClass, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +For this test, the body for this request much reference a schema named `File`. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = FileSchemaTestClass(file: File(sourceURI: "sourceURI_example"), files: [File(sourceURI: "sourceURI_example")]) // FileSchemaTestClass | + +FakeAPI.testBodyWithFileSchema(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +```swift + open class func testBodyWithQueryParams(query: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + + + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let query = "query_example" // String | +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | + +FakeAPI.testBodyWithQueryParams(query: query, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String** | | + **body** | [**User**](User.md) | | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +```swift + open class func testClientModel(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test \"client\" model + +To test \"client\" model + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test \"client\" model +FakeAPI.testClientModel(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +```swift + open class func testEndpointParameters(number: Double, double: Double, patternWithoutDelimiter: String, byte: Data, integer: Int? = nil, int32: Int? = nil, int64: Int64? = nil, float: Float? = nil, string: String? = nil, binary: URL? = nil, date: Date? = nil, dateTime: Date? = nil, password: String? = nil, callback: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let number = 987 // Double | None +let double = 987 // Double | None +let patternWithoutDelimiter = "patternWithoutDelimiter_example" // String | None +let byte = 987 // Data | None +let integer = 987 // Int | None (optional) +let int32 = 987 // Int | None (optional) +let int64 = 987 // Int64 | None (optional) +let float = 987 // Float | None (optional) +let string = "string_example" // String | None (optional) +let binary = URL(string: "https://example.com")! // URL | None (optional) +let date = Date() // Date | None (optional) +let dateTime = Date() // Date | None (optional) +let password = "password_example" // String | None (optional) +let callback = "callback_example" // String | None (optional) + +// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +FakeAPI.testEndpointParameters(number: number, double: double, patternWithoutDelimiter: patternWithoutDelimiter, byte: byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **Double** | None | + **double** | **Double** | None | + **patternWithoutDelimiter** | **String** | None | + **byte** | **Data** | None | + **integer** | **Int** | None | [optional] + **int32** | **Int** | None | [optional] + **int64** | **Int64** | None | [optional] + **float** | **Float** | None | [optional] + **string** | **String** | None | [optional] + **binary** | **URL** | None | [optional] + **date** | **Date** | None | [optional] + **dateTime** | **Date** | None | [optional] + **password** | **String** | None | [optional] + **callback** | **String** | None | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +```swift + open class func testEnumParameters(enumHeaderStringArray: [String]? = nil, enumHeaderString: EnumHeaderString_testEnumParameters? = nil, enumQueryStringArray: [String]? = nil, enumQueryString: EnumQueryString_testEnumParameters? = nil, enumQueryInteger: EnumQueryInteger_testEnumParameters? = nil, enumQueryDouble: EnumQueryDouble_testEnumParameters? = nil, enumFormStringArray: [String]? = nil, enumFormString: EnumFormString_testEnumParameters? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +To test enum parameters + +To test enum parameters + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let enumHeaderStringArray = ["enumHeaderStringArray_example"] // [String] | Header parameter enum test (string array) (optional) +let enumHeaderString = "enumHeaderString_example" // String | Header parameter enum test (string) (optional) (default to .efg) +let enumQueryStringArray = ["enumQueryStringArray_example"] // [String] | Query parameter enum test (string array) (optional) +let enumQueryString = "enumQueryString_example" // String | Query parameter enum test (string) (optional) (default to .efg) +let enumQueryInteger = 987 // Int | Query parameter enum test (double) (optional) +let enumQueryDouble = 987 // Double | Query parameter enum test (double) (optional) +let enumFormStringArray = ["inner_example"] // [String] | Form parameter enum test (string array) (optional) (default to .dollar) +let enumFormString = "enumFormString_example" // String | Form parameter enum test (string) (optional) (default to .efg) + +// To test enum parameters +FakeAPI.testEnumParameters(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**[String]**](String.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String** | Header parameter enum test (string) | [optional] [default to .efg] + **enumQueryStringArray** | [**[String]**](String.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **String** | Query parameter enum test (string) | [optional] [default to .efg] + **enumQueryInteger** | **Int** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **Double** | Query parameter enum test (double) | [optional] + **enumFormStringArray** | [**[String]**](String.md) | Form parameter enum test (string array) | [optional] [default to .dollar] + **enumFormString** | **String** | Form parameter enum test (string) | [optional] [default to .efg] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +```swift + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let requiredStringGroup = 987 // Int | Required String in group parameters +let requiredBooleanGroup = false // Bool | Required Boolean in group parameters +let requiredInt64Group = 987 // Int64 | Required Integer in group parameters +let stringGroup = 987 // Int | String in group parameters (optional) +let booleanGroup = false // Bool | Boolean in group parameters (optional) +let int64Group = 987 // Int64 | Integer in group parameters (optional) + +// Fake endpoint to test group parameters (optional) +FakeAPI.testGroupParameters(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **Int** | Required String in group parameters | + **requiredBooleanGroup** | **Bool** | Required Boolean in group parameters | + **requiredInt64Group** | **Int64** | Required Integer in group parameters | + **stringGroup** | **Int** | String in group parameters | [optional] + **booleanGroup** | **Bool** | Boolean in group parameters | [optional] + **int64Group** | **Int64** | Integer in group parameters | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +```swift + open class func testInlineAdditionalProperties(param: [String:String], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test inline additionalProperties + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "TODO" // [String:String] | request body + +// test inline additionalProperties +FakeAPI.testInlineAdditionalProperties(param: param) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | [**[String:String]**](String.md) | request body | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +```swift + open class func testJsonFormData(param: String, param2: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +test json serialization of form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let param = "param_example" // String | field1 +let param2 = "param2_example" // String | field2 + +// test json serialization of form data +FakeAPI.testJsonFormData(param: param, param2: param2) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String** | field1 | + **param2** | **String** | field2 | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeClassnameTags123API.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeClassnameTags123API.md new file mode 100644 index 0000000000..9f24b46edb --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FakeClassnameTags123API.md @@ -0,0 +1,59 @@ +# FakeClassnameTags123API + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123API.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +```swift + open class func testClassname(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) +``` + +To test class name in snake case + +To test class name in snake case + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Client(client: "client_example") // Client | client model + +// To test class name in snake case +FakeClassnameTags123API.testClassname(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/File.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/File.md new file mode 100644 index 0000000000..3edfef17b7 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/File.md @@ -0,0 +1,10 @@ +# File + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceURI** | **String** | Test capitalization | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FileSchemaTestClass.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FileSchemaTestClass.md new file mode 100644 index 0000000000..afdacc60b2 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FileSchemaTestClass.md @@ -0,0 +1,11 @@ +# FileSchemaTestClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**File**](File.md) | | [optional] +**files** | [File] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/FormatTest.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/FormatTest.md new file mode 100644 index 0000000000..f74d94f6c4 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/FormatTest.md @@ -0,0 +1,22 @@ +# FormatTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Int** | | [optional] +**int32** | **Int** | | [optional] +**int64** | **Int64** | | [optional] +**number** | **Double** | | +**float** | **Float** | | [optional] +**double** | **Double** | | [optional] +**string** | **String** | | [optional] +**byte** | **Data** | | +**binary** | **URL** | | [optional] +**date** | **Date** | | +**dateTime** | **Date** | | [optional] +**uuid** | **UUID** | | [optional] +**password** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/HasOnlyReadOnly.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/HasOnlyReadOnly.md new file mode 100644 index 0000000000..57b6e3a17e --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# HasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/List.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/List.md new file mode 100644 index 0000000000..b77718302e --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/List.md @@ -0,0 +1,10 @@ +# List + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_123list** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/MapTest.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/MapTest.md new file mode 100644 index 0000000000..56213c4113 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/MapTest.md @@ -0,0 +1,13 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [String:[String:String]] | | [optional] +**mapOfEnumString** | **[String:String]** | | [optional] +**directMap** | **[String:Bool]** | | [optional] +**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 0000000000..fcffb8ecdb --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **UUID** | | [optional] +**dateTime** | **Date** | | [optional] +**map** | [String:Animal] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Model200Response.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Model200Response.md new file mode 100644 index 0000000000..5865ea690c --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Model200Response.md @@ -0,0 +1,11 @@ +# Model200Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | [optional] +**_class** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Name.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Name.md new file mode 100644 index 0000000000..f7b180292c --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **Int** | | +**snakeCase** | **Int** | | [optional] [readonly] +**property** | **String** | | [optional] +**_123number** | **Int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/NumberOnly.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/NumberOnly.md new file mode 100644 index 0000000000..72bd361168 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justNumber** | **Double** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Order.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Order.md new file mode 100644 index 0000000000..15487f0117 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**petId** | **Int64** | | [optional] +**quantity** | **Int** | | [optional] +**shipDate** | **Date** | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **Bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/OuterComposite.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/OuterComposite.md new file mode 100644 index 0000000000..d6b3583bc3 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **Double** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **Bool** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/OuterEnum.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/OuterEnum.md new file mode 100644 index 0000000000..06d413b016 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Pet.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Pet.md new file mode 100644 index 0000000000..5c05f98fad --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photoUrls** | **[String]** | | +**tags** | [Tag] | | [optional] +**status** | **String** | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md new file mode 100644 index 0000000000..27efe08334 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/PetAPI.md @@ -0,0 +1,469 @@ +# PetAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetAPI.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetAPI.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetAPI.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetAPI.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetAPI.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetAPI.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetAPI.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetAPI.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetAPI.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +```swift + open class func addPet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Add a new pet to the store + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Add a new pet to the store +PetAPI.addPet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +```swift + open class func deletePet(petId: Int64, apiKey: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Deletes a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | Pet id to delete +let apiKey = "apiKey_example" // String | (optional) + +// Deletes a pet +PetAPI.deletePet(petId: petId, apiKey: apiKey) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | Pet id to delete | + **apiKey** | **String** | | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +```swift + open class func findPetsByStatus(status: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let status = ["status_example"] // [String] | Status values that need to be considered for filter + +// Finds Pets by status +PetAPI.findPetsByStatus(status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md) | Status values that need to be considered for filter | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +```swift + open class func findPetsByTags(tags: [String], completion: @escaping (_ data: [Pet]?, _ error: Error?) -> Void) +``` + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let tags = ["inner_example"] // [String] | Tags to filter by + +// Finds Pets by tags +PetAPI.findPetsByTags(tags: tags) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**[String]**](String.md) | Tags to filter by | + +### Return type + +[**[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +```swift + open class func getPetById(petId: Int64, completion: @escaping (_ data: Pet?, _ error: Error?) -> Void) +``` + +Find pet by ID + +Returns a single pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to return + +// Find pet by ID +PetAPI.getPetById(petId: petId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +```swift + open class func updatePet(body: Pet, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Update an existing pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Pet(id: 123, category: Category(id: 123, name: "name_example"), name: "name_example", photoUrls: ["photoUrls_example"], tags: [Tag(id: 123, name: "name_example")], status: "status_example") // Pet | Pet object that needs to be added to the store + +// Update an existing pet +PetAPI.updatePet(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +```swift + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updates a pet in the store with form data + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet that needs to be updated +let name = "name_example" // String | Updated name of the pet (optional) +let status = "status_example" // String | Updated status of the pet (optional) + +// Updates a pet in the store with form data +PetAPI.updatePetWithForm(petId: petId, name: name, status: status) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet that needs to be updated | + **name** | **String** | Updated name of the pet | [optional] + **status** | **String** | Updated status of the pet | [optional] + +### Return type + +Void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +```swift + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) +let file = URL(string: "https://example.com")! // URL | file to upload (optional) + +// uploads an image +PetAPI.uploadFile(petId: petId, additionalMetadata: additionalMetadata, file: file) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + **file** | **URL** | file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +```swift + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, completion: @escaping (_ data: ApiResponse?, _ error: Error?) -> Void) +``` + +uploads an image (required) + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let petId = 987 // Int64 | ID of pet to update +let requiredFile = URL(string: "https://example.com")! // URL | file to upload +let additionalMetadata = "additionalMetadata_example" // String | Additional data to pass to server (optional) + +// uploads an image (required) +PetAPI.uploadFileWithRequiredFile(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **Int64** | ID of pet to update | + **requiredFile** | **URL** | file to upload | + **additionalMetadata** | **String** | Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/ReadOnlyFirst.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/ReadOnlyFirst.md new file mode 100644 index 0000000000..ed537b8759 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Return.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Return.md new file mode 100644 index 0000000000..66d17c27c8 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_return** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/SpecialModelName.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/SpecialModelName.md new file mode 100644 index 0000000000..3ec27a38c2 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/SpecialModelName.md @@ -0,0 +1,10 @@ +# SpecialModelName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**specialPropertyName** | **Int64** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md new file mode 100644 index 0000000000..36365ca519 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md @@ -0,0 +1,206 @@ +# StoreAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreAPI.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreAPI.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreAPI.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreAPI.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +```swift + open class func deleteOrder(orderId: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = "orderId_example" // String | ID of the order that needs to be deleted + +// Delete purchase order by ID +StoreAPI.deleteOrder(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String** | ID of the order that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +```swift + open class func getInventory(completion: @escaping (_ data: [String:Int]?, _ error: Error?) -> Void) +``` + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Returns pet inventories by status +StoreAPI.getInventory() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**[String:Int]** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +```swift + open class func getOrderById(orderId: Int64, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let orderId = 987 // Int64 | ID of pet that needs to be fetched + +// Find purchase order by ID +StoreAPI.getOrderById(orderId: orderId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **Int64** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +```swift + open class func placeOrder(body: Order, completion: @escaping (_ data: Order?, _ error: Error?) -> Void) +``` + +Place an order for a pet + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = Order(id: 123, petId: 123, quantity: 123, shipDate: Date(), status: "status_example", complete: false) // Order | order placed for purchasing the pet + +// Place an order for a pet +StoreAPI.placeOrder(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/StringBooleanMap.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/StringBooleanMap.md new file mode 100644 index 0000000000..7abf11ec68 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/StringBooleanMap.md @@ -0,0 +1,9 @@ +# StringBooleanMap + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/Tag.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/Tag.md new file mode 100644 index 0000000000..ff4ac8aa45 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**name** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/TypeHolderDefault.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/TypeHolderDefault.md new file mode 100644 index 0000000000..5161394bdc --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/TypeHolderDefault.md @@ -0,0 +1,14 @@ +# TypeHolderDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | [default to "what"] +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | [default to true] +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/TypeHolderExample.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/TypeHolderExample.md new file mode 100644 index 0000000000..46d0471cd7 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/TypeHolderExample.md @@ -0,0 +1,14 @@ +# TypeHolderExample + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stringItem** | **String** | | +**numberItem** | **Double** | | +**integerItem** | **Int** | | +**boolItem** | **Bool** | | +**arrayItem** | **[Int]** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/User.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/User.md new file mode 100644 index 0000000000..5a439de0ff --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Int64** | | [optional] +**username** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userStatus** | **Int** | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/UserAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/UserAPI.md new file mode 100644 index 0000000000..380813bc68 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/UserAPI.md @@ -0,0 +1,406 @@ +# UserAPI + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserAPI.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserAPI.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserAPI.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserAPI.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserAPI.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserAPI.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserAPI.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserAPI.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +```swift + open class func createUser(body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Create user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Created user object + +// Create user +UserAPI.createUser(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +```swift + open class func createUsersWithArrayInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithArrayInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +```swift + open class func createUsersWithListInput(body: [User], completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Creates list of users with given input array + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let body = [User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123)] // [User] | List of user object + +// Creates list of users with given input array +UserAPI.createUsersWithListInput(body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**[User]**](User.md) | List of user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +```swift + open class func deleteUser(username: String, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Delete user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be deleted + +// Delete user +UserAPI.deleteUser(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be deleted | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +```swift + open class func getUserByName(username: String, completion: @escaping (_ data: User?, _ error: Error?) -> Void) +``` + +Get user by user name + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The name that needs to be fetched. Use user1 for testing. + +// Get user by user name +UserAPI.getUserByName(username: username) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +```swift + open class func loginUser(username: String, password: String, completion: @escaping (_ data: String?, _ error: Error?) -> Void) +``` + +Logs user into the system + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | The user name for login +let password = "password_example" // String | The password for login in clear text + +// Logs user into the system +UserAPI.loginUser(username: username, password: password) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | The user name for login | + **password** | **String** | The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +```swift + open class func logoutUser(completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Logs out current logged in user session + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + + +// Logs out current logged in user session +UserAPI.logoutUser() { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +```swift + open class func updateUser(username: String, body: User, completion: @escaping (_ data: Void?, _ error: Error?) -> Void) +``` + +Updated user + +This can only be done by the logged in user. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import PetstoreClient + +let username = "username_example" // String | name that need to be deleted +let body = User(id: 123, username: "username_example", firstName: "firstName_example", lastName: "lastName_example", email: "email_example", password: "password_example", phone: "phone_example", userStatus: 123) // User | Updated user object + +// Updated user +UserAPI.updateUser(username: username, body: body) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +Void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/git_push.sh b/samples/client/petstore/swift5/urlsessionLibrary/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/pom.xml b/samples/client/petstore/swift5/urlsessionLibrary/pom.xml new file mode 100644 index 0000000000..c1b201eb3b --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift5PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift5 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/project.yml b/samples/client/petstore/swift5/urlsessionLibrary/project.yml new file mode 100644 index 0000000000..892005fdd5 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/project.yml @@ -0,0 +1,14 @@ +name: PetstoreClient +targets: + PetstoreClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [PetstoreClient] + info: + path: ./Info.plist + version: 1.0.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/run_spmbuild.sh b/samples/client/petstore/swift5/urlsessionLibrary/run_spmbuild.sh new file mode 100755 index 0000000000..1a9f585ad0 --- /dev/null +++ b/samples/client/petstore/swift5/urlsessionLibrary/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/test/swift5/default/.gitignore b/samples/client/test/swift5/default/.gitignore new file mode 100644 index 0000000000..5e5d5cebcf --- /dev/null +++ b/samples/client/test/swift5/default/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots diff --git a/samples/client/test/swift5/default/.openapi-generator-ignore b/samples/client/test/swift5/default/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/test/swift5/default/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/test/swift5/default/.openapi-generator/VERSION b/samples/client/test/swift5/default/.openapi-generator/VERSION new file mode 100644 index 0000000000..58592f031f --- /dev/null +++ b/samples/client/test/swift5/default/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/test/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/test/swift5/default/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/test/swift5/default/Cartfile b/samples/client/test/swift5/default/Cartfile new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/samples/client/test/swift5/default/Cartfile @@ -0,0 +1 @@ + diff --git a/samples/client/test/swift5/default/Info.plist b/samples/client/test/swift5/default/Info.plist new file mode 100644 index 0000000000..323e5ecfc4 --- /dev/null +++ b/samples/client/test/swift5/default/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/test/swift5/default/Package.swift b/samples/client/test/swift5/default/Package.swift new file mode 100644 index 0000000000..25d70eebde --- /dev/null +++ b/samples/client/test/swift5/default/Package.swift @@ -0,0 +1,31 @@ +// swift-tools-version:5.0 + +import PackageDescription + +let package = Package( + name: "TestClient", + platforms: [ + .iOS(.v9), + .macOS(.v10_11), + .tvOS(.v9), + .watchOS(.v3) + ], + products: [ + // Products define the executables and libraries produced by a package, and make them visible to other packages. + .library( + name: "TestClient", + targets: ["TestClient"]) + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages which this package depends on. + .target( + name: "TestClient", + dependencies: [], + path: "TestClient/Classes" + ) + ] +) diff --git a/samples/client/test/swift5/default/README.md b/samples/client/test/swift5/default/README.md new file mode 100644 index 0000000000..25059cabbf --- /dev/null +++ b/samples/client/test/swift5/default/README.md @@ -0,0 +1,63 @@ +# Swift5 API client for TestClient + +This is a test schema which exercises Swagger schema features for testing the swift5 language codegen module. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec from a remote server, you can easily generate an API client. + +- API version: 1.0 +- Package version: +- Build package: org.openapitools.codegen.languages.Swift5Codegen +For more information, please visit [http://www.example.com](http://www.example.com) + +## Installation + +### Carthage + +Run `carthage update` + +### CocoaPods + +Run `pod install` + +## Documentation for API Endpoints + +All URIs are relative to *http://api.example.com/basePath* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*Swift5TestAPI* | [**getAllModels**](docs/Swift5TestAPI.md#getallmodels) | **GET** /allModels | Get all of the models + + +## Documentation For Models + + - [AllPrimitives](docs/AllPrimitives.md) + - [BaseCard](docs/BaseCard.md) + - [ErrorInfo](docs/ErrorInfo.md) + - [GetAllModelsResult](docs/GetAllModelsResult.md) + - [ModelDoubleArray](docs/ModelDoubleArray.md) + - [ModelErrorInfoArray](docs/ModelErrorInfoArray.md) + - [ModelStringArray](docs/ModelStringArray.md) + - [ModelWithIntAdditionalPropertiesOnly](docs/ModelWithIntAdditionalPropertiesOnly.md) + - [ModelWithPropertiesAndAdditionalProperties](docs/ModelWithPropertiesAndAdditionalProperties.md) + - [ModelWithStringAdditionalPropertiesOnly](docs/ModelWithStringAdditionalPropertiesOnly.md) + - [PersonCard](docs/PersonCard.md) + - [PersonCardAllOf](docs/PersonCardAllOf.md) + - [PlaceCard](docs/PlaceCard.md) + - [PlaceCardAllOf](docs/PlaceCardAllOf.md) + - [SampleBase](docs/SampleBase.md) + - [SampleSubClass](docs/SampleSubClass.md) + - [SampleSubClassAllOf](docs/SampleSubClassAllOf.md) + - [StringEnum](docs/StringEnum.md) + - [VariableNameTest](docs/VariableNameTest.md) + + +## Documentation For Authorization + + All endpoints do not require authorization. + + +## Author + +jdoe@example.com + diff --git a/samples/client/test/swift5/default/TestClient.podspec b/samples/client/test/swift5/default/TestClient.podspec new file mode 100644 index 0000000000..e9d41bfad0 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'TestClient' + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.11' + s.tvos.deployment_target = '9.0' + s.watchos.deployment_target = '3.0' + s.version = '1.0' + s.source = { :git => 'git@github.com:OpenAPITools/openapi-generator.git', :tag => 'v1.0' } + s.authors = '' + s.license = 'Proprietary' + s.homepage = 'https://github.com/openapitools/openapi-generator' + s.summary = 'TestClient' + s.source_files = 'TestClient/Classes/**/*.swift' +end diff --git a/samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj b/samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..76aacba998 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient.xcodeproj/project.pbxproj @@ -0,0 +1,432 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 0061472DD11FF6D7742349C7 /* PersonCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CDB0CB291617B59C7E29CB /* PersonCard.swift */; }; + 05AA5B59607A30F18E94292F /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BFF565190B02C5B55C36C5E /* ModelWithStringAdditionalPropertiesOnly.swift */; }; + 1415101700773F07D9E14327 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F6F3F378FFC3FC0AC42268D /* APIs.swift */; }; + 19E70FF1DDE7B0282F400F45 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6AD136503821775A39AEEEA /* APIHelper.swift */; }; + 2002BB13501E9D1F5952C760 /* SampleSubClassAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */; }; + 27F628F6D077CE2DCC6CC337 /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68FA5194EA643821CA1085C3 /* ModelWithIntAdditionalPropertiesOnly.swift */; }; + 3DC6743F3ECD7005940DED98 /* GetAllModelsResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */; }; + 3F20DE4CB1AD4F3A2ED05326 /* SampleSubClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */; }; + 4209C8951507A706227F2A85 /* SampleBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */; }; + 493DB82F57B410C3C40CDD6B /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */; }; + 4D1CD48EC9034A49C536DF05 /* BaseCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = C209BA7D3B7026133ACB6149 /* BaseCard.swift */; }; + 561FBF0BA4127AAA4B2EB66D /* AllPrimitives.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */; }; + 5C7477A5CDC76B3293CBBC53 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = A140137667E350EAFDE010EA /* Models.swift */; }; + 60CBE570B8DBA382B5D4628C /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFD27529F413FEDE10F4D1C3 /* OpenISO8601DateFormatter.swift */; }; + 61C214786C3EA609EFA4C609 /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B832520FF3AFCB54E7A0EF5 /* SynchronizedDictionary.swift */; }; + 633435C240C960AFE29EEF3A /* StringEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3BD76CE1B85046CF575F42B /* StringEnum.swift */; }; + 6B1961ED41DFDFDB3029BE6F /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3D0164E2EEC228143968A2D /* Extensions.swift */; }; + 74086BA23A6B245C5C9120F4 /* Swift5TestAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6967E74308DBD6384CBA5624 /* Swift5TestAPI.swift */; }; + 7C22E572E92D490CC366F0C2 /* ErrorInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A813A17AF964F26FB864212 /* ErrorInfo.swift */; }; + 7F99AF29003DAFA2AFC85FEC /* ModelDoubleArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE5A2A8F47EC101841093D2C /* ModelDoubleArray.swift */; }; + 8F02FB3DCBA785F15F6BA602 /* PlaceCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */; }; + 9193BA83FEDAFA9788D03ACF /* PlaceCardAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */; }; + A4E70E34B9EABA6E7C911B37 /* ModelErrorInfoArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = C244E3993E5EAFE0E4DEF9C9 /* ModelErrorInfoArray.swift */; }; + AC78737EC4A34F22FC3D5E8C /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BA682C97038055435A32D0 /* CodableHelper.swift */; }; + B9B6C1BCD95B3D46719F0C57 /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 437CEDD9014FF755F5FCC890 /* URLSessionImplementations.swift */; }; + D43D0FC46CD094545F0284F3 /* PersonCardAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */; }; + E29D4269C5947A5CFCE3A810 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE6DF5346C62BDE2DAFA3B4E /* Configuration.swift */; }; + E32B8F685CB25522E611ED1D /* ModelStringArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DEC406D4B97E9127B278F6B /* ModelStringArray.swift */; }; + E5983001C8012C8986583D7B /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = F28BFEFC78B58C5329B65A2A /* JSONDataEncoding.swift */; }; + FB58DEE4F76D0111D3218BDF /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042A701F1D826A4F68808DE6 /* JSONEncodingHelper.swift */; }; + FD7D9D3454F9C64656CDCB8B /* VariableNameTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 042A701F1D826A4F68808DE6 /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONEncodingHelper.swift; sourceTree = ""; }; + 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaceCard.swift; sourceTree = ""; }; + 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelWithPropertiesAndAdditionalProperties.swift; sourceTree = ""; }; + 1A813A17AF964F26FB864212 /* ErrorInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ErrorInfo.swift; sourceTree = ""; }; + 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonCardAllOf.swift; sourceTree = ""; }; + 30CDB0CB291617B59C7E29CB /* PersonCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersonCard.swift; sourceTree = ""; }; + 437CEDD9014FF755F5FCC890 /* URLSessionImplementations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLSessionImplementations.swift; sourceTree = ""; }; + 4F6F3F378FFC3FC0AC42268D /* APIs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIs.swift; sourceTree = ""; }; + 5DEC406D4B97E9127B278F6B /* ModelStringArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelStringArray.swift; sourceTree = ""; }; + 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleSubClassAllOf.swift; sourceTree = ""; }; + 68FA5194EA643821CA1085C3 /* ModelWithIntAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelWithIntAdditionalPropertiesOnly.swift; sourceTree = ""; }; + 6967E74308DBD6384CBA5624 /* Swift5TestAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Swift5TestAPI.swift; sourceTree = ""; }; + 6BFF565190B02C5B55C36C5E /* ModelWithStringAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelWithStringAdditionalPropertiesOnly.swift; sourceTree = ""; }; + 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VariableNameTest.swift; sourceTree = ""; }; + 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllPrimitives.swift; sourceTree = ""; }; + 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaceCardAllOf.swift; sourceTree = ""; }; + 8B832520FF3AFCB54E7A0EF5 /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedDictionary.swift; sourceTree = ""; }; + 93BA682C97038055435A32D0 /* CodableHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodableHelper.swift; sourceTree = ""; }; + 9FD147676BF8F2DD7E471810 /* TestClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TestClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A140137667E350EAFDE010EA /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + A3BD76CE1B85046CF575F42B /* StringEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringEnum.swift; sourceTree = ""; }; + ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetAllModelsResult.swift; sourceTree = ""; }; + C209BA7D3B7026133ACB6149 /* BaseCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCard.swift; sourceTree = ""; }; + C244E3993E5EAFE0E4DEF9C9 /* ModelErrorInfoArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelErrorInfoArray.swift; sourceTree = ""; }; + C6AD136503821775A39AEEEA /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = ""; }; + CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleBase.swift; sourceTree = ""; }; + CE6DF5346C62BDE2DAFA3B4E /* Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = ""; }; + D3D0164E2EEC228143968A2D /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleSubClass.swift; sourceTree = ""; }; + EE5A2A8F47EC101841093D2C /* ModelDoubleArray.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelDoubleArray.swift; sourceTree = ""; }; + EFD27529F413FEDE10F4D1C3 /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenISO8601DateFormatter.swift; sourceTree = ""; }; + F28BFEFC78B58C5329B65A2A /* JSONDataEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDataEncoding.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXGroup section */ + 3049D31996790CF8E31B6F01 = { + isa = PBXGroup; + children = ( + 8C649F3AF4A7C6D66B52AA38 /* TestClient */, + CBA5AD47CD6A6AF075403DD1 /* Products */, + ); + sourceTree = ""; + }; + 3A1CFAB4CC75547815260F88 /* OpenAPIs */ = { + isa = PBXGroup; + children = ( + C6AD136503821775A39AEEEA /* APIHelper.swift */, + 4F6F3F378FFC3FC0AC42268D /* APIs.swift */, + 93BA682C97038055435A32D0 /* CodableHelper.swift */, + CE6DF5346C62BDE2DAFA3B4E /* Configuration.swift */, + D3D0164E2EEC228143968A2D /* Extensions.swift */, + F28BFEFC78B58C5329B65A2A /* JSONDataEncoding.swift */, + 042A701F1D826A4F68808DE6 /* JSONEncodingHelper.swift */, + A140137667E350EAFDE010EA /* Models.swift */, + EFD27529F413FEDE10F4D1C3 /* OpenISO8601DateFormatter.swift */, + 8B832520FF3AFCB54E7A0EF5 /* SynchronizedDictionary.swift */, + 437CEDD9014FF755F5FCC890 /* URLSessionImplementations.swift */, + AC6589BAFE1BDABB49267C33 /* APIs */, + 9A5460679035417A84B6C884 /* Models */, + ); + path = OpenAPIs; + sourceTree = ""; + }; + 3E4B2B40F4EEE4F7E6149EBF /* Classes */ = { + isa = PBXGroup; + children = ( + 3A1CFAB4CC75547815260F88 /* OpenAPIs */, + ); + path = Classes; + sourceTree = ""; + }; + 8C649F3AF4A7C6D66B52AA38 /* TestClient */ = { + isa = PBXGroup; + children = ( + 3E4B2B40F4EEE4F7E6149EBF /* Classes */, + ); + path = TestClient; + sourceTree = ""; + }; + 9A5460679035417A84B6C884 /* Models */ = { + isa = PBXGroup; + children = ( + 7EE13D018B8E8F7283534E94 /* AllPrimitives.swift */, + C209BA7D3B7026133ACB6149 /* BaseCard.swift */, + 1A813A17AF964F26FB864212 /* ErrorInfo.swift */, + ACAEAEEB934E57798AED0602 /* GetAllModelsResult.swift */, + EE5A2A8F47EC101841093D2C /* ModelDoubleArray.swift */, + C244E3993E5EAFE0E4DEF9C9 /* ModelErrorInfoArray.swift */, + 5DEC406D4B97E9127B278F6B /* ModelStringArray.swift */, + 68FA5194EA643821CA1085C3 /* ModelWithIntAdditionalPropertiesOnly.swift */, + 17B59E56BC42D7F70BBC0D08 /* ModelWithPropertiesAndAdditionalProperties.swift */, + 6BFF565190B02C5B55C36C5E /* ModelWithStringAdditionalPropertiesOnly.swift */, + 30CDB0CB291617B59C7E29CB /* PersonCard.swift */, + 2C4F016421122219AE4DCDF9 /* PersonCardAllOf.swift */, + 13DD01D5ABD4BE352CB6FCBF /* PlaceCard.swift */, + 889ABCD292051498ACCC66E8 /* PlaceCardAllOf.swift */, + CAB9BE4C49A34C2D3AE2D4E3 /* SampleBase.swift */, + EA9C1F9551FB619240EC0F70 /* SampleSubClass.swift */, + 6555C6E30D09EAE39142D186 /* SampleSubClassAllOf.swift */, + A3BD76CE1B85046CF575F42B /* StringEnum.swift */, + 7C09C1DB6708AB2D8997BEE2 /* VariableNameTest.swift */, + ); + path = Models; + sourceTree = ""; + }; + AC6589BAFE1BDABB49267C33 /* APIs */ = { + isa = PBXGroup; + children = ( + 6967E74308DBD6384CBA5624 /* Swift5TestAPI.swift */, + ); + path = APIs; + sourceTree = ""; + }; + CBA5AD47CD6A6AF075403DD1 /* Products */ = { + isa = PBXGroup; + children = ( + 9FD147676BF8F2DD7E471810 /* TestClient.framework */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 57071453919863518A53B6C4 /* TestClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8C5DAAB4D2F2BC3EB2A18339 /* Build configuration list for PBXNativeTarget "TestClient" */; + buildPhases = ( + 411C0E7C892A386592910621 /* Sources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TestClient; + productName = TestClient; + productReference = 9FD147676BF8F2DD7E471810 /* TestClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 498565B44CD0696E30C61F1F /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + }; + buildConfigurationList = 87FDCE50021B77EB5CF8EF08 /* Build configuration list for PBXProject "TestClient" */; + compatibilityVersion = "Xcode 10.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 3049D31996790CF8E31B6F01; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 57071453919863518A53B6C4 /* TestClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 411C0E7C892A386592910621 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 19E70FF1DDE7B0282F400F45 /* APIHelper.swift in Sources */, + 1415101700773F07D9E14327 /* APIs.swift in Sources */, + 561FBF0BA4127AAA4B2EB66D /* AllPrimitives.swift in Sources */, + 4D1CD48EC9034A49C536DF05 /* BaseCard.swift in Sources */, + AC78737EC4A34F22FC3D5E8C /* CodableHelper.swift in Sources */, + E29D4269C5947A5CFCE3A810 /* Configuration.swift in Sources */, + 7C22E572E92D490CC366F0C2 /* ErrorInfo.swift in Sources */, + 6B1961ED41DFDFDB3029BE6F /* Extensions.swift in Sources */, + 3DC6743F3ECD7005940DED98 /* GetAllModelsResult.swift in Sources */, + E5983001C8012C8986583D7B /* JSONDataEncoding.swift in Sources */, + FB58DEE4F76D0111D3218BDF /* JSONEncodingHelper.swift in Sources */, + 7F99AF29003DAFA2AFC85FEC /* ModelDoubleArray.swift in Sources */, + A4E70E34B9EABA6E7C911B37 /* ModelErrorInfoArray.swift in Sources */, + E32B8F685CB25522E611ED1D /* ModelStringArray.swift in Sources */, + 27F628F6D077CE2DCC6CC337 /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */, + 493DB82F57B410C3C40CDD6B /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */, + 05AA5B59607A30F18E94292F /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */, + 5C7477A5CDC76B3293CBBC53 /* Models.swift in Sources */, + 60CBE570B8DBA382B5D4628C /* OpenISO8601DateFormatter.swift in Sources */, + 0061472DD11FF6D7742349C7 /* PersonCard.swift in Sources */, + D43D0FC46CD094545F0284F3 /* PersonCardAllOf.swift in Sources */, + 8F02FB3DCBA785F15F6BA602 /* PlaceCard.swift in Sources */, + 9193BA83FEDAFA9788D03ACF /* PlaceCardAllOf.swift in Sources */, + 4209C8951507A706227F2A85 /* SampleBase.swift in Sources */, + 3F20DE4CB1AD4F3A2ED05326 /* SampleSubClass.swift in Sources */, + 2002BB13501E9D1F5952C760 /* SampleSubClassAllOf.swift in Sources */, + 633435C240C960AFE29EEF3A /* StringEnum.swift in Sources */, + 74086BA23A6B245C5C9120F4 /* Swift5TestAPI.swift in Sources */, + 61C214786C3EA609EFA4C609 /* SynchronizedDictionary.swift in Sources */, + B9B6C1BCD95B3D46719F0C57 /* URLSessionImplementations.swift in Sources */, + FD7D9D3454F9C64656CDCB8B /* VariableNameTest.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1D58A58AE8D976D68029505F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 20BF9E8F2FA4569489A9CEAC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "DEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 295215B264B439F2CFBEFBA2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 4CDAC84BFAB424A21776ADCA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 87FDCE50021B77EB5CF8EF08 /* Build configuration list for PBXProject "TestClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20BF9E8F2FA4569489A9CEAC /* Debug */, + 295215B264B439F2CFBEFBA2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + 8C5DAAB4D2F2BC3EB2A18339 /* Build configuration list for PBXNativeTarget "TestClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D58A58AE8D976D68029505F /* Debug */, + 4CDAC84BFAB424A21776ADCA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = ""; + }; +/* End XCConfigurationList section */ + }; + rootObject = 498565B44CD0696E30C61F1F /* Project object */; +} diff --git a/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/samples/client/test/swift5/default/TestClient.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/test/swift5/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme b/samples/client/test/swift5/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme new file mode 100644 index 0000000000..a96ec1a1dd --- /dev/null +++ b/samples/client/test/swift5/default/TestClient.xcodeproj/xcshareddata/xcschemes/TestClient.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIHelper.swift new file mode 100644 index 0000000000..2000700968 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIHelper.swift @@ -0,0 +1,70 @@ +// APIHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct APIHelper { + public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + let destination = source.reduce(into: [String: Any]()) { (result, item) in + if let value = item.value { + result[item.key] = value + } + } + + if destination.isEmpty { + return nil + } + return destination + } + + public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + return source.reduce(into: [String: String]()) { (result, item) in + if let collection = item.value as? [Any?] { + result[item.key] = collection.filter({ $0 != nil }).map { "\($0!)" }.joined(separator: ",") + } else if let value: Any = item.value { + result[item.key] = "\(value)" + } + } + } + + public static func convertBoolToString(_ source: [String: Any]?) -> [String: Any]? { + guard let source = source else { + return nil + } + + return source.reduce(into: [String: Any](), { (result, item) in + switch item.value { + case let x as Bool: + result[item.key] = x.description + default: + result[item.key] = item.value + } + }) + } + + public static func mapValueToPathItem(_ source: Any) -> Any { + if let collection = source as? [Any?] { + return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + } + return source + } + + public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + let destination = source.filter({ $0.value != nil}).reduce(into: [URLQueryItem]()) { (result, item) in + if let collection = item.value as? [Any?] { + let value = collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") + result.append(URLQueryItem(name: item.key, value: value)) + } else if let value = item.value { + result.append(URLQueryItem(name: item.key, value: "\(value)")) + } + } + + if destination.isEmpty { + return nil + } + return destination + } +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs.swift new file mode 100644 index 0000000000..359d938d45 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs.swift @@ -0,0 +1,64 @@ +// APIs.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class TestClientAPI { + public static var basePath = "http://api.example.com/basePath" + public static var credential: URLCredential? + public static var customHeaders: [String: String] = [:] + public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() + public static var apiResponseQueue: DispatchQueue = .main +} + +open class RequestBuilder { + var credential: URLCredential? + var headers: [String: String] + public let parameters: [String: Any]? + public let isBody: Bool + public let method: String + public let URLString: String + + /// Optional block to obtain a reference to the request's progress instance when available. + /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. + /// If you need to get the request's progress in older OS versions, please use Alamofire http client. + public var onProgressReady: ((Progress) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + self.method = method + self.URLString = URLString + self.parameters = parameters + self.isBody = isBody + self.headers = headers + + addHeaders(TestClientAPI.customHeaders) + } + + open func addHeaders(_ aHeaders: [String: String]) { + for (header, value) in aHeaders { + headers[header] = value + } + } + + open func execute(_ apiResponseQueue: DispatchQueue = TestClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { } + + public func addHeader(name: String, value: String) -> Self { + if !value.isEmpty { + headers[name] = value + } + return self + } + + open func addCredential() -> Self { + self.credential = TestClientAPI.credential + return self + } +} + +public protocol RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs/Swift5TestAPI.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs/Swift5TestAPI.swift new file mode 100644 index 0000000000..6987b61a1a --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/APIs/Swift5TestAPI.swift @@ -0,0 +1,51 @@ +// +// Swift5TestAPI.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Swift5TestAPI { + /** + Get all of the models + + - parameter clientId: (query) id that represent the Api client + - parameter apiResponseQueue: The queue on which api response is dispatched. + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getAllModels(clientId: String, apiResponseQueue: DispatchQueue = TestClientAPI.apiResponseQueue, completion: @escaping ((_ data: GetAllModelsResult?, _ error: Error?) -> Void)) { + getAllModelsWithRequestBuilder(clientId: clientId).execute(apiResponseQueue) { result -> Void in + switch result { + case let .success(response): + completion(response.body, nil) + case let .failure(error): + completion(nil, error) + } + } + } + + /** + Get all of the models + - GET /allModels + - This endpoint tests get a dictionary which contains examples of all of the models. + - parameter clientId: (query) id that represent the Api client + - returns: RequestBuilder + */ + open class func getAllModelsWithRequestBuilder(clientId: String) -> RequestBuilder { + let path = "/allModels" + let URLString = TestClientAPI.basePath + path + let parameters: [String: Any]? = nil + + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "client_id": clientId.encodeToJSON() + ]) + + let requestBuilder: RequestBuilder.Type = TestClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/CodableHelper.swift new file mode 100644 index 0000000000..32e194f6ee --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/CodableHelper.swift @@ -0,0 +1,48 @@ +// +// CodableHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class CodableHelper { + + private static var customDateFormatter: DateFormatter? + private static var defaultDateFormatter: DateFormatter = OpenISO8601DateFormatter() + private static var customJSONDecoder: JSONDecoder? + private static var defaultJSONDecoder: JSONDecoder = { + let decoder = JSONDecoder() + decoder.dateDecodingStrategy = .formatted(CodableHelper.dateFormatter) + return decoder + }() + private static var customJSONEncoder: JSONEncoder? + private static var defaultJSONEncoder: JSONEncoder = { + let encoder = JSONEncoder() + encoder.dateEncodingStrategy = .formatted(CodableHelper.dateFormatter) + encoder.outputFormatting = .prettyPrinted + return encoder + }() + + public static var dateFormatter: DateFormatter { + get { return self.customDateFormatter ?? self.defaultDateFormatter } + set { self.customDateFormatter = newValue } + } + public static var jsonDecoder: JSONDecoder { + get { return self.customJSONDecoder ?? self.defaultJSONDecoder } + set { self.customJSONDecoder = newValue } + } + public static var jsonEncoder: JSONEncoder { + get { return self.customJSONEncoder ?? self.defaultJSONEncoder } + set { self.customJSONEncoder = newValue } + } + + open class func decode(_ type: T.Type, from data: Data) -> Result where T: Decodable { + return Result { try self.jsonDecoder.decode(type, from: data) } + } + + open class func encode(_ value: T) -> Result where T: Encodable { + return Result { try self.jsonEncoder.encode(value) } + } +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Configuration.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Configuration.swift new file mode 100644 index 0000000000..627d9adb75 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Configuration.swift @@ -0,0 +1,16 @@ +// Configuration.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class Configuration { + + // This value is used to configure the date formatter that is used to serialize dates into JSON format. + // You must set it prior to encoding any dates, and it will only be read once. + @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") + public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Extensions.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Extensions.swift new file mode 100644 index 0000000000..74fcfcf2ad --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Extensions.swift @@ -0,0 +1,173 @@ +// Extensions.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +extension Bool: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Float: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension Int32: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int32) } +} + +extension Int64: JSONEncodable { + func encodeToJSON() -> Any { return NSNumber(value: self as Int64) } +} + +extension Double: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension String: JSONEncodable { + func encodeToJSON() -> Any { return self as Any } +} + +extension RawRepresentable where RawValue: JSONEncodable { + func encodeToJSON() -> Any { return self.rawValue as Any } +} + +private func encodeIfPossible(_ object: T) -> Any { + if let encodableObject = object as? JSONEncodable { + return encodableObject.encodeToJSON() + } else { + return object as Any + } +} + +extension Array: JSONEncodable { + func encodeToJSON() -> Any { + return self.map(encodeIfPossible) + } +} + +extension Dictionary: JSONEncodable { + func encodeToJSON() -> Any { + var dictionary = [AnyHashable: Any]() + for (key, value) in self { + dictionary[key] = encodeIfPossible(value) + } + return dictionary as Any + } +} + +extension Data: JSONEncodable { + func encodeToJSON() -> Any { + return self.base64EncodedString(options: Data.Base64EncodingOptions()) + } +} + +extension Date: JSONEncodable { + func encodeToJSON() -> Any { + return CodableHelper.dateFormatter.string(from: self) as Any + } +} + +extension URL: JSONEncodable { + func encodeToJSON() -> Any { + return self + } +} + +extension UUID: JSONEncodable { + func encodeToJSON() -> Any { + return self.uuidString + } +} + +extension String: CodingKey { + + public var stringValue: String { + return self + } + + public init?(stringValue: String) { + self.init(stringLiteral: stringValue) + } + + public var intValue: Int? { + return nil + } + + public init?(intValue: Int) { + return nil + } + +} + +extension KeyedEncodingContainerProtocol { + + public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + var arrayContainer = nestedUnkeyedContainer(forKey: key) + try arrayContainer.encode(contentsOf: values) + } + + public mutating func encodeArrayIfPresent(_ values: [T]?, forKey key: Self.Key) throws where T: Encodable { + if let values = values { + try encodeArray(values, forKey: key) + } + } + + public mutating func encodeMap(_ pairs: [Self.Key: T]) throws where T: Encodable { + for (key, value) in pairs { + try encode(value, forKey: key) + } + } + + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T: Encodable { + if let pairs = pairs { + try encodeMap(pairs) + } + } + +} + +extension KeyedDecodingContainerProtocol { + + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + var tmpArray = [T]() + + var nestedContainer = try nestedUnkeyedContainer(forKey: key) + while !nestedContainer.isAtEnd { + let arrayValue = try nestedContainer.decode(T.self) + tmpArray.append(arrayValue) + } + + return tmpArray + } + + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { + var tmpArray: [T]? + + if contains(key) { + tmpArray = try decodeArray(T.self, forKey: key) + } + + return tmpArray + } + + public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { + var map: [Self.Key: T] = [:] + + for key in allKeys { + if !excludedKeys.contains(key) { + let value = try decode(T.self, forKey: key) + map[key] = value + } + } + + return map + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONDataEncoding.swift new file mode 100644 index 0000000000..b79e9f5e64 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -0,0 +1,53 @@ +// +// JSONDataEncoding.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct JSONDataEncoding { + + // MARK: Properties + + private static let jsonDataKey = "jsonData" + + // MARK: Encoding + + /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// + /// - parameter urlRequest: The request to have parameters applied. + /// - parameter parameters: The parameters to apply. This should have a single key/value + /// pair with "jsonData" as the key and a Data object as the value. + /// + /// - throws: An `Error` if the encoding process encounters an error. + /// + /// - returns: The encoded request. + public func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) -> URLRequest { + var urlRequest = urlRequest + + guard let jsonData = parameters?[JSONDataEncoding.jsonDataKey] as? Data, !jsonData.isEmpty else { + return urlRequest + } + + if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { + urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") + } + + urlRequest.httpBody = jsonData + + return urlRequest + } + + public static func encodingParameters(jsonData: Data?) -> [String: Any]? { + var returnedParams: [String: Any]? + if let jsonData = jsonData, !jsonData.isEmpty { + var params: [String: Any] = [:] + params[jsonDataKey] = jsonData + returnedParams = params + } + return returnedParams + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift new file mode 100644 index 0000000000..02f78ffb47 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -0,0 +1,45 @@ +// +// JSONEncodingHelper.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +open class JSONEncodingHelper { + + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? + + // Encode the Encodable object + if let encodableObj = encodableObj { + let encodeResult = CodableHelper.encode(encodableObj) + do { + let data = try encodeResult.get() + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + } + } + + return params + } + + open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { + var params: [String: Any]? + + if let encodableObj = encodableObj { + do { + let data = try JSONSerialization.data(withJSONObject: encodableObj, options: .prettyPrinted) + params = JSONDataEncoding.encodingParameters(jsonData: data) + } catch { + print(error.localizedDescription) + return nil + } + } + + return params + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models.swift new file mode 100644 index 0000000000..b9757b6cbc --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models.swift @@ -0,0 +1,51 @@ +// Models.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +protocol JSONEncodable { + func encodeToJSON() -> Any +} + +public enum ErrorResponse: Error { + case error(Int, Data?, Error) +} + +public enum DownloadException: Error { + case responseDataMissing + case responseFailed + case requestMissing + case requestMissingPath + case requestMissingURL +} + +public enum DecodableRequestBuilderError: Error { + case emptyDataResponse + case nilHTTPResponse + case jsonDecoding(DecodingError) + case generalError(Error) +} + +open class Response { + public let statusCode: Int + public let header: [String: String] + public let body: T? + + public init(statusCode: Int, header: [String: String], body: T?) { + self.statusCode = statusCode + self.header = header + self.body = body + } + + public convenience init(response: HTTPURLResponse, body: T?) { + let rawHeader = response.allHeaderFields + var header = [String: String]() + for case let (key, value) as (String, String) in rawHeader { + header[key] = value + } + self.init(statusCode: response.statusCode, header: header, body: body) + } +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift new file mode 100644 index 0000000000..dc6571db3e --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/AllPrimitives.swift @@ -0,0 +1,72 @@ +// +// AllPrimitives.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Object which contains lots of different primitive OpenAPI types */ +public struct AllPrimitives: Codable { + + public enum MyInlineStringEnum: String, Codable, CaseIterable { + case inlinestringenumvalue1 = "inlineStringEnumValue1" + case inlinestringenumvalue2 = "inlineStringEnumValue2" + case inlinestringenumvalue3 = "inlineStringEnumValue3" + } + public var myInteger: Int? + public var myIntegerArray: [Int]? + public var myLong: Int64? + public var myLongArray: [Int64]? + public var myFloat: Float? + public var myFloatArray: [Float]? + public var myDouble: Double? + public var myDoubleArray: [Double]? + public var myString: String? + public var myStringArray: [String]? + public var myBytes: Data? + public var myBytesArray: [Data]? + public var myBoolean: Bool? + public var myBooleanArray: [Bool]? + public var myDate: Date? + public var myDateArray: [Date]? + public var myDateTime: Date? + public var myDateTimeArray: [Date]? + public var myFile: URL? + public var myFileArray: [URL]? + public var myUUID: UUID? + public var myUUIDArray: [UUID]? + public var myStringEnum: StringEnum? + public var myStringEnumArray: [StringEnum]? + public var myInlineStringEnum: MyInlineStringEnum? + + public init(myInteger: Int?, myIntegerArray: [Int]?, myLong: Int64?, myLongArray: [Int64]?, myFloat: Float?, myFloatArray: [Float]?, myDouble: Double?, myDoubleArray: [Double]?, myString: String?, myStringArray: [String]?, myBytes: Data?, myBytesArray: [Data]?, myBoolean: Bool?, myBooleanArray: [Bool]?, myDate: Date?, myDateArray: [Date]?, myDateTime: Date?, myDateTimeArray: [Date]?, myFile: URL?, myFileArray: [URL]?, myUUID: UUID?, myUUIDArray: [UUID]?, myStringEnum: StringEnum?, myStringEnumArray: [StringEnum]?, myInlineStringEnum: MyInlineStringEnum?) { + self.myInteger = myInteger + self.myIntegerArray = myIntegerArray + self.myLong = myLong + self.myLongArray = myLongArray + self.myFloat = myFloat + self.myFloatArray = myFloatArray + self.myDouble = myDouble + self.myDoubleArray = myDoubleArray + self.myString = myString + self.myStringArray = myStringArray + self.myBytes = myBytes + self.myBytesArray = myBytesArray + self.myBoolean = myBoolean + self.myBooleanArray = myBooleanArray + self.myDate = myDate + self.myDateArray = myDateArray + self.myDateTime = myDateTime + self.myDateTimeArray = myDateTimeArray + self.myFile = myFile + self.myFileArray = myFileArray + self.myUUID = myUUID + self.myUUIDArray = myUUIDArray + self.myStringEnum = myStringEnum + self.myStringEnumArray = myStringEnumArray + self.myInlineStringEnum = myInlineStringEnum + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift new file mode 100644 index 0000000000..2ffb3a5e1a --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/BaseCard.swift @@ -0,0 +1,19 @@ +// +// BaseCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is a base card object which uses a 'cardType' discriminator. */ +public struct BaseCard: Codable { + + public var cardType: String + + public init(cardType: String) { + self.cardType = cardType + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift new file mode 100644 index 0000000000..c2b1fcda58 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ErrorInfo.swift @@ -0,0 +1,23 @@ +// +// ErrorInfo.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Example Error object */ +public struct ErrorInfo: Codable { + + public var code: Int? + public var message: String? + public var details: [String]? + + public init(code: Int?, message: String?, details: [String]?) { + self.code = code + self.message = message + self.details = details + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift new file mode 100644 index 0000000000..b8cfedbe94 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/GetAllModelsResult.swift @@ -0,0 +1,23 @@ +// +// GetAllModelsResult.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** Response object containing AllPrimitives object */ +public struct GetAllModelsResult: Codable { + + public var myPrimitiveArray: [AllPrimitives]? + public var myPrimitive: AllPrimitives? + public var myVariableNameTest: VariableNameTest? + + public init(myPrimitiveArray: [AllPrimitives]?, myPrimitive: AllPrimitives?, myVariableNameTest: VariableNameTest?) { + self.myPrimitiveArray = myPrimitiveArray + self.myPrimitive = myPrimitive + self.myVariableNameTest = myVariableNameTest + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift new file mode 100644 index 0000000000..9e523219a4 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelDoubleArray.swift @@ -0,0 +1,11 @@ +// +// ModelDoubleArray.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This defines an array of doubles. */ +public typealias ModelDoubleArray = [Double] diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift new file mode 100644 index 0000000000..358c83dc7a --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelErrorInfoArray.swift @@ -0,0 +1,11 @@ +// +// ModelErrorInfoArray.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This defines an array of ErrorInfo objects. */ +public typealias ModelErrorInfoArray = [ErrorInfo] diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift new file mode 100644 index 0000000000..6a614cc360 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelStringArray.swift @@ -0,0 +1,11 @@ +// +// ModelStringArray.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This defines an array of strings. */ +public typealias ModelStringArray = [String] diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift new file mode 100644 index 0000000000..2878543406 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithIntAdditionalPropertiesOnly.swift @@ -0,0 +1,46 @@ +// +// ModelWithIntAdditionalPropertiesOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is an empty model with no properties and only additionalProperties of type int32 */ +public struct ModelWithIntAdditionalPropertiesOnly: Codable { + + public var additionalProperties: [String: Int] = [:] + + public subscript(key: String) -> Int? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(Int.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift new file mode 100644 index 0000000000..d8f115cb49 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithPropertiesAndAdditionalProperties.swift @@ -0,0 +1,89 @@ +// +// ModelWithPropertiesAndAdditionalProperties.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is an empty model with no properties and only additionalProperties of type int32 */ +public struct ModelWithPropertiesAndAdditionalProperties: Codable { + + public var myIntegerReq: Int + public var myIntegerOpt: Int? + public var myPrimitiveReq: AllPrimitives + public var myPrimitiveOpt: AllPrimitives? + public var myStringArrayReq: [String] + public var myStringArrayOpt: [String]? + public var myPrimitiveArrayReq: [AllPrimitives] + public var myPrimitiveArrayOpt: [AllPrimitives]? + + public init(myIntegerReq: Int, myIntegerOpt: Int?, myPrimitiveReq: AllPrimitives, myPrimitiveOpt: AllPrimitives?, myStringArrayReq: [String], myStringArrayOpt: [String]?, myPrimitiveArrayReq: [AllPrimitives], myPrimitiveArrayOpt: [AllPrimitives]?) { + self.myIntegerReq = myIntegerReq + self.myIntegerOpt = myIntegerOpt + self.myPrimitiveReq = myPrimitiveReq + self.myPrimitiveOpt = myPrimitiveOpt + self.myStringArrayReq = myStringArrayReq + self.myStringArrayOpt = myStringArrayOpt + self.myPrimitiveArrayReq = myPrimitiveArrayReq + self.myPrimitiveArrayOpt = myPrimitiveArrayOpt + } + public var additionalProperties: [String: String] = [:] + + public subscript(key: String) -> String? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encode(myIntegerReq, forKey: "myIntegerReq") + try container.encodeIfPresent(myIntegerOpt, forKey: "myIntegerOpt") + try container.encode(myPrimitiveReq, forKey: "myPrimitiveReq") + try container.encodeIfPresent(myPrimitiveOpt, forKey: "myPrimitiveOpt") + try container.encode(myStringArrayReq, forKey: "myStringArrayReq") + try container.encodeIfPresent(myStringArrayOpt, forKey: "myStringArrayOpt") + try container.encode(myPrimitiveArrayReq, forKey: "myPrimitiveArrayReq") + try container.encodeIfPresent(myPrimitiveArrayOpt, forKey: "myPrimitiveArrayOpt") + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + myIntegerReq = try container.decode(Int.self, forKey: "myIntegerReq") + myIntegerOpt = try container.decodeIfPresent(Int.self, forKey: "myIntegerOpt") + myPrimitiveReq = try container.decode(AllPrimitives.self, forKey: "myPrimitiveReq") + myPrimitiveOpt = try container.decodeIfPresent(AllPrimitives.self, forKey: "myPrimitiveOpt") + myStringArrayReq = try container.decode([String].self, forKey: "myStringArrayReq") + myStringArrayOpt = try container.decodeIfPresent([String].self, forKey: "myStringArrayOpt") + myPrimitiveArrayReq = try container.decode([AllPrimitives].self, forKey: "myPrimitiveArrayReq") + myPrimitiveArrayOpt = try container.decodeIfPresent([AllPrimitives].self, forKey: "myPrimitiveArrayOpt") + var nonAdditionalPropertyKeys = Set() + nonAdditionalPropertyKeys.insert("myIntegerReq") + nonAdditionalPropertyKeys.insert("myIntegerOpt") + nonAdditionalPropertyKeys.insert("myPrimitiveReq") + nonAdditionalPropertyKeys.insert("myPrimitiveOpt") + nonAdditionalPropertyKeys.insert("myStringArrayReq") + nonAdditionalPropertyKeys.insert("myStringArrayOpt") + nonAdditionalPropertyKeys.insert("myPrimitiveArrayReq") + nonAdditionalPropertyKeys.insert("myPrimitiveArrayOpt") + additionalProperties = try container.decodeMap(String.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift new file mode 100644 index 0000000000..fffed88853 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/ModelWithStringAdditionalPropertiesOnly.swift @@ -0,0 +1,46 @@ +// +// ModelWithStringAdditionalPropertiesOnly.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is an empty model with no properties and only additionalProperties of type string */ +public struct ModelWithStringAdditionalPropertiesOnly: Codable { + + public var additionalProperties: [String: String] = [:] + + public subscript(key: String) -> String? { + get { + if let value = additionalProperties[key] { + return value + } + return nil + } + + set { + additionalProperties[key] = newValue + } + } + + // Encodable protocol methods + + public func encode(to encoder: Encoder) throws { + + var container = encoder.container(keyedBy: String.self) + + try container.encodeMap(additionalProperties) + } + + // Decodable protocol methods + + public init(from decoder: Decoder) throws { + let container = try decoder.container(keyedBy: String.self) + + var nonAdditionalPropertyKeys = Set() + additionalProperties = try container.decodeMap(String.self, excludedKeys: nonAdditionalPropertyKeys) + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift new file mode 100644 index 0000000000..db1a081b27 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCard.swift @@ -0,0 +1,23 @@ +// +// PersonCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is a card object for a Person derived from BaseCard. */ +public struct PersonCard: Codable { + + public var cardType: String + public var firstName: String? + public var lastName: String? + + public init(cardType: String, firstName: String?, lastName: String?) { + self.cardType = cardType + self.firstName = firstName + self.lastName = lastName + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift new file mode 100644 index 0000000000..e11d38985a --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PersonCardAllOf.swift @@ -0,0 +1,20 @@ +// +// PersonCardAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PersonCardAllOf: Codable { + + public var firstName: String? + public var lastName: String? + + public init(firstName: String?, lastName: String?) { + self.firstName = firstName + self.lastName = lastName + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift new file mode 100644 index 0000000000..0fd94cf836 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCard.swift @@ -0,0 +1,23 @@ +// +// PlaceCard.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is a card object for a Person derived from BaseCard. */ +public struct PlaceCard: Codable { + + public var cardType: String + public var placeName: String? + public var placeAddress: String? + + public init(cardType: String, placeName: String?, placeAddress: String?) { + self.cardType = cardType + self.placeName = placeName + self.placeAddress = placeAddress + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift new file mode 100644 index 0000000000..c5e89a15e0 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/PlaceCardAllOf.swift @@ -0,0 +1,20 @@ +// +// PlaceCardAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct PlaceCardAllOf: Codable { + + public var placeName: String? + public var placeAddress: String? + + public init(placeName: String?, placeAddress: String?) { + self.placeName = placeName + self.placeAddress = placeAddress + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift new file mode 100644 index 0000000000..7d884d88e1 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleBase.swift @@ -0,0 +1,21 @@ +// +// SampleBase.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is a base class object from which other classes will derive. */ +public struct SampleBase: Codable { + + public var baseClassStringProp: String? + public var baseClassIntegerProp: Int? + + public init(baseClassStringProp: String?, baseClassIntegerProp: Int?) { + self.baseClassStringProp = baseClassStringProp + self.baseClassIntegerProp = baseClassIntegerProp + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift new file mode 100644 index 0000000000..c6ffc74a95 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClass.swift @@ -0,0 +1,25 @@ +// +// SampleSubClass.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This is a subclass defived from the SampleBase class. */ +public struct SampleSubClass: Codable { + + public var baseClassStringProp: String? + public var baseClassIntegerProp: Int? + public var subClassStringProp: String? + public var subClassIntegerProp: Int? + + public init(baseClassStringProp: String?, baseClassIntegerProp: Int?, subClassStringProp: String?, subClassIntegerProp: Int?) { + self.baseClassStringProp = baseClassStringProp + self.baseClassIntegerProp = baseClassIntegerProp + self.subClassStringProp = subClassStringProp + self.subClassIntegerProp = subClassIntegerProp + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift new file mode 100644 index 0000000000..7f52bb9fef --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/SampleSubClassAllOf.swift @@ -0,0 +1,20 @@ +// +// SampleSubClassAllOf.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public struct SampleSubClassAllOf: Codable { + + public var subClassStringProp: String? + public var subClassIntegerProp: Int? + + public init(subClassStringProp: String?, subClassIntegerProp: Int?) { + self.subClassStringProp = subClassStringProp + self.subClassIntegerProp = subClassIntegerProp + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift new file mode 100644 index 0000000000..48273ea2c2 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/StringEnum.swift @@ -0,0 +1,14 @@ +// +// StringEnum.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +public enum StringEnum: String, Codable, CaseIterable { + case stringenumvalue1 = "stringEnumValue1" + case stringenumvalue2 = "stringEnumValue2" + case stringenumvalue3 = "stringEnumValue3" +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift new file mode 100644 index 0000000000..9b67f8a4af --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/Models/VariableNameTest.swift @@ -0,0 +1,32 @@ +// +// VariableNameTest.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +/** This object contains property names which we know will be different from their variable name. Examples of this include snake case property names and property names which are Swift 5 reserved words. */ +public struct VariableNameTest: Codable { + + /** This snake-case examle_name property name should be converted to a camelCase variable name like exampleName */ + public var exampleName: String? + /** This property name is a reserved word in most languages, including Swift 5. */ + public var _for: String? + /** This model object property name should be unchanged from the JSON property name. */ + public var normalName: String? + + public init(exampleName: String?, _for: String?, normalName: String?) { + self.exampleName = exampleName + self._for = _for + self.normalName = normalName + } + + public enum CodingKeys: String, CodingKey, CaseIterable { + case exampleName = "example_name" + case _for = "for" + case normalName + } + +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift new file mode 100644 index 0000000000..e06208074c --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift @@ -0,0 +1,44 @@ +// +// OpenISO8601DateFormatter.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +// https://stackoverflow.com/a/50281094/976628 +public class OpenISO8601DateFormatter: DateFormatter { + static let withoutSeconds: DateFormatter = { + let formatter = DateFormatter() + formatter.calendar = Calendar(identifier: .iso8601) + formatter.locale = Locale(identifier: "en_US_POSIX") + formatter.timeZone = TimeZone(secondsFromGMT: 0) + formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ" + return formatter + }() + + private func setup() { + calendar = Calendar(identifier: .iso8601) + locale = Locale(identifier: "en_US_POSIX") + timeZone = TimeZone(secondsFromGMT: 0) + dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" + } + + override init() { + super.init() + setup() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + override public func date(from string: String) -> Date? { + if let result = super.date(from: string) { + return result + } + return OpenISO8601DateFormatter.withoutSeconds.date(from: string) + } +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/SynchronizedDictionary.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/SynchronizedDictionary.swift new file mode 100644 index 0000000000..acf7ff4031 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/SynchronizedDictionary.swift @@ -0,0 +1,36 @@ +// SynchronizedDictionary.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation + +internal struct SynchronizedDictionary { + + private var dictionary = [K: V]() + private let queue = DispatchQueue( + label: "SynchronizedDictionary", + qos: DispatchQoS.userInitiated, + attributes: [DispatchQueue.Attributes.concurrent], + autoreleaseFrequency: DispatchQueue.AutoreleaseFrequency.inherit, + target: nil + ) + + internal subscript(key: K) -> V? { + get { + var value: V? + + queue.sync { + value = self.dictionary[key] + } + + return value + } + set { + queue.sync(flags: DispatchWorkItemFlags.barrier) { + self.dictionary[key] = newValue + } + } + } +} diff --git a/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift new file mode 100644 index 0000000000..bfcda0b648 --- /dev/null +++ b/samples/client/test/swift5/default/TestClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -0,0 +1,544 @@ +// URLSessionImplementations.swift +// +// Generated by openapi-generator +// https://openapi-generator.tech +// + +import Foundation +#if !os(macOS) +import MobileCoreServices +#endif + +class URLSessionRequestBuilderFactory: RequestBuilderFactory { + func getNonDecodableBuilder() -> RequestBuilder.Type { + return URLSessionRequestBuilder.self + } + + func getBuilder() -> RequestBuilder.Type { + return URLSessionDecodableRequestBuilder.self + } +} + +// Store the URLSession to retain its reference +private var urlSessionStore = SynchronizedDictionary() + +open class URLSessionRequestBuilder: RequestBuilder { + + let progress = Progress() + + private var observation: NSKeyValueObservation? + + deinit { + observation?.invalidate() + } + + fileprivate let sessionDelegate = SessionDelegate() + + /** + May be assigned if you want to control the authentication challenges. + */ + public var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + /** + May be assigned if you want to do any of those things: + - control the task completion + - intercept and handle errors like authorization + - retry the request. + */ + public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? + + required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + super.init(method: method, URLString: URLString, parameters: parameters, isBody: isBody, headers: headers) + } + + /** + May be overridden by a subclass if you want to control the URLSession + configuration. + */ + open func createURLSession() -> URLSession { + let configuration = URLSessionConfiguration.default + configuration.httpAdditionalHeaders = buildHeaders() + sessionDelegate.credential = credential + sessionDelegate.taskDidReceiveChallenge = taskDidReceiveChallenge + return URLSession(configuration: configuration, delegate: sessionDelegate, delegateQueue: nil) + } + + /** + May be overridden by a subclass if you want to control the Content-Type + that is given to an uploaded form part. + + Return nil to use the default behavior (inferring the Content-Type from + the file extension). Return the desired Content-Type otherwise. + */ + open func contentTypeForFormPart(fileURL: URL) -> String? { + return nil + } + + /** + May be overridden by a subclass if you want to control the URLRequest + configuration (e.g. to override the cache policy). + */ + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { + + guard let url = URL(string: URLString) else { + throw DownloadException.requestMissingURL + } + + var originalRequest = URLRequest(url: url) + + originalRequest.httpMethod = method.rawValue + + buildHeaders().forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + headers.forEach { key, value in + originalRequest.setValue(value, forHTTPHeaderField: key) + } + + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) + + return modifiedRequest + } + + override open func execute(_ apiResponseQueue: DispatchQueue = TestClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Result, Error>) -> Void) { + let urlSessionId: String = UUID().uuidString + // Create a new manager for each request to customize its request header + let urlSession = createURLSession() + urlSessionStore[urlSessionId] = urlSession + + let parameters: [String: Any] = self.parameters ?? [:] + + let fileKeys = parameters.filter { $1 is NSURL } + .map { $0.0 } + + let encoding: ParameterEncoding + if fileKeys.count > 0 { + encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) + } else if isBody { + encoding = JSONDataEncoding() + } else { + encoding = URLEncoding() + } + + guard let xMethod = HTTPMethod(rawValue: method) else { + fatalError("Unsuported Http method - \(method)") + } + + let cleanupRequest = { + urlSessionStore[urlSessionId] = nil + self.observation?.invalidate() + } + + do { + let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) + + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in + + guard let self = self else { return } + + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { + + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in + + guard let self = self else { return } + + if shouldRetry { + cleanupRequest() + self.execute(apiResponseQueue, completion) + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + } else { + apiResponseQueue.async { + self.processRequestResponse(urlRequest: request, data: data, response: response, error: error, completion: completion) + } + } + } + + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { + observation = dataTask.progress.observe(\.fractionCompleted) { newProgress, _ in + self.progress.totalUnitCount = newProgress.totalUnitCount + self.progress.completedUnitCount = newProgress.completedUnitCount + } + + onProgressReady?(progress) + } + + dataTask.resume() + + } catch { + apiResponseQueue.async { + cleanupRequest() + completion(.failure(ErrorResponse.error(415, nil, error))) + } + } + + } + + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is URL.Type: + do { + + guard error == nil else { + throw DownloadException.responseFailed + } + + guard let data = data else { + throw DownloadException.responseDataMissing + } + + let fileManager = FileManager.default + let documentsDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] + let requestURL = try self.getURL(from: urlRequest) + + var requestPath = try self.getPath(from: requestURL) + + if let headerFileName = self.getFileName(fromContentDisposition: httpResponse.allHeaderFields["Content-Disposition"] as? String) { + requestPath = requestPath.appending("/\(headerFileName)") + } + + let filePath = documentsDirectory.appendingPathComponent(requestPath) + let directoryPath = filePath.deletingLastPathComponent().path + + try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) + try data.write(to: filePath, options: .atomic) + + completion(.success(Response(response: httpResponse, body: filePath as? T))) + + } catch let requestParserError as DownloadException { + completion(.failure(ErrorResponse.error(400, data, requestParserError))) + } catch let error { + completion(.failure(ErrorResponse.error(400, data, error))) + } + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + } + + } + + open func buildHeaders() -> [String: String] { + var httpHeaders = TestClientAPI.customHeaders + for (key, value) in self.headers { + httpHeaders[key] = value + } + return httpHeaders + } + + fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + + guard let contentDisposition = contentDisposition else { + return nil + } + + let items = contentDisposition.components(separatedBy: ";") + + var filename: String? + + for contentItem in items { + + let filenameKey = "filename=" + guard let range = contentItem.range(of: filenameKey) else { + break + } + + filename = contentItem + return filename? + .replacingCharacters(in: range, with: "") + .replacingOccurrences(of: "\"", with: "") + .trimmingCharacters(in: .whitespacesAndNewlines) + } + + return filename + + } + + fileprivate func getPath(from url: URL) throws -> String { + + guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { + throw DownloadException.requestMissingPath + } + + if path.hasPrefix("/") { + path.remove(at: path.startIndex) + } + + return path + + } + + fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + return url + } + +} + +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { + override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Result, Error>) -> Void) { + + guard let httpResponse = response as? HTTPURLResponse else { + completion(.failure(ErrorResponse.error(-2, nil, DecodableRequestBuilderError.nilHTTPResponse))) + return + } + + switch T.self { + case is String.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" + + completion(.success(Response(response: httpResponse, body: body as? T))) + + case is Void.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: nil))) + + case is Data.Type: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + completion(.success(Response(response: httpResponse, body: data as? T))) + + default: + + if let error = error { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) + return + } + + guard let data = data, !data.isEmpty else { + completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) + return + } + + let decodeResult = CodableHelper.decode(T.self, from: data) + + switch decodeResult { + case let .success(decodableObj): + completion(.success(Response(response: httpResponse, body: decodableObj))) + case let .failure(error): + completion(.failure(error)) + } + } + } +} + +private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + + var credential: URLCredential? + + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? + + public func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + + var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling + + var credential: URLCredential? + + if let taskDidReceiveChallenge = taskDidReceiveChallenge { + (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) + } else { + if challenge.previousFailureCount > 0 { + disposition = .rejectProtectionSpace + } else { + credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) + + if credential != nil { + disposition = .useCredential + } + } + } + + completionHandler(disposition, credential) + } +} + +public enum HTTPMethod: String { + case options = "OPTIONS" + case get = "GET" + case head = "HEAD" + case post = "POST" + case put = "PUT" + case patch = "PATCH" + case delete = "DELETE" + case trace = "TRACE" + case connect = "CONNECT" +} + +public protocol ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest +} + +private class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + guard let parameters = parameters else { return urlRequest } + + guard let url = urlRequest.url else { + throw DownloadException.requestMissingURL + } + + if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { + urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) + urlRequest.url = urlComponents.url + } + + return urlRequest + } +} + +private class FileUploadEncoding: ParameterEncoding { + + let contentTypeForFormPart: (_ fileURL: URL) -> String? + + init(contentTypeForFormPart: @escaping (_ fileURL: URL) -> String?) { + self.contentTypeForFormPart = contentTypeForFormPart + } + + func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { + + var urlRequest = urlRequest + + for (k, v) in parameters ?? [:] { + switch v { + case let fileURL as URL: + + let fileData = try Data(contentsOf: fileURL) + + let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) + + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: fileURL.lastPathComponent, data: fileData, mimeType: mimetype) + + case let string as String: + + if let data = string.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + case let number as NSNumber: + + if let data = number.stringValue.data(using: .utf8) { + urlRequest = configureFileUploadRequest(urlRequest: urlRequest, name: k, data: data, mimeType: nil) + } + + default: + fatalError("Unprocessable value \(v) with key \(k)") + } + } + + return urlRequest + } + + private func configureFileUploadRequest(urlRequest: URLRequest, name: String, data: Data, mimeType: String?) -> URLRequest { + + var urlRequest = urlRequest + + var body = urlRequest.httpBody ?? Data() + + // https://stackoverflow.com/a/26163136/976628 + let boundary = "Boundary-\(UUID().uuidString)" + urlRequest.addValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") + + body.append("--\(boundary)\r\n") + body.append("Content-Disposition: form-data; name=\"\(name)\"; filename=\"\(name)\"\r\n") + + if let mimeType = mimeType { + body.append("Content-Type: \(mimeType)\r\n\r\n") + } + + body.append(data) + + body.append("\r\n") + + body.append("--\(boundary)--\r\n") + + urlRequest.httpBody = body + + return urlRequest + + } + + func mimeType(for url: URL) -> String { + let pathExtension = url.pathExtension + + if let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as NSString, nil)?.takeRetainedValue() { + if let mimetype = UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)?.takeRetainedValue() { + return mimetype as String + } + } + return "application/octet-stream" + } + +} + +fileprivate extension Data { + /// Append string to NSMutableData + /// + /// Rather than littering my code with calls to `dataUsingEncoding` to convert strings to NSData, and then add that data to the NSMutableData, this wraps it in a nice convenient little extension to NSMutableData. This converts using UTF-8. + /// + /// - parameter string: The string to be added to the `NSMutableData`. + + mutating func append(_ string: String) { + if let data = string.data(using: .utf8) { + append(data) + } + } +} + +extension JSONDataEncoding: ParameterEncoding {} diff --git a/samples/client/test/swift5/default/TestClientApp/Podfile b/samples/client/test/swift5/default/TestClientApp/Podfile new file mode 100644 index 0000000000..4c786a266c --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Podfile @@ -0,0 +1,13 @@ +platform :ios, '9.0' + +source 'https://cdn.cocoapods.org/' + +use_frameworks! + +target 'TestClientApp' do + pod "TestClient", :path => "../" + + target 'TestClientAppTests' do + inherit! :search_paths + end +end diff --git a/samples/client/test/swift5/default/TestClientApp/Podfile.lock b/samples/client/test/swift5/default/TestClientApp/Podfile.lock new file mode 100644 index 0000000000..a22ff8bcb6 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - TestClient (1.0) + +DEPENDENCIES: + - TestClient (from `../`) + +EXTERNAL SOURCES: + TestClient: + :path: "../" + +SPEC CHECKSUMS: + TestClient: 2c0d16f42076221adbf579221827fd034c3c4a85 + +PODFILE CHECKSUM: 837b06bfc9f93ccd7664fd918d113c8e3824bde3 + +COCOAPODS: 1.8.4 diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Local Podspecs/TestClient.podspec.json b/samples/client/test/swift5/default/TestClientApp/Pods/Local Podspecs/TestClient.podspec.json new file mode 100644 index 0000000000..b456341de8 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Local Podspecs/TestClient.podspec.json @@ -0,0 +1,19 @@ +{ + "name": "TestClient", + "platforms": { + "ios": "9.0", + "osx": "10.11", + "tvos": "9.0", + "watchos": "3.0" + }, + "version": "1.0", + "source": { + "git": "git@github.com:OpenAPITools/openapi-generator.git", + "tag": "v1.0" + }, + "authors": "", + "license": "Proprietary", + "homepage": "https://github.com/openapitools/openapi-generator", + "summary": "TestClient", + "source_files": "TestClient/Classes/**/*.swift" +} diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Manifest.lock b/samples/client/test/swift5/default/TestClientApp/Pods/Manifest.lock new file mode 100644 index 0000000000..a22ff8bcb6 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Manifest.lock @@ -0,0 +1,16 @@ +PODS: + - TestClient (1.0) + +DEPENDENCIES: + - TestClient (from `../`) + +EXTERNAL SOURCES: + TestClient: + :path: "../" + +SPEC CHECKSUMS: + TestClient: 2c0d16f42076221adbf579221827fd034c3c4a85 + +PODFILE CHECKSUM: 837b06bfc9f93ccd7664fd918d113c8e3824bde3 + +COCOAPODS: 1.8.4 diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Pods.xcodeproj/project.pbxproj b/samples/client/test/swift5/default/TestClientApp/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..98ed66c7eb --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,946 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 02FFBA90EA5EADA19A336739D6DCCEB0 /* PlaceCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA531D40F1343004B17AB92D6ABE3FAE /* PlaceCard.swift */; }; + 05F5ACD702C860CE19DEC8FCAB87E40B /* TestClient-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BA21CEA2FE0A2984C2309B26309A86 /* TestClient-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 095D99ED77DB34E158D6487D64C577FB /* ModelDoubleArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = D96CAC1AD94153EABEA61CF4AD6F1297 /* ModelDoubleArray.swift */; }; + 23C7A6763A7E2DFD10B081432E36AB01 /* APIs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42E3FBE2279497BCA853AAC22E8FC920 /* APIs.swift */; }; + 268A90C42CD895FDF00F71736B67DEE9 /* Pods-TestClientApp-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = ECC55036EDA2E6A74F2ABC59EEEF0D23 /* Pods-TestClientApp-dummy.m */; }; + 26966BEE6C13D2513B7AFFAD84F57AFF /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D345901DAC44CC1C78E4390C24010A72 /* Extensions.swift */; }; + 279D52D2BBF4F9F41806CB559BBCC323 /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = EACAE8683B0F549B3AF4101125D897B6 /* ModelWithIntAdditionalPropertiesOnly.swift */; }; + 3AF8B7B1239281A3B72182D5BF29DECE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; + 3F82E278BBF49865698F48C2BDD3A8C8 /* ModelErrorInfoArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFE1170689EB9D3A4C951DEDACB7863 /* ModelErrorInfoArray.swift */; }; + 438C479E9FDDCDD436CA20CB1D2523E9 /* PlaceCardAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 443036458E47FB04182CB654C827E88F /* PlaceCardAllOf.swift */; }; + 4435680E8AEC40C0D41102941C65F54E /* Pods-TestClientAppTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C6EC373298C48FCAFA0DDA13E26347 /* Pods-TestClientAppTests-dummy.m */; }; + 46F6C1F49012FFD9B45EDDB8C6F9DEE8 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43377E32ED406BE472E3C2BE793D1D6F /* APIHelper.swift */; }; + 479A7BE76F5560BBE0042A2F6E43CBB0 /* URLSessionImplementations.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD30F80249F5BB6CE3807EB6F8992144 /* URLSessionImplementations.swift */; }; + 4EC1AA6BB0AD6DDE9689926005084DFB /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D6CBEFA67141C1B6F630B3A6CCFCD25 /* Models.swift */; }; + 59B3866FA296D6B33751F37409FFEC57 /* ErrorInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84118CF8982F9E76C323C67EE2F647DF /* ErrorInfo.swift */; }; + 5F369A3A957334C7121219B52C9D65AA /* SampleSubClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1168715462C609C65DF977569FD58727 /* SampleSubClass.swift */; }; + 6277449D5C1FA4A4E093CCC4C44111C2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; + 6DA3FAE017CD3551A3E2AA7BA913D351 /* JSONDataEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FB5502C079427A0D868D1B2B6B92086 /* JSONDataEncoding.swift */; }; + 7357B46081E64E0AE6ECAD986CA5DD6A /* CodableHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 259FECA51D72C4664609815109F5FD3B /* CodableHelper.swift */; }; + 73D33A91FD9B2D8B5535B1A21680A1EE /* TestClient-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 564BBF3C5D0BB297545FD0A05DE6D8B7 /* TestClient-dummy.m */; }; + 8429C4D45B15BBDDD2798A7CD92A8F43 /* StringEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0BFCAC223EB3E5661E180C8E4CBF82F /* StringEnum.swift */; }; + 87C3C30946F53347EDA3F9060C63F8D7 /* PersonCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7CB472C5319EDB53D712FD7CF2C0AD8 /* PersonCard.swift */; }; + 9AF02BB5E3C4D96BF5E6FC80237AA940 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD1711B3F916640CDACA0326190016EC /* Configuration.swift */; }; + 9FF109F83DB17F92E6076CB9E90596E9 /* SampleSubClassAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CF197DC7916DC38C05966304592E840 /* SampleSubClassAllOf.swift */; }; + A5EAA2E7E946EB46ADBE60E63142C7DC /* VariableNameTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB02FEDB97F5D4032D466D9FA25874A /* VariableNameTest.swift */; }; + A99CABE1AF2E62510C9288326F245BD8 /* GetAllModelsResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = A76B0FAEC0C5A0BF72809C3E2A1F77A9 /* GetAllModelsResult.swift */; }; + AD0D89AAFA166B9B38C1F838C00C636D /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8E88820BF62E8EDB8DF4D02D41978AC /* ModelWithStringAdditionalPropertiesOnly.swift */; }; + B33500DB9D0190B3A8592E43E12A6866 /* ModelStringArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1CBA1A8875AAAF41A6D4BDAD2C1EB8D /* ModelStringArray.swift */; }; + C07F9AA95A46282A1D273A214786D5FB /* AllPrimitives.swift in Sources */ = {isa = PBXBuildFile; fileRef = 183109838DC5804EA6FD674A8CC55417 /* AllPrimitives.swift */; }; + C1B9AB334A57F9328EF1A7C6F7F7C385 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; + C872EC896D31C3BD2C655456D24AEC79 /* OpenISO8601DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 661B3CB0BB3F17022477B8A3C61996A4 /* OpenISO8601DateFormatter.swift */; }; + D61D04428EA4D5471DF5C44394840076 /* SampleBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 403EB1B1F8417E00D264E9115BFF9778 /* SampleBase.swift */; }; + D73D105F4B969E14B6BF95A954EAB4B9 /* JSONEncodingHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B28C8A1EE76A12DB43A5FDB8342E8BE /* JSONEncodingHelper.swift */; }; + D82F0987580977B789D60461C5CD2354 /* Swift5TestAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D4A17DEA66E914BC4DC9C690C032025 /* Swift5TestAPI.swift */; }; + D8ABC53F70A4A3DD12BB92195A4F5EA2 /* SynchronizedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90C3FED83273102287DF463DA9523A58 /* SynchronizedDictionary.swift */; }; + DB43CC6E8B07E962C68B1E61347FB2AB /* PersonCardAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A01E32F0EF05821EB4D322A2E29B6B0D /* PersonCardAllOf.swift */; }; + E05C861EDA3401C16204431A09D75379 /* Pods-TestClientApp-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DE94C910653499F2AB069ACEE0FDC2DD /* Pods-TestClientApp-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E708DB732C1BC60401EC1F4CFC4718FA /* Pods-TestClientAppTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E3BC082537CA1630DA1E1DCFDB9BC495 /* Pods-TestClientAppTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F3BF0BB9E24D6FA4514D39E0900E9092 /* BaseCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 789B567B495ACBF903AB14F7C396DCF4 /* BaseCard.swift */; }; + FBFF8FA7141150DE0DDB3996C07017EF /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BEA3B4071F1F70319AE9907756D7F4C /* ModelWithPropertiesAndAdditionalProperties.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 8788B4EA1EE8B4ABC69B264C82484356 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = B72EF653ED86BEBAF8987EA7602289AA; + remoteInfo = TestClient; + }; + D46C3A7D874BD540F75F8C8EE656DAA2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9B2D563D3B39C8B41B45CEC35AFF91AB; + remoteInfo = "Pods-TestClientApp"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 03158506844BE7CC7E89C1B0570590EE /* Pods-TestClientApp-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TestClientApp-Info.plist"; sourceTree = ""; }; + 0B6986E11921769A3669DC7C6D277B81 /* TestClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = TestClient.modulemap; sourceTree = ""; }; + 0FB13DF3D35D4A25F6F47E32680D9927 /* TestClient-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "TestClient-Info.plist"; sourceTree = ""; }; + 1168715462C609C65DF977569FD58727 /* SampleSubClass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SampleSubClass.swift; sourceTree = ""; }; + 17FDC3E431E2399A6939534930387170 /* BaseCard.md */ = {isa = PBXFileReference; includeInIndex = 1; name = BaseCard.md; path = docs/BaseCard.md; sourceTree = ""; }; + 183109838DC5804EA6FD674A8CC55417 /* AllPrimitives.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = AllPrimitives.swift; sourceTree = ""; }; + 18C6EC373298C48FCAFA0DDA13E26347 /* Pods-TestClientAppTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-TestClientAppTests-dummy.m"; sourceTree = ""; }; + 193297BCDCD102E9B7B9AAA7C4B454B4 /* SampleBase.md */ = {isa = PBXFileReference; includeInIndex = 1; name = SampleBase.md; path = docs/SampleBase.md; sourceTree = ""; }; + 1BEA3B4071F1F70319AE9907756D7F4C /* ModelWithPropertiesAndAdditionalProperties.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelWithPropertiesAndAdditionalProperties.swift; sourceTree = ""; }; + 204861306843B9E8C98A4E9620D67592 /* TestClient-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TestClient-prefix.pch"; sourceTree = ""; }; + 23A1759B79F1A6D85541C7C67500B41B /* SampleSubClassAllOf.md */ = {isa = PBXFileReference; includeInIndex = 1; name = SampleSubClassAllOf.md; path = docs/SampleSubClassAllOf.md; sourceTree = ""; }; + 259FECA51D72C4664609815109F5FD3B /* CodableHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CodableHelper.swift; path = TestClient/Classes/OpenAPIs/CodableHelper.swift; sourceTree = ""; }; + 2FB5502C079427A0D868D1B2B6B92086 /* JSONDataEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONDataEncoding.swift; path = TestClient/Classes/OpenAPIs/JSONDataEncoding.swift; sourceTree = ""; }; + 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 3561CB379752919C3A72CDEBF8AF05E2 /* ErrorInfo.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ErrorInfo.md; path = docs/ErrorInfo.md; sourceTree = ""; }; + 3B28C8A1EE76A12DB43A5FDB8342E8BE /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingHelper.swift; path = TestClient/Classes/OpenAPIs/JSONEncodingHelper.swift; sourceTree = ""; }; + 3D0B805B8B34B9DFEB640A6DA64E1D60 /* PersonCard.md */ = {isa = PBXFileReference; includeInIndex = 1; name = PersonCard.md; path = docs/PersonCard.md; sourceTree = ""; }; + 403EB1B1F8417E00D264E9115BFF9778 /* SampleBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SampleBase.swift; sourceTree = ""; }; + 42E3FBE2279497BCA853AAC22E8FC920 /* APIs.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIs.swift; path = TestClient/Classes/OpenAPIs/APIs.swift; sourceTree = ""; }; + 43377E32ED406BE472E3C2BE793D1D6F /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIHelper.swift; path = TestClient/Classes/OpenAPIs/APIHelper.swift; sourceTree = ""; }; + 443036458E47FB04182CB654C827E88F /* PlaceCardAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PlaceCardAllOf.swift; sourceTree = ""; }; + 48C4EB9FB0827F886ABA8B7EBE8EEA8E /* Pods-TestClientAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TestClientAppTests.release.xcconfig"; sourceTree = ""; }; + 49D81AF16AD6E9D1CD328A788E735467 /* Swift5TestAPI.md */ = {isa = PBXFileReference; includeInIndex = 1; name = Swift5TestAPI.md; path = docs/Swift5TestAPI.md; sourceTree = ""; }; + 514DC806E09C9C69D95FB60DFDC85628 /* SampleSubClass.md */ = {isa = PBXFileReference; includeInIndex = 1; name = SampleSubClass.md; path = docs/SampleSubClass.md; sourceTree = ""; }; + 564BBF3C5D0BB297545FD0A05DE6D8B7 /* TestClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "TestClient-dummy.m"; sourceTree = ""; }; + 56BA21CEA2FE0A2984C2309B26309A86 /* TestClient-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TestClient-umbrella.h"; sourceTree = ""; }; + 5DC57D75B5D78687B4DC11CDCF20AD10 /* Pods_TestClientAppTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_TestClientAppTests.framework; path = "Pods-TestClientAppTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 661B3CB0BB3F17022477B8A3C61996A4 /* OpenISO8601DateFormatter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OpenISO8601DateFormatter.swift; path = TestClient/Classes/OpenAPIs/OpenISO8601DateFormatter.swift; sourceTree = ""; }; + 789B567B495ACBF903AB14F7C396DCF4 /* BaseCard.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BaseCard.swift; sourceTree = ""; }; + 7D6CBEFA67141C1B6F630B3A6CCFCD25 /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Models.swift; path = TestClient/Classes/OpenAPIs/Models.swift; sourceTree = ""; }; + 7E7CB11C6E8EF71424C6D3725EE67DE8 /* Pods-TestClientAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TestClientAppTests.debug.xcconfig"; sourceTree = ""; }; + 7FFDF46D7409B56C30D6FA0A2E40215E /* Pods-TestClientAppTests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TestClientAppTests-Info.plist"; sourceTree = ""; }; + 813BC85EFF5F450D59C6386A26635B0C /* PlaceCard.md */ = {isa = PBXFileReference; includeInIndex = 1; name = PlaceCard.md; path = docs/PlaceCard.md; sourceTree = ""; }; + 82FD0B66B6128354B30FB2FF3088F3A4 /* Pods-TestClientApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TestClientApp.debug.xcconfig"; sourceTree = ""; }; + 84118CF8982F9E76C323C67EE2F647DF /* ErrorInfo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ErrorInfo.swift; sourceTree = ""; }; + 88F61FFF3738A9F3E86A9080DBE03AF9 /* ModelStringArray.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ModelStringArray.md; path = docs/ModelStringArray.md; sourceTree = ""; }; + 892BF895C1CF4CDD225A15EE546704C0 /* TestClient.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = TestClient.xcconfig; sourceTree = ""; }; + 8CE012DCCB8B5B967C29637C307A4EC1 /* StringEnum.md */ = {isa = PBXFileReference; includeInIndex = 1; name = StringEnum.md; path = docs/StringEnum.md; sourceTree = ""; }; + 8D4A17DEA66E914BC4DC9C690C032025 /* Swift5TestAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Swift5TestAPI.swift; sourceTree = ""; }; + 8FD8AC6EB7F6A69BAF69A91222B2FBE7 /* ModelErrorInfoArray.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ModelErrorInfoArray.md; path = docs/ModelErrorInfoArray.md; sourceTree = ""; }; + 90C3FED83273102287DF463DA9523A58 /* SynchronizedDictionary.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDictionary.swift; path = TestClient/Classes/OpenAPIs/SynchronizedDictionary.swift; sourceTree = ""; }; + 9166C0537D2798D1EE20F58CDEDA48C2 /* Pods-TestClientAppTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-TestClientAppTests.modulemap"; sourceTree = ""; }; + 91CB91AB1B6089705AC6AC2667A91BFE /* PlaceCardAllOf.md */ = {isa = PBXFileReference; includeInIndex = 1; name = PlaceCardAllOf.md; path = docs/PlaceCardAllOf.md; sourceTree = ""; }; + 9B02CAAB34454FF0600319BD67306844 /* ModelWithPropertiesAndAdditionalProperties.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ModelWithPropertiesAndAdditionalProperties.md; path = docs/ModelWithPropertiesAndAdditionalProperties.md; sourceTree = ""; }; + 9CF197DC7916DC38C05966304592E840 /* SampleSubClassAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SampleSubClassAllOf.swift; sourceTree = ""; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9F619F6315E550CE0BE8322DB2EDBCD3 /* VariableNameTest.md */ = {isa = PBXFileReference; includeInIndex = 1; name = VariableNameTest.md; path = docs/VariableNameTest.md; sourceTree = ""; }; + A01E32F0EF05821EB4D322A2E29B6B0D /* PersonCardAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PersonCardAllOf.swift; sourceTree = ""; }; + A0BFCAC223EB3E5661E180C8E4CBF82F /* StringEnum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StringEnum.swift; sourceTree = ""; }; + A2C44571511EE10C5013D963197B890D /* Pods-TestClientApp-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-TestClientApp-acknowledgements.markdown"; sourceTree = ""; }; + A4C2E7C4FC74158B642EF7353C920280 /* Pods-TestClientAppTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TestClientAppTests-acknowledgements.plist"; sourceTree = ""; }; + A76B0FAEC0C5A0BF72809C3E2A1F77A9 /* GetAllModelsResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = GetAllModelsResult.swift; sourceTree = ""; }; + A7CB472C5319EDB53D712FD7CF2C0AD8 /* PersonCard.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PersonCard.swift; sourceTree = ""; }; + A8E88820BF62E8EDB8DF4D02D41978AC /* ModelWithStringAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelWithStringAdditionalPropertiesOnly.swift; sourceTree = ""; }; + AD30F80249F5BB6CE3807EB6F8992144 /* URLSessionImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLSessionImplementations.swift; path = TestClient/Classes/OpenAPIs/URLSessionImplementations.swift; sourceTree = ""; }; + AFBE3D468DBC68112B42C229014117EF /* Pods-TestClientApp-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TestClientApp-acknowledgements.plist"; sourceTree = ""; }; + B1D5F61FD93DB03C60173A799F6B967D /* Pods-TestClientApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TestClientApp.release.xcconfig"; sourceTree = ""; }; + B464EEB28AE56DEC88BA2908B67FEA2B /* TestClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = TestClient.framework; path = TestClient.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B63BBEF68EDA25B03A0F32C48EB924DE /* Pods-TestClientApp.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-TestClientApp.modulemap"; sourceTree = ""; }; + B90B2B512EBCEAA1BDAD6D1D006F40ED /* GetAllModelsResult.md */ = {isa = PBXFileReference; includeInIndex = 1; name = GetAllModelsResult.md; path = docs/GetAllModelsResult.md; sourceTree = ""; }; + C2475B69B16D8E2208218F7AAAA39C7E /* Pods-TestClientAppTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-TestClientAppTests-acknowledgements.markdown"; sourceTree = ""; }; + CDFE1170689EB9D3A4C951DEDACB7863 /* ModelErrorInfoArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelErrorInfoArray.swift; sourceTree = ""; }; + CE5D349FC4CC6739E48AA3EE3BEF5193 /* PersonCardAllOf.md */ = {isa = PBXFileReference; includeInIndex = 1; name = PersonCardAllOf.md; path = docs/PersonCardAllOf.md; sourceTree = ""; }; + D0FEEC683C6A55ADE0A43EFD3F9D6E2D /* ModelWithStringAdditionalPropertiesOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ModelWithStringAdditionalPropertiesOnly.md; path = docs/ModelWithStringAdditionalPropertiesOnly.md; sourceTree = ""; }; + D1CBA1A8875AAAF41A6D4BDAD2C1EB8D /* ModelStringArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelStringArray.swift; sourceTree = ""; }; + D345901DAC44CC1C78E4390C24010A72 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = TestClient/Classes/OpenAPIs/Extensions.swift; sourceTree = ""; }; + D96CAC1AD94153EABEA61CF4AD6F1297 /* ModelDoubleArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelDoubleArray.swift; sourceTree = ""; }; + DA531D40F1343004B17AB92D6ABE3FAE /* PlaceCard.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PlaceCard.swift; sourceTree = ""; }; + DDB02FEDB97F5D4032D466D9FA25874A /* VariableNameTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = VariableNameTest.swift; sourceTree = ""; }; + DE94C910653499F2AB069ACEE0FDC2DD /* Pods-TestClientApp-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-TestClientApp-umbrella.h"; sourceTree = ""; }; + E3BC082537CA1630DA1E1DCFDB9BC495 /* Pods-TestClientAppTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-TestClientAppTests-umbrella.h"; sourceTree = ""; }; + E48311A95FCE734638F61C53CE6E0C37 /* TestClient.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = TestClient.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + E64E970612B808A04B0C7AA69EE0D00F /* Pods-TestClientApp-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TestClientApp-frameworks.sh"; sourceTree = ""; }; + E92541535F215E7AE8AEFF9B43A2D82E /* ModelDoubleArray.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ModelDoubleArray.md; path = docs/ModelDoubleArray.md; sourceTree = ""; }; + EACAE8683B0F549B3AF4101125D897B6 /* ModelWithIntAdditionalPropertiesOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ModelWithIntAdditionalPropertiesOnly.swift; sourceTree = ""; }; + ECC55036EDA2E6A74F2ABC59EEEF0D23 /* Pods-TestClientApp-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-TestClientApp-dummy.m"; sourceTree = ""; }; + ED945DEFB21A893654BFD2176B34612B /* AllPrimitives.md */ = {isa = PBXFileReference; includeInIndex = 1; name = AllPrimitives.md; path = docs/AllPrimitives.md; sourceTree = ""; }; + F56DD477F6D4BD57530D442F87E1CA7E /* ModelWithIntAdditionalPropertiesOnly.md */ = {isa = PBXFileReference; includeInIndex = 1; name = ModelWithIntAdditionalPropertiesOnly.md; path = docs/ModelWithIntAdditionalPropertiesOnly.md; sourceTree = ""; }; + FD1711B3F916640CDACA0326190016EC /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = TestClient/Classes/OpenAPIs/Configuration.swift; sourceTree = ""; }; + FE01B70C59C9B12663E8EA208FEECF02 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + FED082EE959E5B5A9579D3EA6B287F66 /* Pods_TestClientApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_TestClientApp.framework; path = "Pods-TestClientApp.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 327101568922D8A5864A1EA568754ADD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3AF8B7B1239281A3B72182D5BF29DECE /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 54B50DB8B7D7164CE18CA0FC9FCAB915 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 6277449D5C1FA4A4E093CCC4C44111C2 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A5B936DFC8920559A0FA2490E8D9FC8A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C1B9AB334A57F9328EF1A7C6F7F7C385 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 01252A1AF71ABEED85368EE93297092D /* Pods-TestClientApp */ = { + isa = PBXGroup; + children = ( + B63BBEF68EDA25B03A0F32C48EB924DE /* Pods-TestClientApp.modulemap */, + A2C44571511EE10C5013D963197B890D /* Pods-TestClientApp-acknowledgements.markdown */, + AFBE3D468DBC68112B42C229014117EF /* Pods-TestClientApp-acknowledgements.plist */, + ECC55036EDA2E6A74F2ABC59EEEF0D23 /* Pods-TestClientApp-dummy.m */, + E64E970612B808A04B0C7AA69EE0D00F /* Pods-TestClientApp-frameworks.sh */, + 03158506844BE7CC7E89C1B0570590EE /* Pods-TestClientApp-Info.plist */, + DE94C910653499F2AB069ACEE0FDC2DD /* Pods-TestClientApp-umbrella.h */, + 82FD0B66B6128354B30FB2FF3088F3A4 /* Pods-TestClientApp.debug.xcconfig */, + B1D5F61FD93DB03C60173A799F6B967D /* Pods-TestClientApp.release.xcconfig */, + ); + name = "Pods-TestClientApp"; + path = "Target Support Files/Pods-TestClientApp"; + sourceTree = ""; + }; + 2B9E5065DD311AE82CAECB5D52F0FC74 /* Pods-TestClientAppTests */ = { + isa = PBXGroup; + children = ( + 9166C0537D2798D1EE20F58CDEDA48C2 /* Pods-TestClientAppTests.modulemap */, + C2475B69B16D8E2208218F7AAAA39C7E /* Pods-TestClientAppTests-acknowledgements.markdown */, + A4C2E7C4FC74158B642EF7353C920280 /* Pods-TestClientAppTests-acknowledgements.plist */, + 18C6EC373298C48FCAFA0DDA13E26347 /* Pods-TestClientAppTests-dummy.m */, + 7FFDF46D7409B56C30D6FA0A2E40215E /* Pods-TestClientAppTests-Info.plist */, + E3BC082537CA1630DA1E1DCFDB9BC495 /* Pods-TestClientAppTests-umbrella.h */, + 7E7CB11C6E8EF71424C6D3725EE67DE8 /* Pods-TestClientAppTests.debug.xcconfig */, + 48C4EB9FB0827F886ABA8B7EBE8EEA8E /* Pods-TestClientAppTests.release.xcconfig */, + ); + name = "Pods-TestClientAppTests"; + path = "Target Support Files/Pods-TestClientAppTests"; + sourceTree = ""; + }; + 3789220B380FDAD8643BE44B7446E0C5 /* TestClient */ = { + isa = PBXGroup; + children = ( + 43377E32ED406BE472E3C2BE793D1D6F /* APIHelper.swift */, + 42E3FBE2279497BCA853AAC22E8FC920 /* APIs.swift */, + 259FECA51D72C4664609815109F5FD3B /* CodableHelper.swift */, + FD1711B3F916640CDACA0326190016EC /* Configuration.swift */, + D345901DAC44CC1C78E4390C24010A72 /* Extensions.swift */, + 2FB5502C079427A0D868D1B2B6B92086 /* JSONDataEncoding.swift */, + 3B28C8A1EE76A12DB43A5FDB8342E8BE /* JSONEncodingHelper.swift */, + 7D6CBEFA67141C1B6F630B3A6CCFCD25 /* Models.swift */, + 661B3CB0BB3F17022477B8A3C61996A4 /* OpenISO8601DateFormatter.swift */, + 90C3FED83273102287DF463DA9523A58 /* SynchronizedDictionary.swift */, + AD30F80249F5BB6CE3807EB6F8992144 /* URLSessionImplementations.swift */, + 8792629FA71C508FF0986C24235216A1 /* APIs */, + E64AF38AF1D0D81ABCA7EF5CFA5BD0E0 /* Models */, + 878CFB58CCBFBE1363538597FBB57530 /* Pod */, + C8A2DBD77EC3BF915B278C880B2533FE /* Support Files */, + ); + name = TestClient; + path = ../..; + sourceTree = ""; + }; + 3C4C30950B0A5E0D571BF164238CE41C /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 01252A1AF71ABEED85368EE93297092D /* Pods-TestClientApp */, + 2B9E5065DD311AE82CAECB5D52F0FC74 /* Pods-TestClientAppTests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 7F969031BA2C2DCF934422D909C9DF33 /* Development Pods */ = { + isa = PBXGroup; + children = ( + 3789220B380FDAD8643BE44B7446E0C5 /* TestClient */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + 82487862487832CCB0A8662A9AF1E6F4 /* Products */ = { + isa = PBXGroup; + children = ( + FED082EE959E5B5A9579D3EA6B287F66 /* Pods_TestClientApp.framework */, + 5DC57D75B5D78687B4DC11CDCF20AD10 /* Pods_TestClientAppTests.framework */, + B464EEB28AE56DEC88BA2908B67FEA2B /* TestClient.framework */, + ); + name = Products; + sourceTree = ""; + }; + 878CFB58CCBFBE1363538597FBB57530 /* Pod */ = { + isa = PBXGroup; + children = ( + ED945DEFB21A893654BFD2176B34612B /* AllPrimitives.md */, + 17FDC3E431E2399A6939534930387170 /* BaseCard.md */, + 3561CB379752919C3A72CDEBF8AF05E2 /* ErrorInfo.md */, + B90B2B512EBCEAA1BDAD6D1D006F40ED /* GetAllModelsResult.md */, + E92541535F215E7AE8AEFF9B43A2D82E /* ModelDoubleArray.md */, + 8FD8AC6EB7F6A69BAF69A91222B2FBE7 /* ModelErrorInfoArray.md */, + 88F61FFF3738A9F3E86A9080DBE03AF9 /* ModelStringArray.md */, + F56DD477F6D4BD57530D442F87E1CA7E /* ModelWithIntAdditionalPropertiesOnly.md */, + 9B02CAAB34454FF0600319BD67306844 /* ModelWithPropertiesAndAdditionalProperties.md */, + D0FEEC683C6A55ADE0A43EFD3F9D6E2D /* ModelWithStringAdditionalPropertiesOnly.md */, + 3D0B805B8B34B9DFEB640A6DA64E1D60 /* PersonCard.md */, + CE5D349FC4CC6739E48AA3EE3BEF5193 /* PersonCardAllOf.md */, + 813BC85EFF5F450D59C6386A26635B0C /* PlaceCard.md */, + 91CB91AB1B6089705AC6AC2667A91BFE /* PlaceCardAllOf.md */, + FE01B70C59C9B12663E8EA208FEECF02 /* README.md */, + 193297BCDCD102E9B7B9AAA7C4B454B4 /* SampleBase.md */, + 514DC806E09C9C69D95FB60DFDC85628 /* SampleSubClass.md */, + 23A1759B79F1A6D85541C7C67500B41B /* SampleSubClassAllOf.md */, + 8CE012DCCB8B5B967C29637C307A4EC1 /* StringEnum.md */, + 49D81AF16AD6E9D1CD328A788E735467 /* Swift5TestAPI.md */, + E48311A95FCE734638F61C53CE6E0C37 /* TestClient.podspec */, + 9F619F6315E550CE0BE8322DB2EDBCD3 /* VariableNameTest.md */, + ); + name = Pod; + sourceTree = ""; + }; + 8792629FA71C508FF0986C24235216A1 /* APIs */ = { + isa = PBXGroup; + children = ( + 8D4A17DEA66E914BC4DC9C690C032025 /* Swift5TestAPI.swift */, + ); + name = APIs; + path = TestClient/Classes/OpenAPIs/APIs; + sourceTree = ""; + }; + C0834CEBB1379A84116EF29F93051C60 /* iOS */ = { + isa = PBXGroup; + children = ( + 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + C8A2DBD77EC3BF915B278C880B2533FE /* Support Files */ = { + isa = PBXGroup; + children = ( + 0B6986E11921769A3669DC7C6D277B81 /* TestClient.modulemap */, + 892BF895C1CF4CDD225A15EE546704C0 /* TestClient.xcconfig */, + 564BBF3C5D0BB297545FD0A05DE6D8B7 /* TestClient-dummy.m */, + 0FB13DF3D35D4A25F6F47E32680D9927 /* TestClient-Info.plist */, + 204861306843B9E8C98A4E9620D67592 /* TestClient-prefix.pch */, + 56BA21CEA2FE0A2984C2309B26309A86 /* TestClient-umbrella.h */, + ); + name = "Support Files"; + path = "TestClientApp/Pods/Target Support Files/TestClient"; + sourceTree = ""; + }; + CF1408CF629C7361332E53B88F7BD30C = { + isa = PBXGroup; + children = ( + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + 7F969031BA2C2DCF934422D909C9DF33 /* Development Pods */, + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, + 82487862487832CCB0A8662A9AF1E6F4 /* Products */, + 3C4C30950B0A5E0D571BF164238CE41C /* Targets Support Files */, + ); + sourceTree = ""; + }; + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { + isa = PBXGroup; + children = ( + C0834CEBB1379A84116EF29F93051C60 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + E64AF38AF1D0D81ABCA7EF5CFA5BD0E0 /* Models */ = { + isa = PBXGroup; + children = ( + 183109838DC5804EA6FD674A8CC55417 /* AllPrimitives.swift */, + 789B567B495ACBF903AB14F7C396DCF4 /* BaseCard.swift */, + 84118CF8982F9E76C323C67EE2F647DF /* ErrorInfo.swift */, + A76B0FAEC0C5A0BF72809C3E2A1F77A9 /* GetAllModelsResult.swift */, + D96CAC1AD94153EABEA61CF4AD6F1297 /* ModelDoubleArray.swift */, + CDFE1170689EB9D3A4C951DEDACB7863 /* ModelErrorInfoArray.swift */, + D1CBA1A8875AAAF41A6D4BDAD2C1EB8D /* ModelStringArray.swift */, + EACAE8683B0F549B3AF4101125D897B6 /* ModelWithIntAdditionalPropertiesOnly.swift */, + 1BEA3B4071F1F70319AE9907756D7F4C /* ModelWithPropertiesAndAdditionalProperties.swift */, + A8E88820BF62E8EDB8DF4D02D41978AC /* ModelWithStringAdditionalPropertiesOnly.swift */, + A7CB472C5319EDB53D712FD7CF2C0AD8 /* PersonCard.swift */, + A01E32F0EF05821EB4D322A2E29B6B0D /* PersonCardAllOf.swift */, + DA531D40F1343004B17AB92D6ABE3FAE /* PlaceCard.swift */, + 443036458E47FB04182CB654C827E88F /* PlaceCardAllOf.swift */, + 403EB1B1F8417E00D264E9115BFF9778 /* SampleBase.swift */, + 1168715462C609C65DF977569FD58727 /* SampleSubClass.swift */, + 9CF197DC7916DC38C05966304592E840 /* SampleSubClassAllOf.swift */, + A0BFCAC223EB3E5661E180C8E4CBF82F /* StringEnum.swift */, + DDB02FEDB97F5D4032D466D9FA25874A /* VariableNameTest.swift */, + ); + name = Models; + path = TestClient/Classes/OpenAPIs/Models; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 858130C406B2CBB8EDA467FC3C16AC7B /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 05F5ACD702C860CE19DEC8FCAB87E40B /* TestClient-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E6E241430EFD0B12D73F2514BE42A902 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E05C861EDA3401C16204431A09D75379 /* Pods-TestClientApp-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F85310E66C57158DB3FA693AF79EDAC7 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E708DB732C1BC60401EC1F4CFC4718FA /* Pods-TestClientAppTests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 2D75029181FED2A76CE4D7E9C7324E1A /* Pods-TestClientAppTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = F5DCF5CCC2DD022C81242D669FBA2A53 /* Build configuration list for PBXNativeTarget "Pods-TestClientAppTests" */; + buildPhases = ( + F85310E66C57158DB3FA693AF79EDAC7 /* Headers */, + FEBEDF2CD3F3F14C05232EC28A5EF48C /* Sources */, + 54B50DB8B7D7164CE18CA0FC9FCAB915 /* Frameworks */, + 03481D112E7D051F903DE8784BF22687 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + EC9E65DA36BCE418EF8ACAEA50766BBA /* PBXTargetDependency */, + ); + name = "Pods-TestClientAppTests"; + productName = "Pods-TestClientAppTests"; + productReference = 5DC57D75B5D78687B4DC11CDCF20AD10 /* Pods_TestClientAppTests.framework */; + productType = "com.apple.product-type.framework"; + }; + 9B2D563D3B39C8B41B45CEC35AFF91AB /* Pods-TestClientApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = D8CA9B2C39BEDB78745943095DB0F76A /* Build configuration list for PBXNativeTarget "Pods-TestClientApp" */; + buildPhases = ( + E6E241430EFD0B12D73F2514BE42A902 /* Headers */, + 30376D28819EB4222324B1599818AA2E /* Sources */, + 327101568922D8A5864A1EA568754ADD /* Frameworks */, + 249B61D9BD8682D922DADE95CF024037 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + B6CB5A55B80757512913E8C17BE67BA1 /* PBXTargetDependency */, + ); + name = "Pods-TestClientApp"; + productName = "Pods-TestClientApp"; + productReference = FED082EE959E5B5A9579D3EA6B287F66 /* Pods_TestClientApp.framework */; + productType = "com.apple.product-type.framework"; + }; + B72EF653ED86BEBAF8987EA7602289AA /* TestClient */ = { + isa = PBXNativeTarget; + buildConfigurationList = 45A0725886CC4152E1A7A7895FD616FE /* Build configuration list for PBXNativeTarget "TestClient" */; + buildPhases = ( + 858130C406B2CBB8EDA467FC3C16AC7B /* Headers */, + 891FDC0ECDDDC0341FD69A8163332A57 /* Sources */, + A5B936DFC8920559A0FA2490E8D9FC8A /* Frameworks */, + 2BE7CABBA55E1D7FEFDEE56BE2272511 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TestClient; + productName = TestClient; + productReference = B464EEB28AE56DEC88BA2908B67FEA2B /* TestClient.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BFDFE7DC352907FC980B868725387E98 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1100; + LastUpgradeCheck = 1100; + }; + buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = CF1408CF629C7361332E53B88F7BD30C; + productRefGroup = 82487862487832CCB0A8662A9AF1E6F4 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 9B2D563D3B39C8B41B45CEC35AFF91AB /* Pods-TestClientApp */, + 2D75029181FED2A76CE4D7E9C7324E1A /* Pods-TestClientAppTests */, + B72EF653ED86BEBAF8987EA7602289AA /* TestClient */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 03481D112E7D051F903DE8784BF22687 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 249B61D9BD8682D922DADE95CF024037 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2BE7CABBA55E1D7FEFDEE56BE2272511 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 30376D28819EB4222324B1599818AA2E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 268A90C42CD895FDF00F71736B67DEE9 /* Pods-TestClientApp-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 891FDC0ECDDDC0341FD69A8163332A57 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C07F9AA95A46282A1D273A214786D5FB /* AllPrimitives.swift in Sources */, + 46F6C1F49012FFD9B45EDDB8C6F9DEE8 /* APIHelper.swift in Sources */, + 23C7A6763A7E2DFD10B081432E36AB01 /* APIs.swift in Sources */, + F3BF0BB9E24D6FA4514D39E0900E9092 /* BaseCard.swift in Sources */, + 7357B46081E64E0AE6ECAD986CA5DD6A /* CodableHelper.swift in Sources */, + 9AF02BB5E3C4D96BF5E6FC80237AA940 /* Configuration.swift in Sources */, + 59B3866FA296D6B33751F37409FFEC57 /* ErrorInfo.swift in Sources */, + 26966BEE6C13D2513B7AFFAD84F57AFF /* Extensions.swift in Sources */, + A99CABE1AF2E62510C9288326F245BD8 /* GetAllModelsResult.swift in Sources */, + 6DA3FAE017CD3551A3E2AA7BA913D351 /* JSONDataEncoding.swift in Sources */, + D73D105F4B969E14B6BF95A954EAB4B9 /* JSONEncodingHelper.swift in Sources */, + 095D99ED77DB34E158D6487D64C577FB /* ModelDoubleArray.swift in Sources */, + 3F82E278BBF49865698F48C2BDD3A8C8 /* ModelErrorInfoArray.swift in Sources */, + 4EC1AA6BB0AD6DDE9689926005084DFB /* Models.swift in Sources */, + B33500DB9D0190B3A8592E43E12A6866 /* ModelStringArray.swift in Sources */, + 279D52D2BBF4F9F41806CB559BBCC323 /* ModelWithIntAdditionalPropertiesOnly.swift in Sources */, + FBFF8FA7141150DE0DDB3996C07017EF /* ModelWithPropertiesAndAdditionalProperties.swift in Sources */, + AD0D89AAFA166B9B38C1F838C00C636D /* ModelWithStringAdditionalPropertiesOnly.swift in Sources */, + C872EC896D31C3BD2C655456D24AEC79 /* OpenISO8601DateFormatter.swift in Sources */, + 87C3C30946F53347EDA3F9060C63F8D7 /* PersonCard.swift in Sources */, + DB43CC6E8B07E962C68B1E61347FB2AB /* PersonCardAllOf.swift in Sources */, + 02FFBA90EA5EADA19A336739D6DCCEB0 /* PlaceCard.swift in Sources */, + 438C479E9FDDCDD436CA20CB1D2523E9 /* PlaceCardAllOf.swift in Sources */, + D61D04428EA4D5471DF5C44394840076 /* SampleBase.swift in Sources */, + 5F369A3A957334C7121219B52C9D65AA /* SampleSubClass.swift in Sources */, + 9FF109F83DB17F92E6076CB9E90596E9 /* SampleSubClassAllOf.swift in Sources */, + 8429C4D45B15BBDDD2798A7CD92A8F43 /* StringEnum.swift in Sources */, + D82F0987580977B789D60461C5CD2354 /* Swift5TestAPI.swift in Sources */, + D8ABC53F70A4A3DD12BB92195A4F5EA2 /* SynchronizedDictionary.swift in Sources */, + 73D33A91FD9B2D8B5535B1A21680A1EE /* TestClient-dummy.m in Sources */, + 479A7BE76F5560BBE0042A2F6E43CBB0 /* URLSessionImplementations.swift in Sources */, + A5EAA2E7E946EB46ADBE60E63142C7DC /* VariableNameTest.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FEBEDF2CD3F3F14C05232EC28A5EF48C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4435680E8AEC40C0D41102941C65F54E /* Pods-TestClientAppTests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + B6CB5A55B80757512913E8C17BE67BA1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = TestClient; + target = B72EF653ED86BEBAF8987EA7602289AA /* TestClient */; + targetProxy = 8788B4EA1EE8B4ABC69B264C82484356 /* PBXContainerItemProxy */; + }; + EC9E65DA36BCE418EF8ACAEA50766BBA /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Pods-TestClientApp"; + target = 9B2D563D3B39C8B41B45CEC35AFF91AB /* Pods-TestClientApp */; + targetProxy = D46C3A7D874BD540F75F8C8EE656DAA2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 26821E448371EE4D3CACAB666C0DD54C /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B1D5F61FD93DB03C60173A799F6B967D /* Pods-TestClientApp.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 314DD2576941BC5109AABA2E6BD37A27 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7E7CB11C6E8EF71424C6D3725EE67DE8 /* Pods-TestClientAppTests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 6B10B4960C2B7D01BF4E0B482EAE4FF3 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 892BF895C1CF4CDD225A15EE546704C0 /* TestClient.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/TestClient/TestClient-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/TestClient/TestClient-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/TestClient/TestClient.modulemap"; + PRODUCT_MODULE_NAME = TestClient; + PRODUCT_NAME = TestClient; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 8F17DC3A99F99FBAD606CE6963886315 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + 916E0404255105F480DC4950B7625F7A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 926D375A4143EDE2E3E666DCD5E26F99 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 892BF895C1CF4CDD225A15EE546704C0 /* TestClient.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/TestClient/TestClient-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/TestClient/TestClient-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/TestClient/TestClient.modulemap"; + PRODUCT_MODULE_NAME = TestClient; + PRODUCT_NAME = TestClient; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 9E4BD420AF2B260F58836E81540845FA /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 82FD0B66B6128354B30FB2FF3088F3A4 /* Pods-TestClientApp.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + C8ED66A74D418771F0B335943A7704DC /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 48C4EB9FB0827F886ABA8B7EBE8EEA8E /* Pods-TestClientAppTests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 45A0725886CC4152E1A7A7895FD616FE /* Build configuration list for PBXNativeTarget "TestClient" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6B10B4960C2B7D01BF4E0B482EAE4FF3 /* Debug */, + 926D375A4143EDE2E3E666DCD5E26F99 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 916E0404255105F480DC4950B7625F7A /* Debug */, + 8F17DC3A99F99FBAD606CE6963886315 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D8CA9B2C39BEDB78745943095DB0F76A /* Build configuration list for PBXNativeTarget "Pods-TestClientApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 9E4BD420AF2B260F58836E81540845FA /* Debug */, + 26821E448371EE4D3CACAB666C0DD54C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F5DCF5CCC2DD022C81242D669FBA2A53 /* Build configuration list for PBXNativeTarget "Pods-TestClientAppTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 314DD2576941BC5109AABA2E6BD37A27 /* Debug */, + C8ED66A74D418771F0B335943A7704DC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; +} diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-Info.plist b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-Info.plist new file mode 100644 index 0000000000..2243fe6e27 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-acknowledgements.markdown b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-acknowledgements.markdown new file mode 100644 index 0000000000..102af75385 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-acknowledgements.plist b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-acknowledgements.plist new file mode 100644 index 0000000000..7acbad1eab --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-dummy.m b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-dummy.m new file mode 100644 index 0000000000..7403e9c5de --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_TestClientApp : NSObject +@end +@implementation PodsDummy_Pods_TestClientApp +@end diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh new file mode 100755 index 0000000000..c56fc03c6b --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh @@ -0,0 +1,171 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +function on_error { + echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" +} +trap 'on_error $LINENO' ERR + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + elif [ -L "${binary}" ]; then + echo "Destination binary is symlinked..." + dirname="$(dirname "${binary}")" + binary="${dirname}/$(readlink "${binary}")" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# Copies the bcsymbolmap files of a vendored framework +install_bcsymbolmap() { + local bcsymbolmap_path="$1" + local destination="${BUILT_PRODUCTS_DIR}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identity + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/TestClient/TestClient.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/TestClient/TestClient.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-umbrella.h b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-umbrella.h new file mode 100644 index 0000000000..1004f0f704 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_TestClientAppVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_TestClientAppVersionString[]; + diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig new file mode 100644 index 0000000000..e5573a7781 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig @@ -0,0 +1,12 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/TestClient" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/TestClient/TestClient.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -framework "TestClient" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.modulemap b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.modulemap new file mode 100644 index 0000000000..6f2c78be74 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.modulemap @@ -0,0 +1,6 @@ +framework module Pods_TestClientApp { + umbrella header "Pods-TestClientApp-umbrella.h" + + export * + module * { export * } +} diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig new file mode 100644 index 0000000000..e5573a7781 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig @@ -0,0 +1,12 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/TestClient" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/TestClient/TestClient.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_LDFLAGS = $(inherited) -framework "TestClient" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-Info.plist b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-Info.plist new file mode 100644 index 0000000000..2243fe6e27 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-acknowledgements.markdown b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-acknowledgements.markdown new file mode 100644 index 0000000000..102af75385 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-acknowledgements.markdown @@ -0,0 +1,3 @@ +# Acknowledgements +This application makes use of the following third party libraries: +Generated by CocoaPods - https://cocoapods.org diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-acknowledgements.plist b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-acknowledgements.plist new file mode 100644 index 0000000000..7acbad1eab --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-acknowledgements.plist @@ -0,0 +1,29 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-dummy.m b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-dummy.m new file mode 100644 index 0000000000..391cf05865 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_TestClientAppTests : NSObject +@end +@implementation PodsDummy_Pods_TestClientAppTests +@end diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-umbrella.h b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-umbrella.h new file mode 100644 index 0000000000..f3c84c4c89 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_TestClientAppTestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_TestClientAppTestsVersionString[]; + diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig new file mode 100644 index 0000000000..1e9d8f110e --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig @@ -0,0 +1,9 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/TestClient" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/TestClient/TestClient.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "TestClient" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.modulemap b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.modulemap new file mode 100644 index 0000000000..a763c71493 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_TestClientAppTests { + umbrella header "Pods-TestClientAppTests-umbrella.h" + + export * + module * { export * } +} diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig new file mode 100644 index 0000000000..1e9d8f110e --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig @@ -0,0 +1,9 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/TestClient" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/TestClient/TestClient.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "TestClient" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-Info.plist b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-Info.plist new file mode 100644 index 0000000000..2243fe6e27 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-dummy.m b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-dummy.m new file mode 100644 index 0000000000..e9a709a985 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_TestClient : NSObject +@end +@implementation PodsDummy_TestClient +@end diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-prefix.pch b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-prefix.pch new file mode 100644 index 0000000000..beb2a24418 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-umbrella.h b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-umbrella.h new file mode 100644 index 0000000000..57d4c595bc --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double TestClientVersionNumber; +FOUNDATION_EXPORT const unsigned char TestClientVersionString[]; + diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.modulemap b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.modulemap new file mode 100644 index 0000000000..645349a23a --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.modulemap @@ -0,0 +1,6 @@ +framework module TestClient { + umbrella header "TestClient-umbrella.h" + + export * + module * { export * } +} diff --git a/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.xcconfig b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.xcconfig new file mode 100644 index 0000000000..13f3de1022 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/Pods/Target Support Files/TestClient/TestClient.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/TestClient +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..0df5e64abe --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.pbxproj @@ -0,0 +1,546 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 38F9390AFCDA262FB068DF15 /* Pods_TestClientApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A23B54E8FB808BD3C9DD08C8 /* Pods_TestClientApp.framework */; }; + C1ADDA787241158A360D054C /* Pods_TestClientAppTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7476A9BCC24D9147A35E4C81 /* Pods_TestClientAppTests.framework */; }; + FDC99C781F1E832E000EB08F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDC99C771F1E832E000EB08F /* AppDelegate.swift */; }; + FDC99C7A1F1E832E000EB08F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDC99C791F1E832E000EB08F /* ViewController.swift */; }; + FDC99C7D1F1E832E000EB08F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FDC99C7B1F1E832E000EB08F /* Main.storyboard */; }; + FDC99C7F1F1E832E000EB08F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FDC99C7E1F1E832E000EB08F /* Assets.xcassets */; }; + FDC99C821F1E832E000EB08F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FDC99C801F1E832E000EB08F /* LaunchScreen.storyboard */; }; + FDC99C8D1F1E832E000EB08F /* TestClientAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDC99C8C1F1E832E000EB08F /* TestClientAppTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + FDC99C891F1E832E000EB08F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = FDC99C6C1F1E832D000EB08F /* Project object */; + proxyType = 1; + remoteGlobalIDString = FDC99C731F1E832D000EB08F; + remoteInfo = TestClientApp; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 3DE372F32029703A6CED4209 /* Pods-TestClientAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientAppTests.release.xcconfig"; path = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.release.xcconfig"; sourceTree = ""; }; + 6DB31B4AAB586D1D0C5D8EA5 /* Pods-TestClientAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientAppTests.debug.xcconfig"; path = "Target Support Files/Pods-TestClientAppTests/Pods-TestClientAppTests.debug.xcconfig"; sourceTree = ""; }; + 7476A9BCC24D9147A35E4C81 /* Pods_TestClientAppTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TestClientAppTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A23B54E8FB808BD3C9DD08C8 /* Pods_TestClientApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TestClientApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F7DC1AA685120D6BF86B80A5 /* Pods-TestClientApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientApp.debug.xcconfig"; path = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.debug.xcconfig"; sourceTree = ""; }; + FD4690FD2BC8291E69C8FD40 /* Pods-TestClientApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TestClientApp.release.xcconfig"; path = "Target Support Files/Pods-TestClientApp/Pods-TestClientApp.release.xcconfig"; sourceTree = ""; }; + FDC99C741F1E832E000EB08F /* TestClientApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestClientApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + FDC99C771F1E832E000EB08F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + FDC99C791F1E832E000EB08F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + FDC99C7C1F1E832E000EB08F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + FDC99C7E1F1E832E000EB08F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + FDC99C811F1E832E000EB08F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + FDC99C831F1E832E000EB08F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + FDC99C881F1E832E000EB08F /* TestClientAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestClientAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + FDC99C8C1F1E832E000EB08F /* TestClientAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestClientAppTests.swift; sourceTree = ""; }; + FDC99C8E1F1E832E000EB08F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + FDC99C711F1E832D000EB08F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 38F9390AFCDA262FB068DF15 /* Pods_TestClientApp.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FDC99C851F1E832E000EB08F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C1ADDA787241158A360D054C /* Pods_TestClientAppTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 14E10881047978AE906EB19F /* Frameworks */ = { + isa = PBXGroup; + children = ( + A23B54E8FB808BD3C9DD08C8 /* Pods_TestClientApp.framework */, + 7476A9BCC24D9147A35E4C81 /* Pods_TestClientAppTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + CF51681F23C24C36AAED2CE8 /* Pods */ = { + isa = PBXGroup; + children = ( + F7DC1AA685120D6BF86B80A5 /* Pods-TestClientApp.debug.xcconfig */, + FD4690FD2BC8291E69C8FD40 /* Pods-TestClientApp.release.xcconfig */, + 6DB31B4AAB586D1D0C5D8EA5 /* Pods-TestClientAppTests.debug.xcconfig */, + 3DE372F32029703A6CED4209 /* Pods-TestClientAppTests.release.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + FDC99C6B1F1E832D000EB08F = { + isa = PBXGroup; + children = ( + FDC99C761F1E832E000EB08F /* TestClientApp */, + FDC99C8B1F1E832E000EB08F /* TestClientAppTests */, + FDC99C751F1E832E000EB08F /* Products */, + CF51681F23C24C36AAED2CE8 /* Pods */, + 14E10881047978AE906EB19F /* Frameworks */, + ); + sourceTree = ""; + }; + FDC99C751F1E832E000EB08F /* Products */ = { + isa = PBXGroup; + children = ( + FDC99C741F1E832E000EB08F /* TestClientApp.app */, + FDC99C881F1E832E000EB08F /* TestClientAppTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + FDC99C761F1E832E000EB08F /* TestClientApp */ = { + isa = PBXGroup; + children = ( + FDC99C771F1E832E000EB08F /* AppDelegate.swift */, + FDC99C791F1E832E000EB08F /* ViewController.swift */, + FDC99C7B1F1E832E000EB08F /* Main.storyboard */, + FDC99C7E1F1E832E000EB08F /* Assets.xcassets */, + FDC99C801F1E832E000EB08F /* LaunchScreen.storyboard */, + FDC99C831F1E832E000EB08F /* Info.plist */, + ); + path = TestClientApp; + sourceTree = ""; + }; + FDC99C8B1F1E832E000EB08F /* TestClientAppTests */ = { + isa = PBXGroup; + children = ( + FDC99C8C1F1E832E000EB08F /* TestClientAppTests.swift */, + FDC99C8E1F1E832E000EB08F /* Info.plist */, + ); + path = TestClientAppTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + FDC99C731F1E832D000EB08F /* TestClientApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = FDC99C911F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientApp" */; + buildPhases = ( + 49D4BFD3E4300757B94A1108 /* [CP] Check Pods Manifest.lock */, + FDC99C701F1E832D000EB08F /* Sources */, + FDC99C711F1E832D000EB08F /* Frameworks */, + FDC99C721F1E832D000EB08F /* Resources */, + 963B093FCC81F62B36EB9CB5 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TestClientApp; + productName = TestClientApp; + productReference = FDC99C741F1E832E000EB08F /* TestClientApp.app */; + productType = "com.apple.product-type.application"; + }; + FDC99C871F1E832E000EB08F /* TestClientAppTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = FDC99C941F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientAppTests" */; + buildPhases = ( + 29B2A5322E23310EC5D6B2DD /* [CP] Check Pods Manifest.lock */, + FDC99C841F1E832E000EB08F /* Sources */, + FDC99C851F1E832E000EB08F /* Frameworks */, + FDC99C861F1E832E000EB08F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + FDC99C8A1F1E832E000EB08F /* PBXTargetDependency */, + ); + name = TestClientAppTests; + productName = TestClientAppTests; + productReference = FDC99C881F1E832E000EB08F /* TestClientAppTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + FDC99C6C1F1E832D000EB08F /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0900; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = "Swagger Codegen"; + TargetAttributes = { + FDC99C731F1E832D000EB08F = { + CreatedOnToolsVersion = 9.0; + }; + FDC99C871F1E832E000EB08F = { + CreatedOnToolsVersion = 9.0; + TestTargetID = FDC99C731F1E832D000EB08F; + }; + }; + }; + buildConfigurationList = FDC99C6F1F1E832D000EB08F /* Build configuration list for PBXProject "TestClientApp" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = FDC99C6B1F1E832D000EB08F; + productRefGroup = FDC99C751F1E832E000EB08F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + FDC99C731F1E832D000EB08F /* TestClientApp */, + FDC99C871F1E832E000EB08F /* TestClientAppTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + FDC99C721F1E832D000EB08F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FDC99C821F1E832E000EB08F /* LaunchScreen.storyboard in Resources */, + FDC99C7F1F1E832E000EB08F /* Assets.xcassets in Resources */, + FDC99C7D1F1E832E000EB08F /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FDC99C861F1E832E000EB08F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 29B2A5322E23310EC5D6B2DD /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-TestClientAppTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 49D4BFD3E4300757B94A1108 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-TestClientApp-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 963B093FCC81F62B36EB9CB5 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/TestClient/TestClient.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TestClient.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TestClientApp/Pods-TestClientApp-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + FDC99C701F1E832D000EB08F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FDC99C7A1F1E832E000EB08F /* ViewController.swift in Sources */, + FDC99C781F1E832E000EB08F /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FDC99C841F1E832E000EB08F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + FDC99C8D1F1E832E000EB08F /* TestClientAppTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + FDC99C8A1F1E832E000EB08F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = FDC99C731F1E832D000EB08F /* TestClientApp */; + targetProxy = FDC99C891F1E832E000EB08F /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + FDC99C7B1F1E832E000EB08F /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + FDC99C7C1F1E832E000EB08F /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + FDC99C801F1E832E000EB08F /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + FDC99C811F1E832E000EB08F /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + FDC99C8F1F1E832E000EB08F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + FDC99C901F1E832E000EB08F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + FDC99C921F1E832E000EB08F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F7DC1AA685120D6BF86B80A5 /* Pods-TestClientApp.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = 82A2S5FGTA; + INFOPLIST_FILE = TestClientApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + FDC99C931F1E832E000EB08F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FD4690FD2BC8291E69C8FD40 /* Pods-TestClientApp.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = 82A2S5FGTA; + INFOPLIST_FILE = TestClientApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + FDC99C951F1E832E000EB08F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6DB31B4AAB586D1D0C5D8EA5 /* Pods-TestClientAppTests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = 82A2S5FGTA; + INFOPLIST_FILE = TestClientAppTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientAppTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestClientApp.app/TestClientApp"; + }; + name = Debug; + }; + FDC99C961F1E832E000EB08F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3DE372F32029703A6CED4209 /* Pods-TestClientAppTests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = 82A2S5FGTA; + INFOPLIST_FILE = TestClientAppTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.swagger.TestClientAppTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestClientApp.app/TestClientApp"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + FDC99C6F1F1E832D000EB08F /* Build configuration list for PBXProject "TestClientApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FDC99C8F1F1E832E000EB08F /* Debug */, + FDC99C901F1E832E000EB08F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + FDC99C911F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FDC99C921F1E832E000EB08F /* Debug */, + FDC99C931F1E832E000EB08F /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + FDC99C941F1E832E000EB08F /* Build configuration list for PBXNativeTarget "TestClientAppTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + FDC99C951F1E832E000EB08F /* Debug */, + FDC99C961F1E832E000EB08F /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = FDC99C6C1F1E832D000EB08F /* Project object */; +} diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..8a25971ab6 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..ad74fb61eb --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/AppDelegate.swift b/samples/client/test/swift5/default/TestClientApp/TestClientApp/AppDelegate.swift new file mode 100644 index 0000000000..f8a7b948d8 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientApp/AppDelegate.swift @@ -0,0 +1,43 @@ +// +// AppDelegate.swift +// TestClientApp +// +// Created by Eric Hyche on 7/18/17. +// Copyright © 2017 Swagger Codegen. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + +} diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..1d060ed288 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..5654142a8a --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..7ef2ecfcfd --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/Info.plist b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Info.plist new file mode 100644 index 0000000000..16be3b6811 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientApp/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientApp/ViewController.swift b/samples/client/test/swift5/default/TestClientApp/TestClientApp/ViewController.swift new file mode 100644 index 0000000000..a5f289c421 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientApp/ViewController.swift @@ -0,0 +1,23 @@ +// +// ViewController.swift +// TestClientApp +// +// Created by Eric Hyche on 7/18/17. +// Copyright © 2017 Swagger Codegen. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/Info.plist b/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/Info.plist new file mode 100644 index 0000000000..6c40a6cd0c --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift b/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift new file mode 100644 index 0000000000..42dd587fe0 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/TestClientAppTests/TestClientAppTests.swift @@ -0,0 +1,35 @@ +// +// TestClientAppTests.swift +// TestClientAppTests +// +// Created by Eric Hyche on 7/18/17. +// Copyright © 2017 Swagger Codegen. All rights reserved. +// + +import XCTest +import TestClient +@testable import TestClientApp + +class TestClientAppTests: XCTestCase { + + func testWhenVariableNameIsDifferentFromPropertyName() throws { + // This tests to make sure that the swift4 language can handle when + // we have property names which map to variable names that are not the same. + // This can happen when we have things like snake_case property names, + // or when we have property names which may be Swift 4 reserved words. + let jsonData = """ + { + "example_name": "Test example name", + "for": "Some reason", + "normalName": "Some normal name value" + } + """.data(using: .utf8)! + + let decodedResult = CodableHelper.decode(VariableNameTest.self, from: jsonData) + let variableNameTest = try decodedResult.get() + + XCTAssertTrue(variableNameTest.exampleName == "Test example name", "Did not decode snake_case property correctly.") + XCTAssertTrue(variableNameTest._for == "Some reason", "Did not decode property name that is a reserved word correctly.") + } + +} diff --git a/samples/client/test/swift5/default/TestClientApp/pom.xml b/samples/client/test/swift5/default/TestClientApp/pom.xml new file mode 100644 index 0000000000..fdb3db1495 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift4TestClientTests + pom + 1.0-SNAPSHOT + Swift4 Swagger Test Schema Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_xcodebuild.sh + + + + + + + diff --git a/samples/client/test/swift5/default/TestClientApp/run_xcodebuild.sh b/samples/client/test/swift5/default/TestClientApp/run_xcodebuild.sh new file mode 100755 index 0000000000..060ec33221 --- /dev/null +++ b/samples/client/test/swift5/default/TestClientApp/run_xcodebuild.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +pod install + +xcodebuild clean build build-for-testing -workspace "TestClientApp.xcworkspace" -scheme "TestClientApp" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max,OS=latest" && xcodebuild test-without-building -workspace "TestClientApp.xcworkspace" -scheme "TestClientAppTests" -destination "platform=iOS Simulator,name=iPhone 11 Pro Max,OS=latest" | xcpretty && exit ${PIPESTATUS[0]} diff --git a/samples/client/test/swift5/default/docs/AllPrimitives.md b/samples/client/test/swift5/default/docs/AllPrimitives.md new file mode 100644 index 0000000000..1cfa94eaf7 --- /dev/null +++ b/samples/client/test/swift5/default/docs/AllPrimitives.md @@ -0,0 +1,34 @@ +# AllPrimitives + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myInteger** | **Int** | | [optional] +**myIntegerArray** | **[Int]** | | [optional] +**myLong** | **Int64** | | [optional] +**myLongArray** | **[Int64]** | | [optional] +**myFloat** | **Float** | | [optional] +**myFloatArray** | **[Float]** | | [optional] +**myDouble** | **Double** | | [optional] +**myDoubleArray** | **[Double]** | | [optional] +**myString** | **String** | | [optional] +**myStringArray** | **[String]** | | [optional] +**myBytes** | **Data** | | [optional] +**myBytesArray** | **[Data]** | | [optional] +**myBoolean** | **Bool** | | [optional] +**myBooleanArray** | **[Bool]** | | [optional] +**myDate** | **Date** | | [optional] +**myDateArray** | **[Date]** | | [optional] +**myDateTime** | **Date** | | [optional] +**myDateTimeArray** | **[Date]** | | [optional] +**myFile** | **URL** | | [optional] +**myFileArray** | **[URL]** | | [optional] +**myUUID** | **UUID** | | [optional] +**myUUIDArray** | **[UUID]** | | [optional] +**myStringEnum** | [**StringEnum**](StringEnum.md) | | [optional] +**myStringEnumArray** | [StringEnum] | | [optional] +**myInlineStringEnum** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/BaseCard.md b/samples/client/test/swift5/default/docs/BaseCard.md new file mode 100644 index 0000000000..42d41b7db1 --- /dev/null +++ b/samples/client/test/swift5/default/docs/BaseCard.md @@ -0,0 +1,10 @@ +# BaseCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cardType** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/ErrorInfo.md b/samples/client/test/swift5/default/docs/ErrorInfo.md new file mode 100644 index 0000000000..5cc21d73ae --- /dev/null +++ b/samples/client/test/swift5/default/docs/ErrorInfo.md @@ -0,0 +1,12 @@ +# ErrorInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Int** | | [optional] +**message** | **String** | | [optional] +**details** | **[String]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/GetAllModelsResult.md b/samples/client/test/swift5/default/docs/GetAllModelsResult.md new file mode 100644 index 0000000000..4de449547a --- /dev/null +++ b/samples/client/test/swift5/default/docs/GetAllModelsResult.md @@ -0,0 +1,12 @@ +# GetAllModelsResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myPrimitiveArray** | [AllPrimitives] | | [optional] +**myPrimitive** | [**AllPrimitives**](AllPrimitives.md) | | [optional] +**myVariableNameTest** | [**VariableNameTest**](VariableNameTest.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/ModelDoubleArray.md b/samples/client/test/swift5/default/docs/ModelDoubleArray.md new file mode 100644 index 0000000000..46a1e87a9c --- /dev/null +++ b/samples/client/test/swift5/default/docs/ModelDoubleArray.md @@ -0,0 +1,9 @@ +# ModelDoubleArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/ModelErrorInfoArray.md b/samples/client/test/swift5/default/docs/ModelErrorInfoArray.md new file mode 100644 index 0000000000..666ca4ccc0 --- /dev/null +++ b/samples/client/test/swift5/default/docs/ModelErrorInfoArray.md @@ -0,0 +1,9 @@ +# ModelErrorInfoArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/ModelStringArray.md b/samples/client/test/swift5/default/docs/ModelStringArray.md new file mode 100644 index 0000000000..a84e8f1d4b --- /dev/null +++ b/samples/client/test/swift5/default/docs/ModelStringArray.md @@ -0,0 +1,9 @@ +# ModelStringArray + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/ModelWithIntAdditionalPropertiesOnly.md b/samples/client/test/swift5/default/docs/ModelWithIntAdditionalPropertiesOnly.md new file mode 100644 index 0000000000..209683e4fd --- /dev/null +++ b/samples/client/test/swift5/default/docs/ModelWithIntAdditionalPropertiesOnly.md @@ -0,0 +1,9 @@ +# ModelWithIntAdditionalPropertiesOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/ModelWithPropertiesAndAdditionalProperties.md b/samples/client/test/swift5/default/docs/ModelWithPropertiesAndAdditionalProperties.md new file mode 100644 index 0000000000..098c03d688 --- /dev/null +++ b/samples/client/test/swift5/default/docs/ModelWithPropertiesAndAdditionalProperties.md @@ -0,0 +1,17 @@ +# ModelWithPropertiesAndAdditionalProperties + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myIntegerReq** | **Int** | | +**myIntegerOpt** | **Int** | | [optional] +**myPrimitiveReq** | [**AllPrimitives**](AllPrimitives.md) | | +**myPrimitiveOpt** | [**AllPrimitives**](AllPrimitives.md) | | [optional] +**myStringArrayReq** | **[String]** | | +**myStringArrayOpt** | **[String]** | | [optional] +**myPrimitiveArrayReq** | [AllPrimitives] | | +**myPrimitiveArrayOpt** | [AllPrimitives] | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/ModelWithStringAdditionalPropertiesOnly.md b/samples/client/test/swift5/default/docs/ModelWithStringAdditionalPropertiesOnly.md new file mode 100644 index 0000000000..ca91011161 --- /dev/null +++ b/samples/client/test/swift5/default/docs/ModelWithStringAdditionalPropertiesOnly.md @@ -0,0 +1,9 @@ +# ModelWithStringAdditionalPropertiesOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/PersonCard.md b/samples/client/test/swift5/default/docs/PersonCard.md new file mode 100644 index 0000000000..385299f876 --- /dev/null +++ b/samples/client/test/swift5/default/docs/PersonCard.md @@ -0,0 +1,11 @@ +# PersonCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/PersonCardAllOf.md b/samples/client/test/swift5/default/docs/PersonCardAllOf.md new file mode 100644 index 0000000000..e4b78f76c9 --- /dev/null +++ b/samples/client/test/swift5/default/docs/PersonCardAllOf.md @@ -0,0 +1,11 @@ +# PersonCardAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/PlaceCard.md b/samples/client/test/swift5/default/docs/PlaceCard.md new file mode 100644 index 0000000000..87002357ce --- /dev/null +++ b/samples/client/test/swift5/default/docs/PlaceCard.md @@ -0,0 +1,11 @@ +# PlaceCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**placeName** | **String** | | [optional] +**placeAddress** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/PlaceCardAllOf.md b/samples/client/test/swift5/default/docs/PlaceCardAllOf.md new file mode 100644 index 0000000000..5ed8d8a4d0 --- /dev/null +++ b/samples/client/test/swift5/default/docs/PlaceCardAllOf.md @@ -0,0 +1,11 @@ +# PlaceCardAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**placeName** | **String** | | [optional] +**placeAddress** | **String** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/SampleBase.md b/samples/client/test/swift5/default/docs/SampleBase.md new file mode 100644 index 0000000000..a7c7ac9722 --- /dev/null +++ b/samples/client/test/swift5/default/docs/SampleBase.md @@ -0,0 +1,11 @@ +# SampleBase + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**baseClassStringProp** | **String** | | [optional] +**baseClassIntegerProp** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/SampleSubClass.md b/samples/client/test/swift5/default/docs/SampleSubClass.md new file mode 100644 index 0000000000..435633ccde --- /dev/null +++ b/samples/client/test/swift5/default/docs/SampleSubClass.md @@ -0,0 +1,13 @@ +# SampleSubClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**baseClassStringProp** | **String** | | [optional] +**baseClassIntegerProp** | **Int** | | [optional] +**subClassStringProp** | **String** | | [optional] +**subClassIntegerProp** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/SampleSubClassAllOf.md b/samples/client/test/swift5/default/docs/SampleSubClassAllOf.md new file mode 100644 index 0000000000..50a64944e8 --- /dev/null +++ b/samples/client/test/swift5/default/docs/SampleSubClassAllOf.md @@ -0,0 +1,11 @@ +# SampleSubClassAllOf + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subClassStringProp** | **String** | | [optional] +**subClassIntegerProp** | **Int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/StringEnum.md b/samples/client/test/swift5/default/docs/StringEnum.md new file mode 100644 index 0000000000..b0009f7e82 --- /dev/null +++ b/samples/client/test/swift5/default/docs/StringEnum.md @@ -0,0 +1,9 @@ +# StringEnum + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/docs/Swift5TestAPI.md b/samples/client/test/swift5/default/docs/Swift5TestAPI.md new file mode 100644 index 0000000000..fde288b394 --- /dev/null +++ b/samples/client/test/swift5/default/docs/Swift5TestAPI.md @@ -0,0 +1,59 @@ +# Swift5TestAPI + +All URIs are relative to *http://api.example.com/basePath* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAllModels**](Swift5TestAPI.md#getallmodels) | **GET** /allModels | Get all of the models + + +# **getAllModels** +```swift + open class func getAllModels(clientId: String, completion: @escaping (_ data: GetAllModelsResult?, _ error: Error?) -> Void) +``` + +Get all of the models + +This endpoint tests get a dictionary which contains examples of all of the models. + +### Example +```swift +// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new +import TestClient + +let clientId = "clientId_example" // String | id that represent the Api client + +// Get all of the models +Swift5TestAPI.getAllModels(clientId: clientId) { (response, error) in + guard error == nil else { + print(error) + return + } + + if (response) { + dump(response) + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **clientId** | **String** | id that represent the Api client | + +### Return type + +[**GetAllModelsResult**](GetAllModelsResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/test/swift5/default/docs/VariableNameTest.md b/samples/client/test/swift5/default/docs/VariableNameTest.md new file mode 100644 index 0000000000..b99011e0a9 --- /dev/null +++ b/samples/client/test/swift5/default/docs/VariableNameTest.md @@ -0,0 +1,12 @@ +# VariableNameTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exampleName** | **String** | This snake-case examle_name property name should be converted to a camelCase variable name like exampleName | [optional] +**_for** | **String** | This property name is a reserved word in most languages, including Swift 5. | [optional] +**normalName** | **String** | This model object property name should be unchanged from the JSON property name. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/test/swift5/default/git_push.sh b/samples/client/test/swift5/default/git_push.sh new file mode 100644 index 0000000000..ced3be2b0c --- /dev/null +++ b/samples/client/test/swift5/default/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/samples/client/test/swift5/default/pom.xml b/samples/client/test/swift5/default/pom.xml new file mode 100644 index 0000000000..5caba9cb46 --- /dev/null +++ b/samples/client/test/swift5/default/pom.xml @@ -0,0 +1,43 @@ + + 4.0.0 + io.swagger + Swift4PetstoreClientTests + pom + 1.0-SNAPSHOT + Swift4 Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + xcodebuild-test + integration-test + + exec + + + ./run_spmbuild.sh + + + + + + + diff --git a/samples/client/test/swift5/default/project.yml b/samples/client/test/swift5/default/project.yml new file mode 100644 index 0000000000..c5d75afe8c --- /dev/null +++ b/samples/client/test/swift5/default/project.yml @@ -0,0 +1,14 @@ +name: TestClient +targets: + TestClient: + type: framework + platform: iOS + deploymentTarget: "10.0" + sources: [TestClient] + info: + path: ./Info.plist + version: 1.0 + settings: + APPLICATION_EXTENSION_API_ONLY: true + scheme: {} + diff --git a/samples/client/test/swift5/default/run_spmbuild.sh b/samples/client/test/swift5/default/run_spmbuild.sh new file mode 100755 index 0000000000..1a9f585ad0 --- /dev/null +++ b/samples/client/test/swift5/default/run_spmbuild.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swift build && exit ${PIPESTATUS[0]} diff --git a/samples/client/test/swift5/swift5_test_all.sh b/samples/client/test/swift5/swift5_test_all.sh new file mode 100755 index 0000000000..dcb30d887c --- /dev/null +++ b/samples/client/test/swift5/swift5_test_all.sh @@ -0,0 +1,11 @@ +#/bin/bash + +set -e + +DIRECTORY=`dirname $0` + +# example project with unit tests +mvn -f $DIRECTORY/default/TestClientApp/pom.xml integration-test + +# spm build +mvn -f $DIRECTORY/default/pom.xml integration-test From 1cb99e3497349bbe5799ef1762c6e7682c338eed Mon Sep 17 00:00:00 2001 From: AlexG <47481748+AIexG@users.noreply.github.com> Date: Thu, 2 Jan 2020 13:36:22 +0100 Subject: [PATCH 14/82] [cpp-restbed] Added "out-of-the-box" functionality (#4759) * Added cpp-restbed "out-of-the-box" functionality * handling class dependencies * added method override to clean interfaces of ambiguity * added default values for shared pointers * fixed _name and name parameters generating the same getters and setters * updated enum handling * updated Petstore samples * updated templates for automated object generation * fix whitespace * removed model initialisation * added model brace initialisation --- .../languages/CppRestbedServerCodegen.java | 64 +++++++- .../cpp-restbed-server/api-header.mustache | 4 + .../cpp-restbed-server/api-source.mustache | 2 +- .../cpp-restbed-server/model-header.mustache | 18 ++- .../cpp-restbed-server/model-source.mustache | 149 +++++++++++++++--- .../cpp-restbed/.openapi-generator/VERSION | 2 +- .../petstore/cpp-restbed/api/PetApi.cpp | 28 +++- .../server/petstore/cpp-restbed/api/PetApi.h | 15 +- .../petstore/cpp-restbed/api/StoreApi.cpp | 16 +- .../petstore/cpp-restbed/api/StoreApi.h | 7 +- .../petstore/cpp-restbed/api/UserApi.cpp | 30 +++- .../server/petstore/cpp-restbed/api/UserApi.h | 14 +- .../cpp-restbed/model/ApiResponse.cpp | 39 +++-- .../petstore/cpp-restbed/model/ApiResponse.h | 14 +- .../petstore/cpp-restbed/model/Category.cpp | 33 ++-- .../petstore/cpp-restbed/model/Category.h | 13 +- .../petstore/cpp-restbed/model/Order.cpp | 63 +++++--- .../server/petstore/cpp-restbed/model/Order.h | 19 ++- .../server/petstore/cpp-restbed/model/Pet.cpp | 89 ++++++++--- .../server/petstore/cpp-restbed/model/Pet.h | 18 ++- .../server/petstore/cpp-restbed/model/Tag.cpp | 33 ++-- .../server/petstore/cpp-restbed/model/Tag.h | 13 +- .../petstore/cpp-restbed/model/User.cpp | 69 ++++---- .../server/petstore/cpp-restbed/model/User.h | 19 ++- 24 files changed, 582 insertions(+), 189 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java index 798639807b..5fbfb127a1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java @@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; +import java.util.Map.Entry; import static org.openapitools.codegen.utils.StringUtils.*; @@ -100,6 +101,52 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { importMapping.put("restbed::Bytes", "#include "); } + @Override + public Map updateAllModels(Map objs) { + // Index all CodegenModels by model name. + Map allModels = getAllModels(objs); + + // Clean interfaces of ambiguity + for (Entry cm : allModels.entrySet()) { + if (cm.getValue().getInterfaces() != null && !cm.getValue().getInterfaces().isEmpty()) { + List newIntf = new ArrayList(cm.getValue().getInterfaces()); + + for (String intf : allModels.get(cm.getKey()).getInterfaces()) { + if (allModels.get(intf).getInterfaces() != null && !allModels.get(intf).getInterfaces().isEmpty()) { + for (String intfInner : allModels.get(intf).getInterfaces()) { + newIntf.remove(intfInner); + } + } + } + cm.getValue().setInterfaces(newIntf); + } + } + + objs = super.updateAllModels(objs); + return objs; + } + + /** + * Camelize the method name of the getter and setter, but keep underscores at the front + * + * @param name string to be camelized + * @return Camelized string + */ + @Override + public String getterAndSetterCapitalize(String name) { + if (name == null || name.length() == 0) { + return name; + } + + name = toVarName(name); + + if (name.startsWith("_")) { + return "_" + camelize(name); + } + + return camelize(name); + } + /** * Configures the type of generator. * @@ -187,11 +234,13 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { codegenModel.imports.add(newImp); } } - + // Import vector if an enum is present + if (codegenModel.hasEnums) { + codegenModel.imports.add("#include "); + } return codegenModel; } - @Override public String toModelFilename(String name) { return toModelName(name); @@ -355,7 +404,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { } return "std::vector<" + inner + ">()"; } else if (!StringUtils.isEmpty(p.get$ref())) { - return "new " + toModelName(ModelUtils.getSimpleRef(p.get$ref())) + "()"; + return "std::make_shared<" + toModelName(ModelUtils.getSimpleRef(p.get$ref())) + ">()"; } return "nullptr"; @@ -371,6 +420,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { if (!isPrimitiveType && !isListContainer && !isString && !parameter.dataType.startsWith("std::shared_ptr")) { parameter.dataType = "std::shared_ptr<" + parameter.dataType + ">"; + parameter.defaultValue = "std::make_shared<" + parameter.dataType + ">()"; } } @@ -393,4 +443,12 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { type = openAPIType; return toModelName(type); } + + @Override + public void updateCodegenPropertyEnum(CodegenProperty var) { + // Remove prefix added by DefaultCodegen + String originalDefaultValue = var.defaultValue; + super.updateCodegenPropertyEnum(var); + var.defaultValue = originalDefaultValue; + } } diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache index fe966c1d98..d20d874fea 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-header.mustache @@ -76,6 +76,10 @@ private: {{#allParams}}{{{dataType}}} const &{{#hasMore}}, {{/hasMore}}{{/allParams}} )> handler_{{httpMethod}}_; {{/vendorExtensions.x-codegen-otherMethods}} + + {{#allParams}} + {{{dataType}}} {{paramName}}{}; + {{/allParams}} }; {{/operation}} diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache index 9523774984..ef75dd8e36 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/api-source.mustache @@ -18,7 +18,7 @@ using namespace {{modelNamespace}}; {{#operation}} std::shared_ptr<{{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource> sp{{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource = std::make_shared<{{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource>(); this->publish(sp{{classname}}{{vendorExtensions.x-codegen-resourceName}}Resource); - + {{/operation}} } diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-header.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-header.mustache index 657c7c9ab7..090481e0a1 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-header.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-header.mustache @@ -13,6 +13,7 @@ {{#imports}}{{{this}}} {{/imports}} #include +#include {{#modelNamespaceDeclarations}} namespace {{this}} { @@ -21,30 +22,39 @@ namespace {{this}} { /// /// {{description}} /// -class {{declspec}} {{classname}} +{{#circularReferences}} +class {{{this}}}; +{{/circularReferences}} +class {{declspec}} {{classname}} {{#interfaces}}{{#-first}}:{{/-first}}{{^-first}},{{/-first}} public {{{this}}}{{/interfaces}} { public: {{classname}}(); virtual ~{{classname}}(); - std::string toJsonString(); + std::string toJsonString(bool prettyJson = false); void fromJsonString(std::string const& jsonString); + boost::property_tree::ptree toPropertyTree(); + void fromPropertyTree(boost::property_tree::ptree const& pt); ///////////////////////////////////////////// /// {{classname}} members - {{#vars}} + /// /// {{description}} /// {{{dataType}}} {{getter}}() const; void {{setter}}({{{dataType}}} value); {{/vars}} - protected: {{#vars}} {{{dataType}}} m_{{name}}; {{/vars}} + {{#vars}} + {{#isEnum}} + std::vector<{{{dataType}}}> m_{{enumName}}; + {{/isEnum}} + {{/vars}} }; {{#modelNamespaceDeclarations}} diff --git a/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache b/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache index 748e6fe251..3544da734c 100644 --- a/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-restbed-server/model-source.mustache @@ -5,6 +5,9 @@ #include #include +{{#hasEnums}} +#include +{{/hasEnums}} #include #include @@ -18,36 +21,37 @@ namespace {{this}} { {{classname}}::{{classname}}() { - {{#vars}}{{^isContainer}}{{#isPrimitiveType}}m_{{name}} = {{{defaultValue}}}; - {{/isPrimitiveType}}{{^isPrimitiveType}}{{#isString}}m_{{name}} = {{{defaultValue}}}; - {{/isString}}{{#isDateTime}}m_{{name}} = {{{defaultValue}}}; - {{/isDateTime}}{{/isPrimitiveType}}{{/isContainer}}{{/vars}} + {{#vars}} + {{^isContainer}} + {{#isPrimitiveType}} + m_{{name}} = {{{defaultValue}}}; + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isString}} + m_{{name}} = {{{defaultValue}}}; + {{/isString}} + {{#isDate}} + m_{{name}} = {{{defaultValue}}}; + {{/isDate}} + {{#isDateTime}} + m_{{name}} = {{{defaultValue}}}; + {{/isDateTime}} + {{#isEnum}} + m_{{enumName}} = { {{#allowableValues}}{{#enumVars}}{{^-first}}, {{/-first}}{{{value}}}{{/enumVars}}{{/allowableValues}} }; + {{/isEnum}} + {{/isPrimitiveType}} + {{/isContainer}} + {{/vars}} } {{classname}}::~{{classname}}() { } -std::string {{classname}}::toJsonString() +std::string {{classname}}::toJsonString(bool prettyJson) { std::stringstream ss; - ptree pt; - {{#vars}} - {{^isContainer}} - {{#isPrimitiveType}} - pt.put("{{baseName}}", m_{{name}}); - {{/isPrimitiveType}} - {{^isPrimitiveType}} - {{#isString}} - pt.put("{{baseName}}", m_{{name}}); - {{/isString}} - {{#isDateTime}} - pt.put("{{baseName}}", m_{{name}}); - {{/isDateTime}} - {{/isPrimitiveType}} - {{/isContainer}} - {{/vars}} - write_json(ss, pt, false); + write_json(ss, this->toPropertyTree(), prettyJson); return ss.str(); } @@ -56,19 +60,116 @@ void {{classname}}::fromJsonString(std::string const& jsonString) std::stringstream ss(jsonString); ptree pt; read_json(ss,pt); + this->fromPropertyTree(pt); +} + +ptree {{classname}}::toPropertyTree() +{ + ptree pt; + ptree tmp_node; {{#vars}} {{^isContainer}} {{#isPrimitiveType}} + pt.put("{{baseName}}", m_{{name}}); + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isString}} + pt.put("{{baseName}}", m_{{name}}); + {{/isString}} + {{#isDate}} + pt.put("{{baseName}}", m_{{name}}); + {{/isDate}} + {{#isDateTime}} + pt.put("{{baseName}}", m_{{name}}); + {{/isDateTime}} + {{#isModel}} + if (m_{{name}} != nullptr) { + pt.add_child("{{baseName}}", m_{{name}}->toPropertyTree()); + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isContainer}} + {{#isContainer}} + {{^isModelContainer}} + // generate tree for {{name}} + if (!m_{{name}}.empty()) { + for (const auto &childEntry : m_{{name}}) { + ptree {{name}}_node; + {{name}}_node.put("", childEntry); + tmp_node.push_back(std::make_pair("", {{name}}_node)); + } + pt.add_child("{{baseName}}", tmp_node); + tmp_node.clear(); + } + {{/isModelContainer}} + {{#isModelContainer}} + // generate tree for vector of pointers of {{name}} + if (!m_{{name}}.empty()) { + for (const auto &childEntry : m_{{name}}) { + tmp_node.push_back(std::make_pair("", childEntry->toPropertyTree())); + } + pt.add_child("{{baseName}}", tmp_node); + tmp_node.clear(); + } + {{/isModelContainer}} + {{/isContainer}} + {{/vars}} + return pt; +} + +void {{classname}}::fromPropertyTree(ptree const &pt) +{ + ptree tmp_node; + {{#vars}} + {{^isContainer}} + {{^isEnum}} + {{#isPrimitiveType}} m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); {{/isPrimitiveType}} {{^isPrimitiveType}} {{#isString}} m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); {{/isString}} + {{#isDate}} + m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); + {{/isDate}} {{#isDateTime}} m_{{name}} = pt.get("{{baseName}}", {{{defaultValue}}}); {{/isDateTime}} {{/isPrimitiveType}} + {{/isEnum}} + {{#isEnum}} + {{setter}}(pt.get("{{baseName}}", {{{defaultValue}}})); + {{/isEnum}} + {{#isModel}} + if (pt.get_child_optional("{{baseName}}")) { + m_{{name}} = {{{defaultValue}}}; + m_{{name}}->fromPropertyTree(pt.get_child("{{baseName}}")); + } + {{/isModel}} + {{/isContainer}} + {{#isContainer}} + {{^isModelContainer}} + // push all items of {{name}} into member vector + if (pt.get_child_optional("{{baseName}}")) { + for (const auto &childTree : pt.get_child("{{baseName}}")) { + {{#mostInnerItems}} + m_{{name}}.emplace_back({{#isNumeric}}{{^isFloat}}{{^isLong}}{{^isInteger}}std::stod{{/isInteger}}{{/isLong}}{{/isFloat}}{{#isDouble}}std::stod{{/isDouble}}{{#isFloat}}std::stof{{/isFloat}}{{#isInteger}}std::stoi{{/isInteger}}{{#isLong}}std::stol{{/isLong}}({{/isNumeric}}childTree.second.data()){{#isNumeric}}){{/isNumeric}}; + {{/mostInnerItems}} + } + } + {{/isModelContainer}} + {{#isModelContainer}} + // generate new {{complexType}} Object for each item and assign it to the current + if (pt.get_child_optional("{{baseName}}")) { + for (const auto &childTree : pt.get_child("{{baseName}}")) { + {{#mostInnerItems}} + m_{{name}}.emplace_back({{{defaultValue}}}); + m_{{name}}.back()->fromPropertyTree(childTree.second); + {{/mostInnerItems}} + } + } + {{/isModelContainer}} {{/isContainer}} {{/vars}} } @@ -80,7 +181,9 @@ void {{classname}}::fromJsonString(std::string const& jsonString) } void {{classname}}::{{setter}}({{{dataType}}} value) { - m_{{name}} = value; + {{#isEnum}}if (std::find(m_{{enumName}}.begin(), m_{{enumName}}.end(), value) != m_{{enumName}}.end()) { + {{/isEnum}}m_{{name}} = value;{{#isEnum}} + }{{/isEnum}} } {{/vars}} diff --git a/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION b/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION index c3a2c7076f..717311e32e 100644 --- a/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION +++ b/samples/server/petstore/cpp-restbed/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.0-SNAPSHOT \ No newline at end of file +unset \ No newline at end of file diff --git a/samples/server/petstore/cpp-restbed/api/PetApi.cpp b/samples/server/petstore/cpp-restbed/api/PetApi.cpp index 73cd07f81c..aadfcd871e 100644 --- a/samples/server/petstore/cpp-restbed/api/PetApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/PetApi.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -28,19 +28,19 @@ using namespace org::openapitools::server::model; PetApi::PetApi() { std::shared_ptr spPetApiPetResource = std::make_shared(); this->publish(spPetApiPetResource); - + std::shared_ptr spPetApiPetPetIdResource = std::make_shared(); this->publish(spPetApiPetPetIdResource); - + std::shared_ptr spPetApiPetFindByStatusResource = std::make_shared(); this->publish(spPetApiPetFindByStatusResource); - + std::shared_ptr spPetApiPetFindByTagsResource = std::make_shared(); this->publish(spPetApiPetFindByTagsResource); - + std::shared_ptr spPetApiPetPetIdUploadImageResource = std::make_shared(); this->publish(spPetApiPetPetIdUploadImageResource); - + } PetApi::~PetApi() {} @@ -66,6 +66,9 @@ PetApiPetResource::PetApiPetResource() this->set_method_handler("PUT", std::bind(&PetApiPetResource::PUT_method_handler, this, std::placeholders::_1)); + + body = std::make_shared(); + } PetApiPetResource::~PetApiPetResource() @@ -178,6 +181,10 @@ PetApiPetPetIdResource::PetApiPetPetIdResource() this->set_method_handler("POST", std::bind(&PetApiPetPetIdResource::POST_method_handler, this, std::placeholders::_1)); + + petId = 0L; + apiKey = ""; + } PetApiPetPetIdResource::~PetApiPetPetIdResource() @@ -302,6 +309,8 @@ PetApiPetFindByStatusResource::PetApiPetFindByStatusResource() this->set_method_handler("GET", std::bind(&PetApiPetFindByStatusResource::GET_method_handler, this, std::placeholders::_1)); + + } PetApiPetFindByStatusResource::~PetApiPetFindByStatusResource() @@ -354,6 +363,8 @@ PetApiPetFindByTagsResource::PetApiPetFindByTagsResource() this->set_method_handler("GET", std::bind(&PetApiPetFindByTagsResource::GET_method_handler, this, std::placeholders::_1)); + + } PetApiPetFindByTagsResource::~PetApiPetFindByTagsResource() @@ -406,6 +417,11 @@ PetApiPetPetIdUploadImageResource::PetApiPetPetIdUploadImageResource() this->set_method_handler("POST", std::bind(&PetApiPetPetIdUploadImageResource::POST_method_handler, this, std::placeholders::_1)); + + petId = 0L; + additionalMetadata = ""; + file = ""; + } PetApiPetPetIdUploadImageResource::~PetApiPetPetIdUploadImageResource() diff --git a/samples/server/petstore/cpp-restbed/api/PetApi.h b/samples/server/petstore/cpp-restbed/api/PetApi.h index 84794220c3..41a117a885 100644 --- a/samples/server/petstore/cpp-restbed/api/PetApi.h +++ b/samples/server/petstore/cpp-restbed/api/PetApi.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -82,6 +82,8 @@ private: std::function( std::shared_ptr const & )> handler_PUT_; + + std::shared_ptr body; }; /// @@ -127,6 +129,9 @@ private: std::function( int64_t const &, std::string const &, std::string const & )> handler_POST_; + + int64_t petId; + std::string apiKey; }; /// @@ -154,6 +159,8 @@ private: std::vector const & )> handler_GET_; + + std::vector status; }; /// @@ -181,6 +188,8 @@ private: std::vector const & )> handler_GET_; + + std::vector tags; }; /// @@ -208,6 +217,10 @@ private: int64_t const &, std::string const &, std::string const & )> handler_POST_; + + int64_t petId; + std::string additionalMetadata; + std::string file; }; diff --git a/samples/server/petstore/cpp-restbed/api/StoreApi.cpp b/samples/server/petstore/cpp-restbed/api/StoreApi.cpp index a15305eb52..58cd31964d 100644 --- a/samples/server/petstore/cpp-restbed/api/StoreApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/StoreApi.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -28,13 +28,13 @@ using namespace org::openapitools::server::model; StoreApi::StoreApi() { std::shared_ptr spStoreApiStoreOrderOrderIdResource = std::make_shared(); this->publish(spStoreApiStoreOrderOrderIdResource); - + std::shared_ptr spStoreApiStoreInventoryResource = std::make_shared(); this->publish(spStoreApiStoreInventoryResource); - + std::shared_ptr spStoreApiStoreOrderResource = std::make_shared(); this->publish(spStoreApiStoreOrderResource); - + } StoreApi::~StoreApi() {} @@ -60,6 +60,9 @@ StoreApiStoreOrderOrderIdResource::StoreApiStoreOrderOrderIdResource() this->set_method_handler("GET", std::bind(&StoreApiStoreOrderOrderIdResource::GET_method_handler, this, std::placeholders::_1)); + + orderId = ""; + } StoreApiStoreOrderOrderIdResource::~StoreApiStoreOrderOrderIdResource() @@ -154,6 +157,8 @@ StoreApiStoreInventoryResource::StoreApiStoreInventoryResource() this->set_method_handler("GET", std::bind(&StoreApiStoreInventoryResource::GET_method_handler, this, std::placeholders::_1)); + + } StoreApiStoreInventoryResource::~StoreApiStoreInventoryResource() @@ -201,6 +206,9 @@ StoreApiStoreOrderResource::StoreApiStoreOrderResource() this->set_method_handler("POST", std::bind(&StoreApiStoreOrderResource::POST_method_handler, this, std::placeholders::_1)); + + body = std::make_shared(); + } StoreApiStoreOrderResource::~StoreApiStoreOrderResource() diff --git a/samples/server/petstore/cpp-restbed/api/StoreApi.h b/samples/server/petstore/cpp-restbed/api/StoreApi.h index 85e9840f2f..80769bd55d 100644 --- a/samples/server/petstore/cpp-restbed/api/StoreApi.h +++ b/samples/server/petstore/cpp-restbed/api/StoreApi.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -82,6 +82,8 @@ private: std::function( int64_t const & )> handler_GET_; + + std::string orderId; }; /// @@ -109,6 +111,7 @@ private: )> handler_GET_; + }; /// @@ -136,6 +139,8 @@ private: std::shared_ptr const & )> handler_POST_; + + std::shared_ptr body; }; diff --git a/samples/server/petstore/cpp-restbed/api/UserApi.cpp b/samples/server/petstore/cpp-restbed/api/UserApi.cpp index b6468c04bf..9e0bb6d0c1 100644 --- a/samples/server/petstore/cpp-restbed/api/UserApi.cpp +++ b/samples/server/petstore/cpp-restbed/api/UserApi.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -28,22 +28,22 @@ using namespace org::openapitools::server::model; UserApi::UserApi() { std::shared_ptr spUserApiUserResource = std::make_shared(); this->publish(spUserApiUserResource); - + std::shared_ptr spUserApiUserCreateWithArrayResource = std::make_shared(); this->publish(spUserApiUserCreateWithArrayResource); - + std::shared_ptr spUserApiUserCreateWithListResource = std::make_shared(); this->publish(spUserApiUserCreateWithListResource); - + std::shared_ptr spUserApiUserUsernameResource = std::make_shared(); this->publish(spUserApiUserUsernameResource); - + std::shared_ptr spUserApiUserLoginResource = std::make_shared(); this->publish(spUserApiUserLoginResource); - + std::shared_ptr spUserApiUserLogoutResource = std::make_shared(); this->publish(spUserApiUserLogoutResource); - + } UserApi::~UserApi() {} @@ -66,6 +66,9 @@ UserApiUserResource::UserApiUserResource() this->set_method_handler("POST", std::bind(&UserApiUserResource::POST_method_handler, this, std::placeholders::_1)); + + body = std::make_shared(); + } UserApiUserResource::~UserApiUserResource() @@ -125,6 +128,8 @@ UserApiUserCreateWithArrayResource::UserApiUserCreateWithArrayResource() this->set_method_handler("POST", std::bind(&UserApiUserCreateWithArrayResource::POST_method_handler, this, std::placeholders::_1)); + + } UserApiUserCreateWithArrayResource::~UserApiUserCreateWithArrayResource() @@ -184,6 +189,8 @@ UserApiUserCreateWithListResource::UserApiUserCreateWithListResource() this->set_method_handler("POST", std::bind(&UserApiUserCreateWithListResource::POST_method_handler, this, std::placeholders::_1)); + + } UserApiUserCreateWithListResource::~UserApiUserCreateWithListResource() @@ -249,6 +256,9 @@ UserApiUserUsernameResource::UserApiUserUsernameResource() this->set_method_handler("PUT", std::bind(&UserApiUserUsernameResource::PUT_method_handler, this, std::placeholders::_1)); + + username = ""; + } UserApiUserUsernameResource::~UserApiUserUsernameResource() @@ -388,6 +398,10 @@ UserApiUserLoginResource::UserApiUserLoginResource() this->set_method_handler("GET", std::bind(&UserApiUserLoginResource::GET_method_handler, this, std::placeholders::_1)); + + username = ""; + password = ""; + } UserApiUserLoginResource::~UserApiUserLoginResource() @@ -446,6 +460,8 @@ UserApiUserLogoutResource::UserApiUserLogoutResource() this->set_method_handler("GET", std::bind(&UserApiUserLogoutResource::GET_method_handler, this, std::placeholders::_1)); + + } UserApiUserLogoutResource::~UserApiUserLogoutResource() diff --git a/samples/server/petstore/cpp-restbed/api/UserApi.h b/samples/server/petstore/cpp-restbed/api/UserApi.h index 86194ba3be..6fff9c23b4 100644 --- a/samples/server/petstore/cpp-restbed/api/UserApi.h +++ b/samples/server/petstore/cpp-restbed/api/UserApi.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -73,6 +73,8 @@ private: std::shared_ptr const & )> handler_POST_; + + std::shared_ptr body; }; /// @@ -100,6 +102,8 @@ private: std::vector> const & )> handler_POST_; + + std::vector> body; }; /// @@ -127,6 +131,8 @@ private: std::vector> const & )> handler_POST_; + + std::vector> body; }; /// @@ -172,6 +178,8 @@ private: std::function( std::string const &, std::shared_ptr const & )> handler_PUT_; + + std::string username; }; /// @@ -199,6 +207,9 @@ private: std::string const &, std::string const & )> handler_GET_; + + std::string username; + std::string password; }; /// @@ -226,6 +237,7 @@ private: )> handler_GET_; + }; diff --git a/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp b/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp index d0aaef4b17..7d9f5217bc 100644 --- a/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp +++ b/samples/server/petstore/cpp-restbed/model/ApiResponse.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -30,24 +30,19 @@ namespace model { ApiResponse::ApiResponse() { - m_Code = 0; - m_Type = ""; - m_Message = ""; - + m_Code = 0; + m_Type = ""; + m_Message = ""; } ApiResponse::~ApiResponse() { } -std::string ApiResponse::toJsonString() +std::string ApiResponse::toJsonString(bool prettyJson) { std::stringstream ss; - ptree pt; - pt.put("code", m_Code); - pt.put("type", m_Type); - pt.put("message", m_Message); - write_json(ss, pt, false); + write_json(ss, this->toPropertyTree(), prettyJson); return ss.str(); } @@ -56,6 +51,22 @@ void ApiResponse::fromJsonString(std::string const& jsonString) std::stringstream ss(jsonString); ptree pt; read_json(ss,pt); + this->fromPropertyTree(pt); +} + +ptree ApiResponse::toPropertyTree() +{ + ptree pt; + ptree tmp_node; + pt.put("code", m_Code); + pt.put("type", m_Type); + pt.put("message", m_Message); + return pt; +} + +void ApiResponse::fromPropertyTree(ptree const &pt) +{ + ptree tmp_node; m_Code = pt.get("code", 0); m_Type = pt.get("type", ""); m_Message = pt.get("message", ""); @@ -67,7 +78,7 @@ int32_t ApiResponse::getCode() const } void ApiResponse::setCode(int32_t value) { - m_Code = value; + m_Code = value; } std::string ApiResponse::getType() const { @@ -75,7 +86,7 @@ std::string ApiResponse::getType() const } void ApiResponse::setType(std::string value) { - m_Type = value; + m_Type = value; } std::string ApiResponse::getMessage() const { @@ -83,7 +94,7 @@ std::string ApiResponse::getMessage() const } void ApiResponse::setMessage(std::string value) { - m_Message = value; + m_Message = value; } } diff --git a/samples/server/petstore/cpp-restbed/model/ApiResponse.h b/samples/server/petstore/cpp-restbed/model/ApiResponse.h index 361e890650..db8615f17d 100644 --- a/samples/server/petstore/cpp-restbed/model/ApiResponse.h +++ b/samples/server/petstore/cpp-restbed/model/ApiResponse.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -23,6 +23,7 @@ #include #include +#include namespace org { namespace openapitools { @@ -32,34 +33,37 @@ namespace model { /// /// Describes the result of uploading an image resource /// -class ApiResponse +class ApiResponse { public: ApiResponse(); virtual ~ApiResponse(); - std::string toJsonString(); + std::string toJsonString(bool prettyJson = false); void fromJsonString(std::string const& jsonString); + boost::property_tree::ptree toPropertyTree(); + void fromPropertyTree(boost::property_tree::ptree const& pt); ///////////////////////////////////////////// /// ApiResponse members - + /// /// /// int32_t getCode() const; void setCode(int32_t value); + /// /// /// std::string getType() const; void setType(std::string value); + /// /// /// std::string getMessage() const; void setMessage(std::string value); - protected: int32_t m_Code; std::string m_Type; diff --git a/samples/server/petstore/cpp-restbed/model/Category.cpp b/samples/server/petstore/cpp-restbed/model/Category.cpp index 98ad39564e..5e79804804 100644 --- a/samples/server/petstore/cpp-restbed/model/Category.cpp +++ b/samples/server/petstore/cpp-restbed/model/Category.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -30,22 +30,18 @@ namespace model { Category::Category() { - m_Id = 0L; - m_Name = ""; - + m_Id = 0L; + m_Name = ""; } Category::~Category() { } -std::string Category::toJsonString() +std::string Category::toJsonString(bool prettyJson) { std::stringstream ss; - ptree pt; - pt.put("id", m_Id); - pt.put("name", m_Name); - write_json(ss, pt, false); + write_json(ss, this->toPropertyTree(), prettyJson); return ss.str(); } @@ -54,6 +50,21 @@ void Category::fromJsonString(std::string const& jsonString) std::stringstream ss(jsonString); ptree pt; read_json(ss,pt); + this->fromPropertyTree(pt); +} + +ptree Category::toPropertyTree() +{ + ptree pt; + ptree tmp_node; + pt.put("id", m_Id); + pt.put("name", m_Name); + return pt; +} + +void Category::fromPropertyTree(ptree const &pt) +{ + ptree tmp_node; m_Id = pt.get("id", 0L); m_Name = pt.get("name", ""); } @@ -64,7 +75,7 @@ int64_t Category::getId() const } void Category::setId(int64_t value) { - m_Id = value; + m_Id = value; } std::string Category::getName() const { @@ -72,7 +83,7 @@ std::string Category::getName() const } void Category::setName(std::string value) { - m_Name = value; + m_Name = value; } } diff --git a/samples/server/petstore/cpp-restbed/model/Category.h b/samples/server/petstore/cpp-restbed/model/Category.h index 196caed405..1d542d5446 100644 --- a/samples/server/petstore/cpp-restbed/model/Category.h +++ b/samples/server/petstore/cpp-restbed/model/Category.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -23,6 +23,7 @@ #include #include +#include namespace org { namespace openapitools { @@ -32,29 +33,31 @@ namespace model { /// /// A category for a pet /// -class Category +class Category { public: Category(); virtual ~Category(); - std::string toJsonString(); + std::string toJsonString(bool prettyJson = false); void fromJsonString(std::string const& jsonString); + boost::property_tree::ptree toPropertyTree(); + void fromPropertyTree(boost::property_tree::ptree const& pt); ///////////////////////////////////////////// /// Category members - + /// /// /// int64_t getId() const; void setId(int64_t value); + /// /// /// std::string getName() const; void setName(std::string value); - protected: int64_t m_Id; std::string m_Name; diff --git a/samples/server/petstore/cpp-restbed/model/Order.cpp b/samples/server/petstore/cpp-restbed/model/Order.cpp index 2733acfe84..108a7f7610 100644 --- a/samples/server/petstore/cpp-restbed/model/Order.cpp +++ b/samples/server/petstore/cpp-restbed/model/Order.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -30,30 +31,23 @@ namespace model { Order::Order() { - m_Id = 0L; - m_PetId = 0L; - m_Quantity = 0; - m_ShipDate = ""; - m_Status = ""; - m_Complete = false; - + m_Id = 0L; + m_PetId = 0L; + m_Quantity = 0; + m_ShipDate = ""; + m_Status = ""; + m_StatusEnum = { "placed", "approved", "delivered" }; + m_Complete = false; } Order::~Order() { } -std::string Order::toJsonString() +std::string Order::toJsonString(bool prettyJson) { std::stringstream ss; - ptree pt; - pt.put("id", m_Id); - pt.put("petId", m_PetId); - pt.put("quantity", m_Quantity); - pt.put("shipDate", m_ShipDate); - pt.put("status", m_Status); - pt.put("complete", m_Complete); - write_json(ss, pt, false); + write_json(ss, this->toPropertyTree(), prettyJson); return ss.str(); } @@ -62,11 +56,30 @@ void Order::fromJsonString(std::string const& jsonString) std::stringstream ss(jsonString); ptree pt; read_json(ss,pt); + this->fromPropertyTree(pt); +} + +ptree Order::toPropertyTree() +{ + ptree pt; + ptree tmp_node; + pt.put("id", m_Id); + pt.put("petId", m_PetId); + pt.put("quantity", m_Quantity); + pt.put("shipDate", m_ShipDate); + pt.put("status", m_Status); + pt.put("complete", m_Complete); + return pt; +} + +void Order::fromPropertyTree(ptree const &pt) +{ + ptree tmp_node; m_Id = pt.get("id", 0L); m_PetId = pt.get("petId", 0L); m_Quantity = pt.get("quantity", 0); m_ShipDate = pt.get("shipDate", ""); - m_Status = pt.get("status", ""); + setStatus(pt.get("status", "")); m_Complete = pt.get("complete", false); } @@ -76,7 +89,7 @@ int64_t Order::getId() const } void Order::setId(int64_t value) { - m_Id = value; + m_Id = value; } int64_t Order::getPetId() const { @@ -84,7 +97,7 @@ int64_t Order::getPetId() const } void Order::setPetId(int64_t value) { - m_PetId = value; + m_PetId = value; } int32_t Order::getQuantity() const { @@ -92,7 +105,7 @@ int32_t Order::getQuantity() const } void Order::setQuantity(int32_t value) { - m_Quantity = value; + m_Quantity = value; } std::string Order::getShipDate() const { @@ -100,7 +113,7 @@ std::string Order::getShipDate() const } void Order::setShipDate(std::string value) { - m_ShipDate = value; + m_ShipDate = value; } std::string Order::getStatus() const { @@ -108,7 +121,9 @@ std::string Order::getStatus() const } void Order::setStatus(std::string value) { - m_Status = value; + if (std::find(m_StatusEnum.begin(), m_StatusEnum.end(), value) != m_StatusEnum.end()) { + m_Status = value; + } } bool Order::isComplete() const { @@ -116,7 +131,7 @@ bool Order::isComplete() const } void Order::setComplete(bool value) { - m_Complete = value; + m_Complete = value; } } diff --git a/samples/server/petstore/cpp-restbed/model/Order.h b/samples/server/petstore/cpp-restbed/model/Order.h index b5c7c941f6..3edc54e353 100644 --- a/samples/server/petstore/cpp-restbed/model/Order.h +++ b/samples/server/petstore/cpp-restbed/model/Order.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -22,7 +22,9 @@ #include +#include #include +#include namespace org { namespace openapitools { @@ -32,49 +34,55 @@ namespace model { /// /// An order for a pets from the pet store /// -class Order +class Order { public: Order(); virtual ~Order(); - std::string toJsonString(); + std::string toJsonString(bool prettyJson = false); void fromJsonString(std::string const& jsonString); + boost::property_tree::ptree toPropertyTree(); + void fromPropertyTree(boost::property_tree::ptree const& pt); ///////////////////////////////////////////// /// Order members - + /// /// /// int64_t getId() const; void setId(int64_t value); + /// /// /// int64_t getPetId() const; void setPetId(int64_t value); + /// /// /// int32_t getQuantity() const; void setQuantity(int32_t value); + /// /// /// std::string getShipDate() const; void setShipDate(std::string value); + /// /// Order Status /// std::string getStatus() const; void setStatus(std::string value); + /// /// /// bool isComplete() const; void setComplete(bool value); - protected: int64_t m_Id; int64_t m_PetId; @@ -82,6 +90,7 @@ protected: std::string m_ShipDate; std::string m_Status; bool m_Complete; + std::vector m_StatusEnum; }; } diff --git a/samples/server/petstore/cpp-restbed/model/Pet.cpp b/samples/server/petstore/cpp-restbed/model/Pet.cpp index 55f2daeb9c..5c7cff3527 100644 --- a/samples/server/petstore/cpp-restbed/model/Pet.cpp +++ b/samples/server/petstore/cpp-restbed/model/Pet.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -30,24 +31,20 @@ namespace model { Pet::Pet() { - m_Id = 0L; - m_Name = ""; - m_Status = ""; - + m_Id = 0L; + m_Name = ""; + m_Status = ""; + m_StatusEnum = { "available", "pending", "sold" }; } Pet::~Pet() { } -std::string Pet::toJsonString() +std::string Pet::toJsonString(bool prettyJson) { std::stringstream ss; - ptree pt; - pt.put("id", m_Id); - pt.put("name", m_Name); - pt.put("status", m_Status); - write_json(ss, pt, false); + write_json(ss, this->toPropertyTree(), prettyJson); return ss.str(); } @@ -56,9 +53,63 @@ void Pet::fromJsonString(std::string const& jsonString) std::stringstream ss(jsonString); ptree pt; read_json(ss,pt); + this->fromPropertyTree(pt); +} + +ptree Pet::toPropertyTree() +{ + ptree pt; + ptree tmp_node; + pt.put("id", m_Id); + if (m_Category != nullptr) { + pt.add_child("category", m_Category->toPropertyTree()); + } + pt.put("name", m_Name); + // generate tree for PhotoUrls + if (!m_PhotoUrls.empty()) { + for (const auto &childEntry : m_PhotoUrls) { + ptree PhotoUrls_node; + PhotoUrls_node.put("", childEntry); + tmp_node.push_back(std::make_pair("", PhotoUrls_node)); + } + pt.add_child("photoUrls", tmp_node); + tmp_node.clear(); + } + // generate tree for vector of pointers of Tags + if (!m_Tags.empty()) { + for (const auto &childEntry : m_Tags) { + tmp_node.push_back(std::make_pair("", childEntry->toPropertyTree())); + } + pt.add_child("tags", tmp_node); + tmp_node.clear(); + } + pt.put("status", m_Status); + return pt; +} + +void Pet::fromPropertyTree(ptree const &pt) +{ + ptree tmp_node; m_Id = pt.get("id", 0L); + if (pt.get_child_optional("category")) { + m_Category = std::make_shared(); + m_Category->fromPropertyTree(pt.get_child("category")); + } m_Name = pt.get("name", ""); - m_Status = pt.get("status", ""); + // push all items of PhotoUrls into member vector + if (pt.get_child_optional("photoUrls")) { + for (const auto &childTree : pt.get_child("photoUrls")) { + m_PhotoUrls.emplace_back(childTree.second.data()); + } + } + // generate new Tag Object for each item and assign it to the current + if (pt.get_child_optional("tags")) { + for (const auto &childTree : pt.get_child("tags")) { + m_Tags.emplace_back(std::make_shared()); + m_Tags.back()->fromPropertyTree(childTree.second); + } + } + setStatus(pt.get("status", "")); } int64_t Pet::getId() const @@ -67,7 +118,7 @@ int64_t Pet::getId() const } void Pet::setId(int64_t value) { - m_Id = value; + m_Id = value; } std::shared_ptr Pet::getCategory() const { @@ -75,7 +126,7 @@ std::shared_ptr Pet::getCategory() const } void Pet::setCategory(std::shared_ptr value) { - m_Category = value; + m_Category = value; } std::string Pet::getName() const { @@ -83,7 +134,7 @@ std::string Pet::getName() const } void Pet::setName(std::string value) { - m_Name = value; + m_Name = value; } std::vector Pet::getPhotoUrls() const { @@ -91,7 +142,7 @@ std::vector Pet::getPhotoUrls() const } void Pet::setPhotoUrls(std::vector value) { - m_PhotoUrls = value; + m_PhotoUrls = value; } std::vector> Pet::getTags() const { @@ -99,7 +150,7 @@ std::vector> Pet::getTags() const } void Pet::setTags(std::vector> value) { - m_Tags = value; + m_Tags = value; } std::string Pet::getStatus() const { @@ -107,7 +158,9 @@ std::string Pet::getStatus() const } void Pet::setStatus(std::string value) { - m_Status = value; + if (std::find(m_StatusEnum.begin(), m_StatusEnum.end(), value) != m_StatusEnum.end()) { + m_Status = value; + } } } diff --git a/samples/server/petstore/cpp-restbed/model/Pet.h b/samples/server/petstore/cpp-restbed/model/Pet.h index 4554904037..b5e97be031 100644 --- a/samples/server/petstore/cpp-restbed/model/Pet.h +++ b/samples/server/petstore/cpp-restbed/model/Pet.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -26,6 +26,7 @@ #include "Category.h" #include #include +#include namespace org { namespace openapitools { @@ -35,49 +36,55 @@ namespace model { /// /// A pet for sale in the pet store /// -class Pet +class Pet { public: Pet(); virtual ~Pet(); - std::string toJsonString(); + std::string toJsonString(bool prettyJson = false); void fromJsonString(std::string const& jsonString); + boost::property_tree::ptree toPropertyTree(); + void fromPropertyTree(boost::property_tree::ptree const& pt); ///////////////////////////////////////////// /// Pet members - + /// /// /// int64_t getId() const; void setId(int64_t value); + /// /// /// std::shared_ptr getCategory() const; void setCategory(std::shared_ptr value); + /// /// /// std::string getName() const; void setName(std::string value); + /// /// /// std::vector getPhotoUrls() const; void setPhotoUrls(std::vector value); + /// /// /// std::vector> getTags() const; void setTags(std::vector> value); + /// /// pet status in the store /// std::string getStatus() const; void setStatus(std::string value); - protected: int64_t m_Id; std::shared_ptr m_Category; @@ -85,6 +92,7 @@ protected: std::vector m_PhotoUrls; std::vector> m_Tags; std::string m_Status; + std::vector m_StatusEnum; }; } diff --git a/samples/server/petstore/cpp-restbed/model/Tag.cpp b/samples/server/petstore/cpp-restbed/model/Tag.cpp index 15061a1418..2002043224 100644 --- a/samples/server/petstore/cpp-restbed/model/Tag.cpp +++ b/samples/server/petstore/cpp-restbed/model/Tag.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -30,22 +30,18 @@ namespace model { Tag::Tag() { - m_Id = 0L; - m_Name = ""; - + m_Id = 0L; + m_Name = ""; } Tag::~Tag() { } -std::string Tag::toJsonString() +std::string Tag::toJsonString(bool prettyJson) { std::stringstream ss; - ptree pt; - pt.put("id", m_Id); - pt.put("name", m_Name); - write_json(ss, pt, false); + write_json(ss, this->toPropertyTree(), prettyJson); return ss.str(); } @@ -54,6 +50,21 @@ void Tag::fromJsonString(std::string const& jsonString) std::stringstream ss(jsonString); ptree pt; read_json(ss,pt); + this->fromPropertyTree(pt); +} + +ptree Tag::toPropertyTree() +{ + ptree pt; + ptree tmp_node; + pt.put("id", m_Id); + pt.put("name", m_Name); + return pt; +} + +void Tag::fromPropertyTree(ptree const &pt) +{ + ptree tmp_node; m_Id = pt.get("id", 0L); m_Name = pt.get("name", ""); } @@ -64,7 +75,7 @@ int64_t Tag::getId() const } void Tag::setId(int64_t value) { - m_Id = value; + m_Id = value; } std::string Tag::getName() const { @@ -72,7 +83,7 @@ std::string Tag::getName() const } void Tag::setName(std::string value) { - m_Name = value; + m_Name = value; } } diff --git a/samples/server/petstore/cpp-restbed/model/Tag.h b/samples/server/petstore/cpp-restbed/model/Tag.h index af7f482228..27248c61a1 100644 --- a/samples/server/petstore/cpp-restbed/model/Tag.h +++ b/samples/server/petstore/cpp-restbed/model/Tag.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -23,6 +23,7 @@ #include #include +#include namespace org { namespace openapitools { @@ -32,29 +33,31 @@ namespace model { /// /// A tag for a pet /// -class Tag +class Tag { public: Tag(); virtual ~Tag(); - std::string toJsonString(); + std::string toJsonString(bool prettyJson = false); void fromJsonString(std::string const& jsonString); + boost::property_tree::ptree toPropertyTree(); + void fromPropertyTree(boost::property_tree::ptree const& pt); ///////////////////////////////////////////// /// Tag members - + /// /// /// int64_t getId() const; void setId(int64_t value); + /// /// /// std::string getName() const; void setName(std::string value); - protected: int64_t m_Id; std::string m_Name; diff --git a/samples/server/petstore/cpp-restbed/model/User.cpp b/samples/server/petstore/cpp-restbed/model/User.cpp index 34f0eab9dd..6d22aab6f8 100644 --- a/samples/server/petstore/cpp-restbed/model/User.cpp +++ b/samples/server/petstore/cpp-restbed/model/User.cpp @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -30,34 +30,24 @@ namespace model { User::User() { - m_Id = 0L; - m_Username = ""; - m_FirstName = ""; - m_LastName = ""; - m_Email = ""; - m_Password = ""; - m_Phone = ""; - m_UserStatus = 0; - + m_Id = 0L; + m_Username = ""; + m_FirstName = ""; + m_LastName = ""; + m_Email = ""; + m_Password = ""; + m_Phone = ""; + m_UserStatus = 0; } User::~User() { } -std::string User::toJsonString() +std::string User::toJsonString(bool prettyJson) { std::stringstream ss; - ptree pt; - pt.put("id", m_Id); - pt.put("username", m_Username); - pt.put("firstName", m_FirstName); - pt.put("lastName", m_LastName); - pt.put("email", m_Email); - pt.put("password", m_Password); - pt.put("phone", m_Phone); - pt.put("userStatus", m_UserStatus); - write_json(ss, pt, false); + write_json(ss, this->toPropertyTree(), prettyJson); return ss.str(); } @@ -66,6 +56,27 @@ void User::fromJsonString(std::string const& jsonString) std::stringstream ss(jsonString); ptree pt; read_json(ss,pt); + this->fromPropertyTree(pt); +} + +ptree User::toPropertyTree() +{ + ptree pt; + ptree tmp_node; + pt.put("id", m_Id); + pt.put("username", m_Username); + pt.put("firstName", m_FirstName); + pt.put("lastName", m_LastName); + pt.put("email", m_Email); + pt.put("password", m_Password); + pt.put("phone", m_Phone); + pt.put("userStatus", m_UserStatus); + return pt; +} + +void User::fromPropertyTree(ptree const &pt) +{ + ptree tmp_node; m_Id = pt.get("id", 0L); m_Username = pt.get("username", ""); m_FirstName = pt.get("firstName", ""); @@ -82,7 +93,7 @@ int64_t User::getId() const } void User::setId(int64_t value) { - m_Id = value; + m_Id = value; } std::string User::getUsername() const { @@ -90,7 +101,7 @@ std::string User::getUsername() const } void User::setUsername(std::string value) { - m_Username = value; + m_Username = value; } std::string User::getFirstName() const { @@ -98,7 +109,7 @@ std::string User::getFirstName() const } void User::setFirstName(std::string value) { - m_FirstName = value; + m_FirstName = value; } std::string User::getLastName() const { @@ -106,7 +117,7 @@ std::string User::getLastName() const } void User::setLastName(std::string value) { - m_LastName = value; + m_LastName = value; } std::string User::getEmail() const { @@ -114,7 +125,7 @@ std::string User::getEmail() const } void User::setEmail(std::string value) { - m_Email = value; + m_Email = value; } std::string User::getPassword() const { @@ -122,7 +133,7 @@ std::string User::getPassword() const } void User::setPassword(std::string value) { - m_Password = value; + m_Password = value; } std::string User::getPhone() const { @@ -130,7 +141,7 @@ std::string User::getPhone() const } void User::setPhone(std::string value) { - m_Phone = value; + m_Phone = value; } int32_t User::getUserStatus() const { @@ -138,7 +149,7 @@ int32_t User::getUserStatus() const } void User::setUserStatus(int32_t value) { - m_UserStatus = value; + m_UserStatus = value; } } diff --git a/samples/server/petstore/cpp-restbed/model/User.h b/samples/server/petstore/cpp-restbed/model/User.h index 9016de0085..b8c807ac4e 100644 --- a/samples/server/petstore/cpp-restbed/model/User.h +++ b/samples/server/petstore/cpp-restbed/model/User.h @@ -5,7 +5,7 @@ * The version of the OpenAPI document: 1.0.0 * * - * NOTE: This class is auto generated by OpenAPI-Generator 4.2.0-SNAPSHOT. + * NOTE: This class is auto generated by OpenAPI-Generator unset. * https://openapi-generator.tech * Do not edit the class manually. */ @@ -23,6 +23,7 @@ #include #include +#include namespace org { namespace openapitools { @@ -32,59 +33,67 @@ namespace model { /// /// A User who is purchasing from the pet store /// -class User +class User { public: User(); virtual ~User(); - std::string toJsonString(); + std::string toJsonString(bool prettyJson = false); void fromJsonString(std::string const& jsonString); + boost::property_tree::ptree toPropertyTree(); + void fromPropertyTree(boost::property_tree::ptree const& pt); ///////////////////////////////////////////// /// User members - + /// /// /// int64_t getId() const; void setId(int64_t value); + /// /// /// std::string getUsername() const; void setUsername(std::string value); + /// /// /// std::string getFirstName() const; void setFirstName(std::string value); + /// /// /// std::string getLastName() const; void setLastName(std::string value); + /// /// /// std::string getEmail() const; void setEmail(std::string value); + /// /// /// std::string getPassword() const; void setPassword(std::string value); + /// /// /// std::string getPhone() const; void setPhone(std::string value); + /// /// User Status /// int32_t getUserStatus() const; void setUserStatus(int32_t value); - protected: int64_t m_Id; std::string m_Username; From 7c31b7f20661a77e83f80e0d08f05c7851535267 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 3 Jan 2020 10:42:01 +0800 Subject: [PATCH 15/82] [Swift] Minor improvements to swift 5 generator (#4910) * minor improvements to swift 5 generator * update readme * update samples --- README.md | 3 +- docs/generators.md | 2 +- ...5Codegen.java => Swift5ClientCodegen.java} | 21 ++++++++----- .../org.openapitools.codegen.CodegenConfig | 2 +- .../options/Swift5OptionsProvider.java | 30 +++++++++---------- ...Test.java => Swift5ClientCodegenTest.java} | 18 +++++------ .../codegen/swift5/Swift5ModelEnumTest.java | 10 +++---- .../codegen/swift5/Swift5ModelTest.java | 4 +-- .../codegen/swift5/Swift5OptionsTest.java | 4 +-- .../swift5/alamofireLibrary/README.md | 2 +- .../petstore/swift5/combineLibrary/README.md | 2 +- .../client/petstore/swift5/default/README.md | 2 +- .../petstore/swift5/nonPublicApi/README.md | 2 +- .../petstore/swift5/objcCompatible/README.md | 2 +- .../swift5/promisekitLibrary/README.md | 2 +- .../petstore/swift5/resultLibrary/README.md | 2 +- .../petstore/swift5/rxswiftLibrary/README.md | 2 +- .../swift5/urlsessionLibrary/README.md | 2 +- samples/client/test/swift5/default/README.md | 2 +- 19 files changed, 61 insertions(+), 53 deletions(-) rename modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/{Swift5Codegen.java => Swift5ClientCodegen.java} (98%) rename modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/{Swift5CodegenTest.java => Swift5ClientCodegenTest.java} (89%) diff --git a/README.md b/README.md index 228b189e01..91ecd71857 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se | | Languages/Frameworks | |-|-| -**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs) +**API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (rust, rust-server), **Scala** (akka, http4s, scalaz, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs) **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** ([Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc** **Configuration files** | [**Apache2**](https://httpd.apache.org/) @@ -795,6 +795,7 @@ Here is a list of template creators: * Swift: @tkqubo * Swift 3: @hexelon * Swift 4: @ehyche + * Swift 5: @4brunu * TypeScript (Angular1): @mhardorf * TypeScript (Angular2): @roni-frantchi * TypeScript (Angular6): @akehir diff --git a/docs/generators.md b/docs/generators.md index eb4daced89..8be760e7cc 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -57,7 +57,7 @@ The following generators are available: * [swift2-deprecated (deprecated)](generators/swift2-deprecated.md) * [swift3-deprecated (deprecated)](generators/swift3-deprecated.md) * [swift4](generators/swift4.md) -* [swift5](generators/swift5.md) +* [swift5 (beta)](generators/swift5.md) * [typescript-angular](generators/typescript-angular.md) * [typescript-angularjs](generators/typescript-angularjs.md) * [typescript-aurelia](generators/typescript-aurelia.md) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java similarity index 98% rename from modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5Codegen.java rename to modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 1aa925356f..1f5a9c75f4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -24,6 +24,8 @@ import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.text.WordUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.GeneratorMetadata; +import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,8 +38,8 @@ import java.util.regex.Pattern; import static org.openapitools.codegen.utils.StringUtils.camelize; -public class Swift5Codegen extends DefaultCodegen implements CodegenConfig { - private static final Logger LOGGER = LoggerFactory.getLogger(Swift5Codegen.class); +public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig { + private static final Logger LOGGER = LoggerFactory.getLogger(Swift5ClientCodegen.class); public static final String PROJECT_NAME = "projectName"; public static final String RESPONSE_AS = "responseAs"; @@ -75,8 +77,13 @@ public class Swift5Codegen extends DefaultCodegen implements CodegenConfig { /** * Constructor for the swift5 language codegen module. */ - public Swift5Codegen() { + public Swift5ClientCodegen() { super(); + + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) + .stability(Stability.BETA) + .build(); + outputFolder = "generated-code" + File.separator + "swift"; modelTemplateFiles.put("model.mustache", ".swift"); apiTemplateFiles.put("api.mustache", ".swift"); @@ -212,7 +219,7 @@ public class Swift5Codegen extends DefaultCodegen implements CodegenConfig { + StringUtils.join(RESPONSE_LIBRARIES, ", ") + " are available.")); cliOptions.add(new CliOption(CodegenConstants.NON_PUBLIC_API, - CodegenConstants.NON_PUBLIC_API_DESC + CodegenConstants.NON_PUBLIC_API_DESC + "(default: false)")); cliOptions.add(new CliOption(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC)); @@ -405,8 +412,8 @@ public class Swift5Codegen extends DefaultCodegen implements CodegenConfig { supportingFiles.add(new SupportingFile("Cartfile.mustache", "", "Cartfile")); - supportingFiles.add(new SupportingFile("Package.swift.mustache", - "", + supportingFiles.add(new SupportingFile("Package.swift.mustache", + "", "Package.swift")); supportingFiles.add(new SupportingFile("APIHelper.mustache", sourceFolder, @@ -742,7 +749,7 @@ public class Swift5Codegen extends DefaultCodegen implements CodegenConfig { final Schema parentModel = allDefinitions.get(parentSchema); final CodegenModel parentCodegenModel = super.fromModel(codegenModel.parent, parentModel); - codegenModel = Swift5Codegen.reconcileProperties(codegenModel, parentCodegenModel); + codegenModel = Swift5ClientCodegen.reconcileProperties(codegenModel, parentCodegenModel); // get the next parent parentSchema = parentCodegenModel.parentSchema; diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 5808a83b15..7fa410881c 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -109,7 +109,7 @@ org.openapitools.codegen.languages.StaticHtml2Generator org.openapitools.codegen.languages.SwiftClientCodegen org.openapitools.codegen.languages.Swift3Codegen org.openapitools.codegen.languages.Swift4Codegen -org.openapitools.codegen.languages.Swift5Codegen +org.openapitools.codegen.languages.Swift5ClientCodegen org.openapitools.codegen.languages.TypeScriptAngularClientCodegen org.openapitools.codegen.languages.TypeScriptAngularJsClientCodegen org.openapitools.codegen.languages.TypeScriptAureliaClientCodegen diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java index 477b79c9e5..b010650cc6 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/Swift5OptionsProvider.java @@ -19,7 +19,7 @@ package org.openapitools.codegen.options; import com.google.common.collect.ImmutableMap; import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.languages.Swift5Codegen; +import org.openapitools.codegen.languages.Swift5ClientCodegen; import java.util.Map; @@ -59,22 +59,22 @@ public class Swift5OptionsProvider implements OptionsProvider { return builder.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, SORT_PARAMS_VALUE) .put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, SORT_MODEL_PROPERTIES_VALUE) .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) - .put(Swift5Codegen.PROJECT_NAME, PROJECT_NAME_VALUE) - .put(Swift5Codegen.RESPONSE_AS, RESPONSE_AS_VALUE) + .put(Swift5ClientCodegen.PROJECT_NAME, PROJECT_NAME_VALUE) + .put(Swift5ClientCodegen.RESPONSE_AS, RESPONSE_AS_VALUE) .put(CodegenConstants.NON_PUBLIC_API, NON_PUBLIC_API_REQUIRED_VALUE) - .put(Swift5Codegen.OBJC_COMPATIBLE, OBJC_COMPATIBLE_VALUE) - .put(Swift5Codegen.LENIENT_TYPE_CAST, LENIENT_TYPE_CAST_VALUE) - .put(Swift5Codegen.POD_SOURCE, POD_SOURCE_VALUE) + .put(Swift5ClientCodegen.OBJC_COMPATIBLE, OBJC_COMPATIBLE_VALUE) + .put(Swift5ClientCodegen.LENIENT_TYPE_CAST, LENIENT_TYPE_CAST_VALUE) + .put(Swift5ClientCodegen.POD_SOURCE, POD_SOURCE_VALUE) .put(CodegenConstants.POD_VERSION, POD_VERSION_VALUE) - .put(Swift5Codegen.POD_AUTHORS, POD_AUTHORS_VALUE) - .put(Swift5Codegen.POD_SOCIAL_MEDIA_URL, POD_SOCIAL_MEDIA_URL_VALUE) - .put(Swift5Codegen.POD_LICENSE, POD_LICENSE_VALUE) - .put(Swift5Codegen.POD_HOMEPAGE, POD_HOMEPAGE_VALUE) - .put(Swift5Codegen.POD_SUMMARY, POD_SUMMARY_VALUE) - .put(Swift5Codegen.POD_DESCRIPTION, POD_DESCRIPTION_VALUE) - .put(Swift5Codegen.POD_SCREENSHOTS, POD_SCREENSHOTS_VALUE) - .put(Swift5Codegen.POD_DOCUMENTATION_URL, POD_DOCUMENTATION_URL_VALUE) - .put(Swift5Codegen.SWIFT_USE_API_NAMESPACE, SWIFT_USE_API_NAMESPACE_VALUE) + .put(Swift5ClientCodegen.POD_AUTHORS, POD_AUTHORS_VALUE) + .put(Swift5ClientCodegen.POD_SOCIAL_MEDIA_URL, POD_SOCIAL_MEDIA_URL_VALUE) + .put(Swift5ClientCodegen.POD_LICENSE, POD_LICENSE_VALUE) + .put(Swift5ClientCodegen.POD_HOMEPAGE, POD_HOMEPAGE_VALUE) + .put(Swift5ClientCodegen.POD_SUMMARY, POD_SUMMARY_VALUE) + .put(Swift5ClientCodegen.POD_DESCRIPTION, POD_DESCRIPTION_VALUE) + .put(Swift5ClientCodegen.POD_SCREENSHOTS, POD_SCREENSHOTS_VALUE) + .put(Swift5ClientCodegen.POD_DOCUMENTATION_URL, POD_DOCUMENTATION_URL_VALUE) + .put(Swift5ClientCodegen.SWIFT_USE_API_NAMESPACE, SWIFT_USE_API_NAMESPACE_VALUE) .put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true") .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5CodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java similarity index 89% rename from modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5CodegenTest.java rename to modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java index 9d57d0e109..07cc39bdc3 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5CodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ClientCodegenTest.java @@ -22,14 +22,14 @@ import io.swagger.v3.oas.models.Operation; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.TestUtils; -import org.openapitools.codegen.languages.Swift5Codegen; +import org.openapitools.codegen.languages.Swift5ClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; -public class Swift5CodegenTest { +public class Swift5ClientCodegenTest { - Swift5Codegen swiftCodegen = new Swift5Codegen(); + Swift5ClientCodegen swiftCodegen = new Swift5ClientCodegen(); @Test(enabled = true) public void testCapitalizedReservedWord() throws Exception { @@ -93,7 +93,7 @@ public class Swift5CodegenTest { // TODO update json file final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/binaryDataTest.json"); - final DefaultCodegen codegen = new Swift5Codegen(); + final DefaultCodegen codegen = new Swift5ClientCodegen(); codegen.setOpenAPI(openAPI); final String path = "/tests/binaryResponse"; final Operation p = openAPI.getPaths().get(path).getPost(); @@ -108,7 +108,7 @@ public class Swift5CodegenTest { @Test(description = "returns Date when response format is date", enabled = true) public void dateTest() { final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/datePropertyTest.json"); - final DefaultCodegen codegen = new Swift5Codegen(); + final DefaultCodegen codegen = new Swift5ClientCodegen(); codegen.setOpenAPI(openAPI); final String path = "/tests/dateResponse"; final Operation p = openAPI.getPaths().get(path).getPost(); @@ -126,21 +126,21 @@ public class Swift5CodegenTest { swiftCodegen.processOpts(); // Then - final String podAuthors = (String) swiftCodegen.additionalProperties().get(Swift5Codegen.POD_AUTHORS); - Assert.assertEquals(podAuthors, Swift5Codegen.DEFAULT_POD_AUTHORS); + final String podAuthors = (String) swiftCodegen.additionalProperties().get(Swift5ClientCodegen.POD_AUTHORS); + Assert.assertEquals(podAuthors, Swift5ClientCodegen.DEFAULT_POD_AUTHORS); } @Test(enabled = true) public void testPodAuthors() throws Exception { // Given final String openAPIDevs = "OpenAPI Devs"; - swiftCodegen.additionalProperties().put(Swift5Codegen.POD_AUTHORS, openAPIDevs); + swiftCodegen.additionalProperties().put(Swift5ClientCodegen.POD_AUTHORS, openAPIDevs); // When swiftCodegen.processOpts(); // Then - final String podAuthors = (String) swiftCodegen.additionalProperties().get(Swift5Codegen.POD_AUTHORS); + final String podAuthors = (String) swiftCodegen.additionalProperties().get(Swift5ClientCodegen.POD_AUTHORS); Assert.assertEquals(podAuthors, openAPIDevs); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java index d5faa7e045..2e398cd29e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java @@ -26,7 +26,7 @@ import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.TestUtils; -import org.openapitools.codegen.languages.Swift5Codegen; +import org.openapitools.codegen.languages.Swift5ClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; @@ -42,7 +42,7 @@ public class Swift5ModelEnumTest { enumSchema.setDefault("VALUE2"); final Schema model = new Schema().type("object").addProperties("name", enumSchema); - final DefaultCodegen codegen = new Swift5Codegen(); + final DefaultCodegen codegen = new Swift5ClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", model); @@ -66,7 +66,7 @@ public class Swift5ModelEnumTest { enumSchema.setDefault("2nd"); final Schema model = new Schema().type("object").addProperties("name", enumSchema); - final DefaultCodegen codegen = new Swift5Codegen(); + final DefaultCodegen codegen = new Swift5ClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", model); @@ -90,7 +90,7 @@ public class Swift5ModelEnumTest { enumSchema.setDefault(2); final Schema model = new Schema().type("object").addProperties("name", enumSchema); - final DefaultCodegen codegen = new Swift5Codegen(); + final DefaultCodegen codegen = new Swift5ClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", model); @@ -114,7 +114,7 @@ public class Swift5ModelEnumTest { enumSchema.setDefault(new BigDecimal((100))); final Schema model = new Schema().type("object").addProperties("name", enumSchema); - final DefaultCodegen codegen = new Swift5Codegen(); + final DefaultCodegen codegen = new Swift5ClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", model); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelTest.java index 3917716565..b178fe7994 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelTest.java @@ -24,7 +24,7 @@ import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.TestUtils; -import org.openapitools.codegen.languages.Swift5Codegen; +import org.openapitools.codegen.languages.Swift5ClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; @@ -45,7 +45,7 @@ public class Swift5ModelTest { .addRequiredItem("id") .addRequiredItem("name") .discriminator(new Discriminator().propertyName("test")); - final DefaultCodegen codegen = new Swift5Codegen(); + final DefaultCodegen codegen = new Swift5ClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", schema); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java index 845f9d4db0..c2f9d1965c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5OptionsTest.java @@ -21,13 +21,13 @@ import mockit.Expectations; import mockit.Tested; import org.openapitools.codegen.AbstractOptionsTest; import org.openapitools.codegen.CodegenConfig; -import org.openapitools.codegen.languages.Swift5Codegen; +import org.openapitools.codegen.languages.Swift5ClientCodegen; import org.openapitools.codegen.options.Swift5OptionsProvider; public class Swift5OptionsTest extends AbstractOptionsTest { @Tested - private Swift5Codegen clientCodegen; + private Swift5ClientCodegen clientCodegen; public Swift5OptionsTest() { super(new Swift5OptionsProvider()); diff --git a/samples/client/petstore/swift5/alamofireLibrary/README.md b/samples/client/petstore/swift5/alamofireLibrary/README.md index a50bf382e3..2a7b47d57c 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/README.md +++ b/samples/client/petstore/swift5/alamofireLibrary/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build package: org.openapitools.codegen.languages.Swift5Codegen +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen ## Installation diff --git a/samples/client/petstore/swift5/combineLibrary/README.md b/samples/client/petstore/swift5/combineLibrary/README.md index a50bf382e3..2a7b47d57c 100644 --- a/samples/client/petstore/swift5/combineLibrary/README.md +++ b/samples/client/petstore/swift5/combineLibrary/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build package: org.openapitools.codegen.languages.Swift5Codegen +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen ## Installation diff --git a/samples/client/petstore/swift5/default/README.md b/samples/client/petstore/swift5/default/README.md index a50bf382e3..2a7b47d57c 100644 --- a/samples/client/petstore/swift5/default/README.md +++ b/samples/client/petstore/swift5/default/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build package: org.openapitools.codegen.languages.Swift5Codegen +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen ## Installation diff --git a/samples/client/petstore/swift5/nonPublicApi/README.md b/samples/client/petstore/swift5/nonPublicApi/README.md index a50bf382e3..2a7b47d57c 100644 --- a/samples/client/petstore/swift5/nonPublicApi/README.md +++ b/samples/client/petstore/swift5/nonPublicApi/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build package: org.openapitools.codegen.languages.Swift5Codegen +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen ## Installation diff --git a/samples/client/petstore/swift5/objcCompatible/README.md b/samples/client/petstore/swift5/objcCompatible/README.md index a50bf382e3..2a7b47d57c 100644 --- a/samples/client/petstore/swift5/objcCompatible/README.md +++ b/samples/client/petstore/swift5/objcCompatible/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build package: org.openapitools.codegen.languages.Swift5Codegen +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen ## Installation diff --git a/samples/client/petstore/swift5/promisekitLibrary/README.md b/samples/client/petstore/swift5/promisekitLibrary/README.md index a50bf382e3..2a7b47d57c 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/README.md +++ b/samples/client/petstore/swift5/promisekitLibrary/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build package: org.openapitools.codegen.languages.Swift5Codegen +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen ## Installation diff --git a/samples/client/petstore/swift5/resultLibrary/README.md b/samples/client/petstore/swift5/resultLibrary/README.md index a50bf382e3..2a7b47d57c 100644 --- a/samples/client/petstore/swift5/resultLibrary/README.md +++ b/samples/client/petstore/swift5/resultLibrary/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build package: org.openapitools.codegen.languages.Swift5Codegen +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen ## Installation diff --git a/samples/client/petstore/swift5/rxswiftLibrary/README.md b/samples/client/petstore/swift5/rxswiftLibrary/README.md index a50bf382e3..2a7b47d57c 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/README.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build package: org.openapitools.codegen.languages.Swift5Codegen +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen ## Installation diff --git a/samples/client/petstore/swift5/urlsessionLibrary/README.md b/samples/client/petstore/swift5/urlsessionLibrary/README.md index a50bf382e3..2a7b47d57c 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/README.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build package: org.openapitools.codegen.languages.Swift5Codegen +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen ## Installation diff --git a/samples/client/test/swift5/default/README.md b/samples/client/test/swift5/default/README.md index 25059cabbf..76c19ec12c 100644 --- a/samples/client/test/swift5/default/README.md +++ b/samples/client/test/swift5/default/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0 - Package version: -- Build package: org.openapitools.codegen.languages.Swift5Codegen +- Build package: org.openapitools.codegen.languages.Swift5ClientCodegen For more information, please visit [http://www.example.com](http://www.example.com) ## Installation From e675360b9ebcce8301fa829d40354240f241fccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Fri, 3 Jan 2020 04:03:12 +0100 Subject: [PATCH 16/82] [java][client] jackson update (#4907) * [java][client] update jackson-databind-version to 2.10.1 * [java][client] update jackson-version to 2.10.1 * Update samples * [google-api-client] add missing generic parameter to fix compile error * Update samples --- .../main/resources/Java/build.gradle.mustache | 4 ++-- .../libraries/feign/build.gradle.mustache | 4 ++-- .../Java/libraries/feign/build.sbt.mustache | 6 +++--- .../Java/libraries/feign/pom.mustache | 4 ++-- .../libraries/google-api-client/api.mustache | 4 ++-- .../google-api-client/build.gradle.mustache | 4 ++-- .../google-api-client/build.sbt.mustache | 6 +++--- .../libraries/google-api-client/pom.mustache | 4 ++-- .../libraries/jersey2/build.gradle.mustache | 4 ++-- .../Java/libraries/jersey2/build.sbt.mustache | 6 +++--- .../Java/libraries/jersey2/pom.mustache | 4 ++-- .../rest-assured/build.gradle.mustache | 2 +- .../Java/libraries/rest-assured/pom.mustache | 2 +- .../libraries/resteasy/build.gradle.mustache | 4 ++-- .../libraries/resteasy/build.sbt.mustache | 6 +++--- .../Java/libraries/resteasy/pom.mustache | 4 ++-- .../resttemplate/build.gradle.mustache | 4 ++-- .../Java/libraries/resttemplate/pom.mustache | 4 ++-- .../libraries/retrofit2/build.gradle.mustache | 6 +++--- .../libraries/retrofit2/build.sbt.mustache | 10 +++++----- .../Java/libraries/retrofit2/pom.mustache | 6 +++--- .../libraries/vertx/build.gradle.mustache | 4 ++-- .../Java/libraries/vertx/pom.mustache | 4 ++-- .../Java/libraries/webclient/pom.mustache | 4 ++-- .../client/petstore/java/feign/build.gradle | 4 ++-- samples/client/petstore/java/feign/build.sbt | 6 +++--- samples/client/petstore/java/feign/pom.xml | 4 ++-- .../petstore/java/feign10x/build.gradle | 4 ++-- .../client/petstore/java/feign10x/build.sbt | 6 +++--- samples/client/petstore/java/feign10x/pom.xml | 4 ++-- .../java/google-api-client/build.gradle | 4 ++-- .../petstore/java/google-api-client/build.sbt | 6 +++--- .../petstore/java/google-api-client/pom.xml | 4 ++-- .../client/api/AnotherFakeApi.java | 4 ++-- .../org/openapitools/client/api/FakeApi.java | 20 +++++++++---------- .../client/api/FakeClassnameTags123Api.java | 4 ++-- .../org/openapitools/client/api/PetApi.java | 20 +++++++++---------- .../org/openapitools/client/api/StoreApi.java | 12 +++++------ .../org/openapitools/client/api/UserApi.java | 8 ++++---- .../client/petstore/java/jersey1/build.gradle | 4 ++-- .../petstore/java/jersey2-java6/build.sbt | 6 +++--- .../petstore/java/jersey2-java6/pom.xml | 4 ++-- .../petstore/java/jersey2-java8/build.gradle | 4 ++-- .../petstore/java/jersey2-java8/build.sbt | 6 +++--- .../petstore/java/jersey2-java8/pom.xml | 4 ++-- .../client/petstore/java/jersey2/build.gradle | 4 ++-- .../client/petstore/java/jersey2/build.sbt | 6 +++--- samples/client/petstore/java/jersey2/pom.xml | 4 ++-- .../petstore/java/resteasy/build.gradle | 4 ++-- .../client/petstore/java/resteasy/build.sbt | 6 +++--- samples/client/petstore/java/resteasy/pom.xml | 4 ++-- .../java/resttemplate-withXml/build.gradle | 4 ++-- .../java/resttemplate-withXml/pom.xml | 4 ++-- .../petstore/java/resttemplate/build.gradle | 4 ++-- .../client/petstore/java/resttemplate/pom.xml | 4 ++-- .../petstore/java/retrofit2-play24/pom.xml | 2 +- .../java/retrofit2-play25/build.gradle | 2 +- .../petstore/java/retrofit2-play25/build.sbt | 6 +++--- .../petstore/java/retrofit2-play25/pom.xml | 4 ++-- .../java/retrofit2-play26/build.gradle | 4 ++-- .../petstore/java/retrofit2-play26/build.sbt | 4 ++-- .../petstore/java/retrofit2-play26/pom.xml | 4 ++-- .../client/petstore/java/vertx/build.gradle | 4 ++-- samples/client/petstore/java/vertx/pom.xml | 4 ++-- .../petstore/java/webclient/build.gradle | 4 ++-- .../client/petstore/java/webclient/pom.xml | 4 ++-- 66 files changed, 167 insertions(+), 167 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index 0d370b8c3f..b761d147c5 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -136,8 +136,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" jersey_version = "1.19.4" jodatime_version = "2.9.9" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index caa0ca5899..24e668fdf3 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -120,8 +120,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" {{#threetenbp}} jackson_threetenbp_version = "2.9.10" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache index 4194803a08..907b7bd4d2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.sbt.mustache @@ -14,9 +14,9 @@ lazy val root = (project in file(".")). "io.github.openfeign" % "feign-jackson" % "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile", "io.github.openfeign" % "feign-slf4j" % "{{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}}" % "compile", "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}" % "2.9.10" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache index a13a4a263e..e73e45de1b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache @@ -314,9 +314,9 @@ 1.5.21 {{#useFeign10}}10.2.3{{/useFeign10}}{{^useFeign10}}9.7.0{{/useFeign10}} 2.1.0 - 2.9.10 + 2.10.1 0.2.1 - 2.9.10.1 + 2.10.1 {{#threetenbp}} 2.9.10 {{/threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache index 7c5669aa2a..2c13f4eb01 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/api.mustache @@ -58,7 +58,7 @@ public class {{classname}} { **/ public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws IOException { {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} - TypeReference typeRef = new TypeReference<{{{returnType}}}>() {}; + TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} } @@ -77,7 +77,7 @@ public class {{classname}} { **/ public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map params) throws IOException { {{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}params);{{#returnType}} - TypeReference typeRef = new TypeReference<{{{returnType}}}>() {}; + TypeReference<{{{returnType}}}> typeRef = new TypeReference<{{{returnType}}}>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}} } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache index 9808528459..346ed6625b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache @@ -120,8 +120,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" google_api_client_version = "1.23.0" jersey_common_version = "2.25.1" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache index 87b444d938..7d958dfadf 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.sbt.mustache @@ -12,9 +12,9 @@ lazy val root = (project in file(".")). "io.swagger" % "swagger-annotations" % "1.5.22", "com.google.api-client" % "google-api-client" % "1.23.0", "org.glassfish.jersey.core" % "jersey-common" % "2.25.1", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", {{#withXml}} "com.fasterxml.jackson.dataformat" % "jackson-dataformat-xml" % "2.9.10" % "compile", {{/withXml}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache index 259f9806af..5e3c04fe93 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/pom.mustache @@ -306,8 +306,8 @@ 1.5.22 1.30.2 2.25.1 - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 {{#joda}} 2.9.9 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index fdd258f1d2..16cc03eeeb 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -119,8 +119,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" {{#supportJava6}} jersey_version = "2.6" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache index 84fc8b722b..7e2dc832a2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.sbt.mustache @@ -13,9 +13,9 @@ lazy val root = (project in file(".")). "org.glassfish.jersey.core" % "jersey-client" % {{#supportJava6}}"2.6"{{/supportJava6}}{{^supportJava6}}"2.25.1"{{/supportJava6}}, "org.glassfish.jersey.media" % "jersey-media-multipart" % {{#supportJava6}}"2.6"{{/supportJava6}}{{^supportJava6}}"2.25.1"{{/supportJava6}}, "org.glassfish.jersey.media" % "jersey-media-json-jackson" % {{#supportJava6}}"2.6"{{/supportJava6}}{{^supportJava6}}"2.25.1"{{/supportJava6}}, - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", {{#joda}} "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", {{/joda}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache index e2eb2bdbd0..e9fc8ba394 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/pom.mustache @@ -360,8 +360,8 @@ 2.5 3.6 {{/supportJava6}} - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 {{#threetenbp}} 2.9.10 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache index bd24198622..f6487eefc5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache @@ -99,7 +99,7 @@ ext { rest_assured_version = "4.0.0" junit_version = "4.13" {{#jackson}} - jackson_version = "2.9.10" + jackson_version = "2.10.1" jackson_databind_version = "2.9.10" jackson_databind_nullable_version = 0.2.1 {{/jackson}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache index bec9af57bb..9c49fb0777 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/pom.mustache @@ -323,7 +323,7 @@ 1.4.0 {{/threetenbp}} {{#jackson}} - 2.9.10 + 2.10.1 2.9.10 0.2.1 {{#threetenbp}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache index 86fb51119f..08ab4a3cce 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache @@ -119,8 +119,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" threetenbp_version = "2.9.10" resteasy_version = "3.1.3.Final" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache index 2554ec2f10..936c4141f8 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.sbt.mustache @@ -13,9 +13,9 @@ lazy val root = (project in file(".")). "org.jboss.resteasy" % "resteasy-client" % "3.1.3.Final" % "compile", "org.jboss.resteasy" % "resteasy-multipart-provider" % "3.1.3.Final" % "compile", "org.jboss.resteasy" % "resteasy-jackson2-provider" % "3.1.3.Final" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", {{#java8}} "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache index 48d1fa3a28..e3e127020e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/pom.mustache @@ -294,8 +294,8 @@ UTF-8 1.5.22 3.1.3.Final - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 2.9.10 {{^java8}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index 74c7fdea5f..a957f76822 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -120,8 +120,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache index 04920dd554..1f5e82d501 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache @@ -309,8 +309,8 @@ UTF-8 1.5.22 4.3.9.RELEASE - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 {{#joda}} 2.9.9 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache index 55025dd0e0..7d8a096e83 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache @@ -127,12 +127,12 @@ ext { play_version = "2.4.11" {{/play24}} {{#play25}} - jackson_version = "2.9.10" + jackson_version = "2.10.1" play_version = "2.5.14" {{/play25}} {{#play26}} - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" play_version = "2.6.7" {{/play26}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache index 0d7954c4e0..be45635e47 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.sbt.mustache @@ -23,15 +23,15 @@ lazy val root = (project in file(".")). {{/play24}} {{#play25}} "com.typesafe.play" % "play-java-ws_2.11" % "2.5.15" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", {{/play25}} {{#play26}} "com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile", "javax.validation" % "validation-api" % "1.1.0.Final" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", {{/play26}} "com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile", diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache index 78046cbf1c..9613f94841 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/pom.mustache @@ -375,17 +375,17 @@ 1.8.3 1.5.22 {{#usePlayWS}} - 2.9.10.1 + 2.10.1 {{#play24}} 2.6.6 2.4.11 {{/play24}} {{#play25}} - 2.9.10 + 2.10.1 2.5.15 {{/play25}} {{#play26}} - 2.9.10 + 2.10.1 2.6.7 {{/play26}} 0.2.1 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache index 3ac8134e0f..456356c925 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache @@ -28,8 +28,8 @@ task execute(type:JavaExec) { ext { swagger_annotations_version = "1.5.21" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" vertx_version = "3.4.2" junit_version = "4.13" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache index 21b5fdbc6f..3ed8b93b49 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/pom.mustache @@ -289,8 +289,8 @@ UTF-8 3.4.2 1.5.22 - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 4.13 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache index be8e056002..7b57232bc5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/webclient/pom.mustache @@ -143,8 +143,8 @@ UTF-8 1.5.22 5.0.8.RELEASE - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 4.13 3.1.8.RELEASE diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle index e5af9a63fa..ee820afa2d 100644 --- a/samples/client/petstore/java/feign/build.gradle +++ b/samples/client/petstore/java/feign/build.gradle @@ -96,8 +96,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" jackson_threetenbp_version = "2.9.10" feign_version = "9.7.0" diff --git a/samples/client/petstore/java/feign/build.sbt b/samples/client/petstore/java/feign/build.sbt index 527b5d8dcf..92716f37ea 100644 --- a/samples/client/petstore/java/feign/build.sbt +++ b/samples/client/petstore/java/feign/build.sbt @@ -14,9 +14,9 @@ lazy val root = (project in file(".")). "io.github.openfeign" % "feign-jackson" % "9.7.0" % "compile", "io.github.openfeign" % "feign-slf4j" % "9.7.0" % "compile", "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", diff --git a/samples/client/petstore/java/feign/pom.xml b/samples/client/petstore/java/feign/pom.xml index 12bcdd6ba6..6a49245079 100644 --- a/samples/client/petstore/java/feign/pom.xml +++ b/samples/client/petstore/java/feign/pom.xml @@ -281,9 +281,9 @@ 1.5.21 9.7.0 2.1.0 - 2.9.10 + 2.10.1 0.2.1 - 2.9.10.1 + 2.10.1 2.9.10 4.13 1.0.0 diff --git a/samples/client/petstore/java/feign10x/build.gradle b/samples/client/petstore/java/feign10x/build.gradle index dfc75b39b3..f4fe50f9b9 100644 --- a/samples/client/petstore/java/feign10x/build.gradle +++ b/samples/client/petstore/java/feign10x/build.gradle @@ -96,8 +96,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" jackson_threetenbp_version = "2.9.10" feign_version = "10.2.3" diff --git a/samples/client/petstore/java/feign10x/build.sbt b/samples/client/petstore/java/feign10x/build.sbt index 89a9e8072e..4106cf955d 100644 --- a/samples/client/petstore/java/feign10x/build.sbt +++ b/samples/client/petstore/java/feign10x/build.sbt @@ -14,9 +14,9 @@ lazy val root = (project in file(".")). "io.github.openfeign" % "feign-jackson" % "10.2.3" % "compile", "io.github.openfeign" % "feign-slf4j" % "10.2.3" % "compile", "io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", diff --git a/samples/client/petstore/java/feign10x/pom.xml b/samples/client/petstore/java/feign10x/pom.xml index 40d89b0d73..286505c6b8 100644 --- a/samples/client/petstore/java/feign10x/pom.xml +++ b/samples/client/petstore/java/feign10x/pom.xml @@ -281,9 +281,9 @@ 1.5.21 10.2.3 2.1.0 - 2.9.10 + 2.10.1 0.2.1 - 2.9.10.1 + 2.10.1 2.9.10 4.13 1.0.0 diff --git a/samples/client/petstore/java/google-api-client/build.gradle b/samples/client/petstore/java/google-api-client/build.gradle index 3b0c95caae..b285843aae 100644 --- a/samples/client/petstore/java/google-api-client/build.gradle +++ b/samples/client/petstore/java/google-api-client/build.gradle @@ -96,8 +96,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" google_api_client_version = "1.23.0" jersey_common_version = "2.25.1" diff --git a/samples/client/petstore/java/google-api-client/build.sbt b/samples/client/petstore/java/google-api-client/build.sbt index 4022715c50..72e0879cde 100644 --- a/samples/client/petstore/java/google-api-client/build.sbt +++ b/samples/client/petstore/java/google-api-client/build.sbt @@ -12,9 +12,9 @@ lazy val root = (project in file(".")). "io.swagger" % "swagger-annotations" % "1.5.22", "com.google.api-client" % "google-api-client" % "1.23.0", "org.glassfish.jersey.core" % "jersey-common" % "2.25.1", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" diff --git a/samples/client/petstore/java/google-api-client/pom.xml b/samples/client/petstore/java/google-api-client/pom.xml index 9ae84e9754..942d7b1f75 100644 --- a/samples/client/petstore/java/google-api-client/pom.xml +++ b/samples/client/petstore/java/google-api-client/pom.xml @@ -258,8 +258,8 @@ 1.5.22 1.30.2 2.25.1 - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 2.9.10 1.0.0 diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index f5ef6820a7..461ec4a03a 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -51,7 +51,7 @@ public class AnotherFakeApi { **/ public Client call123testSpecialTags(Client body) throws IOException { HttpResponse response = call123testSpecialTagsForHttpResponse(body); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -66,7 +66,7 @@ public class AnotherFakeApi { **/ public Client call123testSpecialTags(Client body, Map params) throws IOException { HttpResponse response = call123testSpecialTagsForHttpResponse(body, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java index 60705fb09f..5d1df0a402 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java @@ -144,7 +144,7 @@ public class FakeApi { **/ public Boolean fakeOuterBooleanSerialize(Boolean body) throws IOException { HttpResponse response = fakeOuterBooleanSerializeForHttpResponse(body); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -157,7 +157,7 @@ public class FakeApi { **/ public Boolean fakeOuterBooleanSerialize(Boolean body, Map params) throws IOException { HttpResponse response = fakeOuterBooleanSerializeForHttpResponse(body, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -224,7 +224,7 @@ public class FakeApi { **/ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws IOException { HttpResponse response = fakeOuterCompositeSerializeForHttpResponse(body); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -237,7 +237,7 @@ public class FakeApi { **/ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body, Map params) throws IOException { HttpResponse response = fakeOuterCompositeSerializeForHttpResponse(body, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -304,7 +304,7 @@ public class FakeApi { **/ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws IOException { HttpResponse response = fakeOuterNumberSerializeForHttpResponse(body); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -317,7 +317,7 @@ public class FakeApi { **/ public BigDecimal fakeOuterNumberSerialize(BigDecimal body, Map params) throws IOException { HttpResponse response = fakeOuterNumberSerializeForHttpResponse(body, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -384,7 +384,7 @@ public class FakeApi { **/ public String fakeOuterStringSerialize(String body) throws IOException { HttpResponse response = fakeOuterStringSerializeForHttpResponse(body); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -397,7 +397,7 @@ public class FakeApi { **/ public String fakeOuterStringSerialize(String body, Map params) throws IOException { HttpResponse response = fakeOuterStringSerializeForHttpResponse(body, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -666,7 +666,7 @@ public class FakeApi { **/ public Client testClientModel(Client body) throws IOException { HttpResponse response = testClientModelForHttpResponse(body); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -681,7 +681,7 @@ public class FakeApi { **/ public Client testClientModel(Client body, Map params) throws IOException { HttpResponse response = testClientModelForHttpResponse(body, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 6ff01d102b..fc39bf01f8 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -51,7 +51,7 @@ public class FakeClassnameTags123Api { **/ public Client testClassname(Client body) throws IOException { HttpResponse response = testClassnameForHttpResponse(body); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -66,7 +66,7 @@ public class FakeClassnameTags123Api { **/ public Client testClassname(Client body, Map params) throws IOException { HttpResponse response = testClassnameForHttpResponse(body, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java index 8acb256d33..2502d00f96 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java @@ -217,7 +217,7 @@ public class PetApi { **/ public List findPetsByStatus(List status) throws IOException { HttpResponse response = findPetsByStatusForHttpResponse(status); - TypeReference typeRef = new TypeReference>() {}; + TypeReference> typeRef = new TypeReference>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -233,7 +233,7 @@ public class PetApi { **/ public List findPetsByStatus(List status, Map params) throws IOException { HttpResponse response = findPetsByStatusForHttpResponse(status, params); - TypeReference typeRef = new TypeReference>() {}; + TypeReference> typeRef = new TypeReference>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -308,7 +308,7 @@ public class PetApi { **/ public List findPetsByTags(List tags) throws IOException { HttpResponse response = findPetsByTagsForHttpResponse(tags); - TypeReference typeRef = new TypeReference>() {}; + TypeReference> typeRef = new TypeReference>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -324,7 +324,7 @@ public class PetApi { **/ public List findPetsByTags(List tags, Map params) throws IOException { HttpResponse response = findPetsByTagsForHttpResponse(tags, params); - TypeReference typeRef = new TypeReference>() {}; + TypeReference> typeRef = new TypeReference>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -400,7 +400,7 @@ public class PetApi { **/ public Pet getPetById(Long petId) throws IOException { HttpResponse response = getPetByIdForHttpResponse(petId); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -417,7 +417,7 @@ public class PetApi { **/ public Pet getPetById(Long petId, Map params) throws IOException { HttpResponse response = getPetByIdForHttpResponse(petId, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -651,7 +651,7 @@ public class PetApi { **/ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws IOException { HttpResponse response = uploadFileForHttpResponse(petId, additionalMetadata, file); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -665,7 +665,7 @@ public class PetApi { **/ public ModelApiResponse uploadFile(Long petId, Map params) throws IOException { HttpResponse response = uploadFileForHttpResponse(petId, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -733,7 +733,7 @@ public class PetApi { **/ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws IOException { HttpResponse response = uploadFileWithRequiredFileForHttpResponse(petId, requiredFile, additionalMetadata); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -748,7 +748,7 @@ public class PetApi { **/ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, Map params) throws IOException { HttpResponse response = uploadFileWithRequiredFileForHttpResponse(petId, requiredFile, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/StoreApi.java index 78fc7b3960..d103e480fc 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/StoreApi.java @@ -128,7 +128,7 @@ public class StoreApi { **/ public Map getInventory() throws IOException { HttpResponse response = getInventoryForHttpResponse(); - TypeReference typeRef = new TypeReference>() {}; + TypeReference> typeRef = new TypeReference>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -142,7 +142,7 @@ public class StoreApi { **/ public Map getInventory(Map params) throws IOException { HttpResponse response = getInventoryForHttpResponse(params); - TypeReference typeRef = new TypeReference>() {}; + TypeReference> typeRef = new TypeReference>() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -199,7 +199,7 @@ public class StoreApi { **/ public Order getOrderById(Long orderId) throws IOException { HttpResponse response = getOrderByIdForHttpResponse(orderId); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -216,7 +216,7 @@ public class StoreApi { **/ public Order getOrderById(Long orderId, Map params) throws IOException { HttpResponse response = getOrderByIdForHttpResponse(orderId, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -283,7 +283,7 @@ public class StoreApi { **/ public Order placeOrder(Order body) throws IOException { HttpResponse response = placeOrderForHttpResponse(body); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -298,7 +298,7 @@ public class StoreApi { **/ public Order placeOrder(Order body, Map params) throws IOException { HttpResponse response = placeOrderForHttpResponse(body, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/UserApi.java index ee22d3ae09..fb8b763e25 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/UserApi.java @@ -384,7 +384,7 @@ public class UserApi { **/ public User getUserByName(String username) throws IOException { HttpResponse response = getUserByNameForHttpResponse(username); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -400,7 +400,7 @@ public class UserApi { **/ public User getUserByName(String username, Map params) throws IOException { HttpResponse response = getUserByNameForHttpResponse(username, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -468,7 +468,7 @@ public class UserApi { **/ public String loginUser(String username, String password) throws IOException { HttpResponse response = loginUserForHttpResponse(username, password); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -484,7 +484,7 @@ public class UserApi { **/ public String loginUser(String username, String password, Map params) throws IOException { HttpResponse response = loginUserForHttpResponse(username, password, params); - TypeReference typeRef = new TypeReference() {}; + TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } diff --git a/samples/client/petstore/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle index 3051d5c4e7..9dbc737662 100644 --- a/samples/client/petstore/java/jersey1/build.gradle +++ b/samples/client/petstore/java/jersey1/build.gradle @@ -112,8 +112,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" jersey_version = "1.19.4" jodatime_version = "2.9.9" diff --git a/samples/client/petstore/java/jersey2-java6/build.sbt b/samples/client/petstore/java/jersey2-java6/build.sbt index 228edc4e01..7818d01c52 100644 --- a/samples/client/petstore/java/jersey2-java6/build.sbt +++ b/samples/client/petstore/java/jersey2-java6/build.sbt @@ -13,9 +13,9 @@ lazy val root = (project in file(".")). "org.glassfish.jersey.core" % "jersey-client" % "2.6", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.6", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.6", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.brsanthu" % "migbase64" % "2.2", "org.apache.commons" % "commons-lang3" % "3.6", diff --git a/samples/client/petstore/java/jersey2-java6/pom.xml b/samples/client/petstore/java/jersey2-java6/pom.xml index ccc62e8e80..6338652241 100644 --- a/samples/client/petstore/java/jersey2-java6/pom.xml +++ b/samples/client/petstore/java/jersey2-java6/pom.xml @@ -290,8 +290,8 @@ 2.6 2.5 3.6 - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 2.9.10 1.0.0 diff --git a/samples/client/petstore/java/jersey2-java8/build.gradle b/samples/client/petstore/java/jersey2-java8/build.gradle index 6efdd2bdd0..68f87b70fa 100644 --- a/samples/client/petstore/java/jersey2-java8/build.gradle +++ b/samples/client/petstore/java/jersey2-java8/build.gradle @@ -95,8 +95,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" jersey_version = "2.27" junit_version = "4.13" diff --git a/samples/client/petstore/java/jersey2-java8/build.sbt b/samples/client/petstore/java/jersey2-java8/build.sbt index 864d02b09f..7b55e3429a 100644 --- a/samples/client/petstore/java/jersey2-java8/build.sbt +++ b/samples/client/petstore/java/jersey2-java8/build.sbt @@ -13,9 +13,9 @@ lazy val root = (project in file(".")). "org.glassfish.jersey.core" % "jersey-client" % "2.25.1", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.25.1", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.25.1", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", "junit" % "junit" % "4.13" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" diff --git a/samples/client/petstore/java/jersey2-java8/pom.xml b/samples/client/petstore/java/jersey2-java8/pom.xml index f2905dcd50..c73f1e4da7 100644 --- a/samples/client/petstore/java/jersey2-java8/pom.xml +++ b/samples/client/petstore/java/jersey2-java8/pom.xml @@ -277,8 +277,8 @@ UTF-8 1.5.22 2.27 - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 1.0.0 4.13 diff --git a/samples/client/petstore/java/jersey2/build.gradle b/samples/client/petstore/java/jersey2/build.gradle index 7e01a214c1..df05b87867 100644 --- a/samples/client/petstore/java/jersey2/build.gradle +++ b/samples/client/petstore/java/jersey2/build.gradle @@ -95,8 +95,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" jersey_version = "2.27" junit_version = "4.13" diff --git a/samples/client/petstore/java/jersey2/build.sbt b/samples/client/petstore/java/jersey2/build.sbt index 81511375ed..8002eba6a8 100644 --- a/samples/client/petstore/java/jersey2/build.sbt +++ b/samples/client/petstore/java/jersey2/build.sbt @@ -13,9 +13,9 @@ lazy val root = (project in file(".")). "org.glassfish.jersey.core" % "jersey-client" % "2.25.1", "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.25.1", "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.25.1", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.brsanthu" % "migbase64" % "2.2", "junit" % "junit" % "4.13" % "test", diff --git a/samples/client/petstore/java/jersey2/pom.xml b/samples/client/petstore/java/jersey2/pom.xml index 4654fea20b..d4d1482b23 100644 --- a/samples/client/petstore/java/jersey2/pom.xml +++ b/samples/client/petstore/java/jersey2/pom.xml @@ -283,8 +283,8 @@ UTF-8 1.5.22 2.27 - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 2.9.10 1.0.0 diff --git a/samples/client/petstore/java/resteasy/build.gradle b/samples/client/petstore/java/resteasy/build.gradle index 57037d35c5..e263657eb1 100644 --- a/samples/client/petstore/java/resteasy/build.gradle +++ b/samples/client/petstore/java/resteasy/build.gradle @@ -95,8 +95,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" threetenbp_version = "2.9.10" resteasy_version = "3.1.3.Final" diff --git a/samples/client/petstore/java/resteasy/build.sbt b/samples/client/petstore/java/resteasy/build.sbt index 72666efc37..72ca66d13c 100644 --- a/samples/client/petstore/java/resteasy/build.sbt +++ b/samples/client/petstore/java/resteasy/build.sbt @@ -13,9 +13,9 @@ lazy val root = (project in file(".")). "org.jboss.resteasy" % "resteasy-client" % "3.1.3.Final" % "compile", "org.jboss.resteasy" % "resteasy-multipart-provider" % "3.1.3.Final" % "compile", "org.jboss.resteasy" % "resteasy-jackson2-provider" % "3.1.3.Final" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", "com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % "2.9.10" % "compile", "joda-time" % "joda-time" % "2.9.9" % "compile", diff --git a/samples/client/petstore/java/resteasy/pom.xml b/samples/client/petstore/java/resteasy/pom.xml index a1ad565c64..9d400f6f73 100644 --- a/samples/client/petstore/java/resteasy/pom.xml +++ b/samples/client/petstore/java/resteasy/pom.xml @@ -243,8 +243,8 @@ UTF-8 1.5.22 3.1.3.Final - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 2.9.10 2.9.9 diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle index d4e0a4078d..2491672be6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/build.gradle +++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle @@ -96,8 +96,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" diff --git a/samples/client/petstore/java/resttemplate-withXml/pom.xml b/samples/client/petstore/java/resttemplate-withXml/pom.xml index 2c07e6f0ae..8de7552e9e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/pom.xml +++ b/samples/client/petstore/java/resttemplate-withXml/pom.xml @@ -267,8 +267,8 @@ UTF-8 1.5.22 4.3.9.RELEASE - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 2.9.10 1.0.0 diff --git a/samples/client/petstore/java/resttemplate/build.gradle b/samples/client/petstore/java/resttemplate/build.gradle index 54857b5614..dba8e247fc 100644 --- a/samples/client/petstore/java/resttemplate/build.gradle +++ b/samples/client/petstore/java/resttemplate/build.gradle @@ -96,8 +96,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" spring_web_version = "4.3.9.RELEASE" jodatime_version = "2.9.9" diff --git a/samples/client/petstore/java/resttemplate/pom.xml b/samples/client/petstore/java/resttemplate/pom.xml index 488c9758fb..4b0d49b3f3 100644 --- a/samples/client/petstore/java/resttemplate/pom.xml +++ b/samples/client/petstore/java/resttemplate/pom.xml @@ -259,8 +259,8 @@ UTF-8 1.5.22 4.3.9.RELEASE - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 2.9.10 1.0.0 diff --git a/samples/client/petstore/java/retrofit2-play24/pom.xml b/samples/client/petstore/java/retrofit2-play24/pom.xml index 2682f93418..f7b231ee41 100644 --- a/samples/client/petstore/java/retrofit2-play24/pom.xml +++ b/samples/client/petstore/java/retrofit2-play24/pom.xml @@ -279,7 +279,7 @@ ${java.version} 1.8.3 1.5.22 - 2.9.10.1 + 2.10.1 2.6.6 2.4.11 0.2.1 diff --git a/samples/client/petstore/java/retrofit2-play25/build.gradle b/samples/client/petstore/java/retrofit2-play25/build.gradle index 1ef29ccc68..83ce70c0d4 100644 --- a/samples/client/petstore/java/retrofit2-play25/build.gradle +++ b/samples/client/petstore/java/retrofit2-play25/build.gradle @@ -97,7 +97,7 @@ if(hasProperty('target') && target == 'android') { ext { oltu_version = "1.0.1" retrofit_version = "2.3.0" - jackson_version = "2.9.10" + jackson_version = "2.10.1" play_version = "2.5.14" swagger_annotations_version = "1.5.22" junit_version = "4.13" diff --git a/samples/client/petstore/java/retrofit2-play25/build.sbt b/samples/client/petstore/java/retrofit2-play25/build.sbt index 4672fa0453..5a42c1bbe4 100644 --- a/samples/client/petstore/java/retrofit2-play25/build.sbt +++ b/samples/client/petstore/java/retrofit2-play25/build.sbt @@ -12,9 +12,9 @@ lazy val root = (project in file(".")). "com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile", "com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile", "com.typesafe.play" % "play-java-ws_2.11" % "2.5.15" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile", "com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile", "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", diff --git a/samples/client/petstore/java/retrofit2-play25/pom.xml b/samples/client/petstore/java/retrofit2-play25/pom.xml index 413b596595..5dbab32ed8 100644 --- a/samples/client/petstore/java/retrofit2-play25/pom.xml +++ b/samples/client/petstore/java/retrofit2-play25/pom.xml @@ -284,8 +284,8 @@ ${java.version} 1.8.3 1.5.22 - 2.9.10.1 - 2.9.10 + 2.10.1 + 2.10.1 2.5.15 0.2.1 2.5.0 diff --git a/samples/client/petstore/java/retrofit2-play26/build.gradle b/samples/client/petstore/java/retrofit2-play26/build.gradle index 3e2f777ba2..53b39f74ae 100644 --- a/samples/client/petstore/java/retrofit2-play26/build.gradle +++ b/samples/client/petstore/java/retrofit2-play26/build.gradle @@ -97,8 +97,8 @@ if(hasProperty('target') && target == 'android') { ext { oltu_version = "1.0.1" retrofit_version = "2.3.0" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" play_version = "2.6.7" swagger_annotations_version = "1.5.22" diff --git a/samples/client/petstore/java/retrofit2-play26/build.sbt b/samples/client/petstore/java/retrofit2-play26/build.sbt index 2a1a6f8bbe..9cf24d96c3 100644 --- a/samples/client/petstore/java/retrofit2-play26/build.sbt +++ b/samples/client/petstore/java/retrofit2-play26/build.sbt @@ -13,8 +13,8 @@ lazy val root = (project in file(".")). "com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile", "com.typesafe.play" % "play-ahc-ws_2.12" % "2.6.7" % "compile", "javax.validation" % "validation-api" % "1.1.0.Final" % "compile", - "com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile", "com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile", "com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile", "io.swagger" % "swagger-annotations" % "1.5.21" % "compile", diff --git a/samples/client/petstore/java/retrofit2-play26/pom.xml b/samples/client/petstore/java/retrofit2-play26/pom.xml index 787a447eb1..5dc37422b0 100644 --- a/samples/client/petstore/java/retrofit2-play26/pom.xml +++ b/samples/client/petstore/java/retrofit2-play26/pom.xml @@ -289,8 +289,8 @@ ${java.version} 1.8.3 1.5.22 - 2.9.10.1 - 2.9.10 + 2.10.1 + 2.10.1 2.6.7 0.2.1 2.5.0 diff --git a/samples/client/petstore/java/vertx/build.gradle b/samples/client/petstore/java/vertx/build.gradle index 3c78bdb5ab..ed3335c276 100644 --- a/samples/client/petstore/java/vertx/build.gradle +++ b/samples/client/petstore/java/vertx/build.gradle @@ -28,8 +28,8 @@ task execute(type:JavaExec) { ext { swagger_annotations_version = "1.5.21" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" vertx_version = "3.4.2" junit_version = "4.13" } diff --git a/samples/client/petstore/java/vertx/pom.xml b/samples/client/petstore/java/vertx/pom.xml index 18dc402a47..ff5a099dcb 100644 --- a/samples/client/petstore/java/vertx/pom.xml +++ b/samples/client/petstore/java/vertx/pom.xml @@ -266,8 +266,8 @@ UTF-8 3.4.2 1.5.22 - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 4.13 diff --git a/samples/client/petstore/java/webclient/build.gradle b/samples/client/petstore/java/webclient/build.gradle index c10cf1b59c..a9d5823463 100644 --- a/samples/client/petstore/java/webclient/build.gradle +++ b/samples/client/petstore/java/webclient/build.gradle @@ -112,8 +112,8 @@ if(hasProperty('target') && target == 'android') { ext { swagger_annotations_version = "1.5.22" - jackson_version = "2.9.10" - jackson_databind_version = "2.9.10.1" + jackson_version = "2.10.1" + jackson_databind_version = "2.10.1" jackson_databind_nullable_version = "0.2.1" jersey_version = "1.19.4" jodatime_version = "2.9.9" diff --git a/samples/client/petstore/java/webclient/pom.xml b/samples/client/petstore/java/webclient/pom.xml index 4a85bf0221..410cfae98f 100644 --- a/samples/client/petstore/java/webclient/pom.xml +++ b/samples/client/petstore/java/webclient/pom.xml @@ -122,8 +122,8 @@ UTF-8 1.5.22 5.0.8.RELEASE - 2.9.10 - 2.9.10.1 + 2.10.1 + 2.10.1 0.2.1 4.13 3.1.8.RELEASE From 8e1bb3ddffa83a3ddbff9e0389ad6bc437ec52fb Mon Sep 17 00:00:00 2001 From: LudoO Date: Fri, 3 Jan 2020 04:25:29 +0100 Subject: [PATCH 17/82] [dart-dio] Fix basepath (#4911) * Fix basepath * regenerate sample petstore --- .../main/resources/dart-dio/apilib.mustache | 2 +- samples/client/petstore/dart-dio/README.md | 52 +++--- .../petstore/dart-dio/lib/api/pet_api.dart | 149 +++++++++--------- .../petstore/dart-dio/lib/api/store_api.dart | 66 ++++---- .../petstore/dart-dio/lib/api/user_api.dart | 136 ++++++++-------- .../petstore/dart-dio/lib/api_util.dart | 10 ++ 6 files changed, 215 insertions(+), 200 deletions(-) create mode 100644 samples/client/petstore/dart-dio/lib/api_util.dart diff --git a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache index 11690b8c28..14d947b104 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache @@ -11,7 +11,7 @@ class {{clientName}} { Dio dio; Serializers serializers; - String basePath = "http://petstore.swagger.io/v2"; + String basePath = "{{{basePath}}}"; {{clientName}}({this.dio, Serializers serializers}) { if (dio == null) { diff --git a/samples/client/petstore/dart-dio/README.md b/samples/client/petstore/dart-dio/README.md index ceda34066b..c9c0f49b85 100644 --- a/samples/client/petstore/dart-dio/README.md +++ b/samples/client/petstore/dart-dio/README.md @@ -57,36 +57,36 @@ All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*PetApi* | [**addPet**](doc//PetApi.md#addpet) | **post** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](doc//PetApi.md#deletepet) | **delete** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](doc//PetApi.md#findpetsbystatus) | **get** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](doc//PetApi.md#findpetsbytags) | **get** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](doc//PetApi.md#getpetbyid) | **get** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](doc//PetApi.md#updatepet) | **put** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](doc//PetApi.md#updatepetwithform) | **post** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](doc//PetApi.md#uploadfile) | **post** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](doc//StoreApi.md#deleteorder) | **delete** /store/order/{orderId} | Delete purchase order by ID -*StoreApi* | [**getInventory**](doc//StoreApi.md#getinventory) | **get** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](doc//StoreApi.md#getorderbyid) | **get** /store/order/{orderId} | Find purchase order by ID -*StoreApi* | [**placeOrder**](doc//StoreApi.md#placeorder) | **post** /store/order | Place an order for a pet -*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **post** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](doc//UserApi.md#createuserswitharrayinput) | **post** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](doc//UserApi.md#createuserswithlistinput) | **post** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **delete** /user/{username} | Delete user -*UserApi* | [**getUserByName**](doc//UserApi.md#getuserbyname) | **get** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](doc//UserApi.md#loginuser) | **get** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](doc//UserApi.md#logoutuser) | **get** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **put** /user/{username} | Updated user +*PetApi* | [**addPet**](doc\/PetApi.md#addpet) | **post** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](doc\/PetApi.md#deletepet) | **delete** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](doc\/PetApi.md#findpetsbystatus) | **get** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](doc\/PetApi.md#findpetsbytags) | **get** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](doc\/PetApi.md#getpetbyid) | **get** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](doc\/PetApi.md#updatepet) | **put** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](doc\/PetApi.md#updatepetwithform) | **post** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](doc\/PetApi.md#uploadfile) | **post** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](doc\/StoreApi.md#deleteorder) | **delete** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](doc\/StoreApi.md#getinventory) | **get** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](doc\/StoreApi.md#getorderbyid) | **get** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](doc\/StoreApi.md#placeorder) | **post** /store/order | Place an order for a pet +*UserApi* | [**createUser**](doc\/UserApi.md#createuser) | **post** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](doc\/UserApi.md#createuserswitharrayinput) | **post** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](doc\/UserApi.md#createuserswithlistinput) | **post** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](doc\/UserApi.md#deleteuser) | **delete** /user/{username} | Delete user +*UserApi* | [**getUserByName**](doc\/UserApi.md#getuserbyname) | **get** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](doc\/UserApi.md#loginuser) | **get** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](doc\/UserApi.md#logoutuser) | **get** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](doc\/UserApi.md#updateuser) | **put** /user/{username} | Updated user ## Documentation For Models - - [ApiResponse](doc//ApiResponse.md) - - [Category](doc//Category.md) - - [Order](doc//Order.md) - - [Pet](doc//Pet.md) - - [Tag](doc//Tag.md) - - [User](doc//User.md) + - [ApiResponse](doc\/ApiResponse.md) + - [Category](doc\/Category.md) + - [Order](doc\/Order.md) + - [Pet](doc\/Pet.md) + - [Tag](doc\/Tag.md) + - [User](doc\/User.md) ## Documentation For Authorization diff --git a/samples/client/petstore/dart-dio/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/lib/api/pet_api.dart index 4b182c95f3..2458f5ffe9 100644 --- a/samples/client/petstore/dart-dio/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/pet_api.dart @@ -8,6 +8,7 @@ import 'package:built_value/serializer.dart'; import 'package:openapi/model/pet.dart'; import 'package:openapi/model/api_response.dart'; import 'dart:typed_data'; +import 'package:openapi/api_util.dart'; class PetApi { final Dio _dio; @@ -22,26 +23,24 @@ class PetApi { String path = "/pet"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = ["application/json","application/xml"]; - List contentTypes = [ - "application/json", - "application/xml"]; var serializedBody = _serializers.serialize(body); var jsonbody = json.encode(serializedBody); + bodyData = jsonbody; return _dio.request( path, queryParameters: queryParams, - data: jsonbody, + data: bodyData, options: Options( method: 'post'.toUpperCase(), headers: headerParams, @@ -57,22 +56,22 @@ class PetApi { String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; headerParams["api_key"] = apiKey; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'delete'.toUpperCase(), headers: headerParams, @@ -88,22 +87,22 @@ class PetApi { String path = "/pet/findByStatus"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; queryParams["status"] = status; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'get'.toUpperCase(), headers: headerParams, @@ -134,22 +133,22 @@ class PetApi { String path = "/pet/findByTags"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; queryParams["tags"] = tags; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'get'.toUpperCase(), headers: headerParams, @@ -180,21 +179,21 @@ class PetApi { String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'get'.toUpperCase(), headers: headerParams, @@ -224,26 +223,24 @@ class PetApi { String path = "/pet"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = ["application/json","application/xml"]; - List contentTypes = [ - "application/json", - "application/xml"]; var serializedBody = _serializers.serialize(body); var jsonbody = json.encode(serializedBody); + bodyData = jsonbody; return _dio.request( path, queryParameters: queryParams, - data: jsonbody, + data: bodyData, options: Options( method: 'put'.toUpperCase(), headers: headerParams, @@ -259,22 +256,23 @@ class PetApi { String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); - List contentTypes = [ - "application/x-www-form-urlencoded"]; + List contentTypes = ["application/x-www-form-urlencoded"]; + + Map formData = {}; + bodyData = FormData.fromMap(formData); return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'post'.toUpperCase(), headers: headerParams, @@ -290,22 +288,29 @@ class PetApi { String path = "/pet/{petId}/uploadImage".replaceAll("{" + "petId" + "}", petId.toString()); - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); - List contentTypes = [ - "multipart/form-data"]; + List contentTypes = ["multipart/form-data"]; + + Map formData = {}; + if (additionalMetadata != null) { + formData['additionalMetadata'] = parameterToString(additionalMetadata); + } + if (file != null) { + formData['file'] = MultipartFile.fromBytes(file, filename: "file"); + } + bodyData = FormData.fromMap(formData); return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'post'.toUpperCase(), headers: headerParams, diff --git a/samples/client/petstore/dart-dio/lib/api/store_api.dart b/samples/client/petstore/dart-dio/lib/api/store_api.dart index 315aaa5a1c..8be8835b6b 100644 --- a/samples/client/petstore/dart-dio/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/store_api.dart @@ -20,21 +20,21 @@ class StoreApi { String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'delete'.toUpperCase(), headers: headerParams, @@ -50,21 +50,21 @@ class StoreApi { String path = "/store/inventory"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'get'.toUpperCase(), headers: headerParams, @@ -94,21 +94,21 @@ class StoreApi { String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'get'.toUpperCase(), headers: headerParams, @@ -138,24 +138,24 @@ class StoreApi { String path = "/store/order"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; var serializedBody = _serializers.serialize(body); var jsonbody = json.encode(serializedBody); + bodyData = jsonbody; return _dio.request( path, queryParameters: queryParams, - data: jsonbody, + data: bodyData, options: Options( method: 'post'.toUpperCase(), headers: headerParams, diff --git a/samples/client/petstore/dart-dio/lib/api/user_api.dart b/samples/client/petstore/dart-dio/lib/api/user_api.dart index 521be87293..bb2c84d2e8 100644 --- a/samples/client/petstore/dart-dio/lib/api/user_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/user_api.dart @@ -20,24 +20,24 @@ class UserApi { String path = "/user"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; var serializedBody = _serializers.serialize(body); var jsonbody = json.encode(serializedBody); + bodyData = jsonbody; return _dio.request( path, queryParameters: queryParams, - data: jsonbody, + data: bodyData, options: Options( method: 'post'.toUpperCase(), headers: headerParams, @@ -53,25 +53,25 @@ class UserApi { String path = "/user/createWithArray"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; final type = const FullType(BuiltList, const [const FullType(User)]); var serializedBody = _serializers.serialize(BuiltList.from(body), specifiedType: type); var jsonbody = json.encode(serializedBody); + bodyData = jsonbody; return _dio.request( path, queryParameters: queryParams, - data: jsonbody, + data: bodyData, options: Options( method: 'post'.toUpperCase(), headers: headerParams, @@ -87,25 +87,25 @@ class UserApi { String path = "/user/createWithList"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; final type = const FullType(BuiltList, const [const FullType(User)]); var serializedBody = _serializers.serialize(BuiltList.from(body), specifiedType: type); var jsonbody = json.encode(serializedBody); + bodyData = jsonbody; return _dio.request( path, queryParameters: queryParams, - data: jsonbody, + data: bodyData, options: Options( method: 'post'.toUpperCase(), headers: headerParams, @@ -121,21 +121,21 @@ class UserApi { String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'delete'.toUpperCase(), headers: headerParams, @@ -151,21 +151,21 @@ class UserApi { String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'get'.toUpperCase(), headers: headerParams, @@ -195,23 +195,23 @@ class UserApi { String path = "/user/login"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; queryParams["username"] = username; queryParams["password"] = password; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'get'.toUpperCase(), headers: headerParams, @@ -241,21 +241,21 @@ class UserApi { String path = "/user/logout"; - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; return _dio.request( path, queryParameters: queryParams, + data: bodyData, options: Options( method: 'get'.toUpperCase(), headers: headerParams, @@ -271,24 +271,24 @@ class UserApi { String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); - // query params - Map queryParams = {}; - Map headerParams = Map.from(headers ?? {}); - Map formParams = {}; + Map queryParams = {}; + Map headerParams = Map.from(headers ?? {}); + dynamic bodyData; - queryParams.removeWhere((key, value) => value == null); - headerParams.removeWhere((key, value) => value == null); - formParams.removeWhere((key, value) => value == null); + queryParams.removeWhere((key, value) => value == null); + headerParams.removeWhere((key, value) => value == null); + + List contentTypes = []; - List contentTypes = []; var serializedBody = _serializers.serialize(body); var jsonbody = json.encode(serializedBody); + bodyData = jsonbody; return _dio.request( path, queryParameters: queryParams, - data: jsonbody, + data: bodyData, options: Options( method: 'put'.toUpperCase(), headers: headerParams, diff --git a/samples/client/petstore/dart-dio/lib/api_util.dart b/samples/client/petstore/dart-dio/lib/api_util.dart new file mode 100644 index 0000000000..3a05d24f7b --- /dev/null +++ b/samples/client/petstore/dart-dio/lib/api_util.dart @@ -0,0 +1,10 @@ +/// Format the given parameter object into string. +String parameterToString(dynamic value) { + if (value == null) { + return ''; + } else if (value is DateTime) { + return value.toUtc().toIso8601String(); + } else { + return value.toString(); + } +} \ No newline at end of file From 41f3cba85f879f12283488c88f0c4332b03b68d9 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 3 Jan 2020 13:37:39 +0800 Subject: [PATCH 18/82] avoid using hardcode prefix in example (#4917) --- .../main/resources/powershell/Build.ps1.mustache | 14 ++++++++++++-- .../petstore/powershell/.openapi-generator/VERSION | 2 +- samples/client/petstore/powershell/Build.ps1 | 6 ++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/powershell/Build.ps1.mustache b/modules/openapi-generator/src/main/resources/powershell/Build.ps1.mustache index 507af055ae..f7da412a28 100644 --- a/modules/openapi-generator/src/main/resources/powershell/Build.ps1.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/Build.ps1.mustache @@ -78,9 +78,19 @@ $Manifest = @{ # Kirk Munro recommends against it: # https://www.sapien.com/blog/2016/02/15/use-prefixes-to-prevent-command-name-collision/#comment-20820 # - # If not, we'd need to generate functions name with prefix. + # If not, we'd need to generate functions name with prefix. For examples, # - # DefaultCommandPrefix = 'PetStore' +{{#apiInfo}} +{{#apis}} +{{#operations}} +{{#operation}} +{{#-first}} + # DefaultCommandPrefix = '{{{classname}}}' +{{/-first}} +{{/operation}} +{{/operations}} +{{/apis}} +{{/apiInfo}} } New-ModuleManifest @Manifest diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION index c3a2c7076f..58592f031f 100644 --- a/samples/client/petstore/powershell/.openapi-generator/VERSION +++ b/samples/client/petstore/powershell/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/powershell/Build.ps1 b/samples/client/petstore/powershell/Build.ps1 index 8be0b79099..3587b9d4b6 100644 --- a/samples/client/petstore/powershell/Build.ps1 +++ b/samples/client/petstore/powershell/Build.ps1 @@ -78,9 +78,11 @@ $Manifest = @{ # Kirk Munro recommends against it: # https://www.sapien.com/blog/2016/02/15/use-prefixes-to-prevent-command-name-collision/#comment-20820 # - # If not, we'd need to generate functions name with prefix. + # If not, we'd need to generate functions name with prefix. For examples, # - # DefaultCommandPrefix = 'PetStore' + # DefaultCommandPrefix = 'PetApi' + # DefaultCommandPrefix = 'StoreApi' + # DefaultCommandPrefix = 'UserApi' } New-ModuleManifest @Manifest From 60b1855ec1b0007925f1ebd9518a4a094724ac73 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 3 Jan 2020 14:39:56 +0800 Subject: [PATCH 19/82] Add an link to Ada article (#4920) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 91ecd71857..0ae1c63d75 100644 --- a/README.md +++ b/README.md @@ -714,7 +714,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-11-24 - [Accelerate Flutter development with OpenAPI and Dart code generation](https://medium.com/@irinasouthwell_220/accelerate-flutter-development-with-openapi-and-dart-code-generation-1f16f8329a6a) by [Irina Southwell](https://medium.com/@irinasouthwell_220) - 2019-11-25 - [openapi-generatorで手軽にスタブサーバとクライアントの生成](https://qiita.com/pochopocho13/items/8db662e1934fb2b408b8) by [@pochopocho13](https://twitter.com/pochopocho13) - 2019-11-26 - [CordaCon 2019 Highlights: Braid Server and OpenAPI Generator for Corda Client API’s](https://blog.b9lab.com/cordacon-2019-highlights-braid-server-and-openapi-generator-for-corda-flows-api-s-d24179ccb27c) by [Adel Rustum](https://blog.b9lab.com/@adelrestom) at [B9lab](https://blog.b9lab.com/) -- 2020-12-04 - [Angular+NestJS+OpenAPI(Swagger)でマイクロサービスを視野に入れた環境を考える](https://qiita.com/teracy55/items/0327c7a170ec772970c6) by [てらしー](https://twitter.com/teracy55) +- 2019-12-04 - [Angular+NestJS+OpenAPI(Swagger)でマイクロサービスを視野に入れた環境を考える](https://qiita.com/teracy55/items/0327c7a170ec772970c6) by [てらしー](https://twitter.com/teracy55) +- 2019-12-23 - [Use Ada for Your Web Development](https://www.electronicdesign.com/technologies/embedded-revolution/article/21119177/use-ada-for-your-web-development) by [Stephane Carrez](https://github.com/stcarrez) ## [6 - About Us](#table-of-contents) From 759ab1390a52f3e0c81cb51edd81c23da0044c8f Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 3 Jan 2020 14:59:30 +0800 Subject: [PATCH 20/82] remove base_object_spec.mustache from ruby client (#4918) --- .../codegen/languages/RubyClientCodegen.java | 2 - .../ruby-client/base_object_spec.mustache | 109 ------------------ 2 files changed, 111 deletions(-) delete mode 100644 modules/openapi-generator/src/main/resources/ruby-client/base_object_spec.mustache diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index b043f14f40..ad1e947978 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -244,8 +244,6 @@ public class RubyClientCodegen extends AbstractRubyCodegen { writeOptional(outputFolder, new SupportingFile("spec_helper.mustache", specFolder, "spec_helper.rb")); writeOptional(outputFolder, new SupportingFile("configuration_spec.mustache", specFolder, "configuration_spec.rb")); writeOptional(outputFolder, new SupportingFile("api_client_spec.mustache", specFolder, "api_client_spec.rb")); - // not including base object test as the moment as not all API has model - //writeOptional(outputFolder, new SupportingFile("base_object_spec.mustache", specFolder, "base_object_spec.rb")); } @Override diff --git a/modules/openapi-generator/src/main/resources/ruby-client/base_object_spec.mustache b/modules/openapi-generator/src/main/resources/ruby-client/base_object_spec.mustache deleted file mode 100644 index 56425d6546..0000000000 --- a/modules/openapi-generator/src/main/resources/ruby-client/base_object_spec.mustache +++ /dev/null @@ -1,109 +0,0 @@ -require 'spec_helper' - -class ArrayMapObject < Petstore::Category - attr_accessor :int_arr, :pet_arr, :int_map, :pet_map, :int_arr_map, :pet_arr_map, :boolean_true_arr, :boolean_false_arr - - def self.attribute_map - { - :int_arr => :int_arr, - :pet_arr => :pet_arr, - :int_map => :int_map, - :pet_map => :pet_map, - :int_arr_map => :int_arr_map, - :pet_arr_map => :pet_arr_map, - :boolean_true_arr => :boolean_true_arr, - :boolean_false_arr => :boolean_false_arr, - } - end - - def self.openapi_types - { - :int_arr => :'Array', - :pet_arr => :'Array', - :int_map => :'Hash', - :pet_map => :'Hash', - :int_arr_map => :'Hash>', - :pet_arr_map => :'Hash>', - :boolean_true_arr => :'Array', - :boolean_false_arr => :'Array', - } - end -end - -describe 'BaseObject' do - describe 'boolean values' do - let(:obj) { Petstore::Cat.new({declawed: false}) } - - it 'should have values set' do - expect(obj.declawed).not_to be_nil - expect(obj.declawed).to eq(false) - end - end - - describe 'array and map properties' do - let(:obj) { ArrayMapObject.new } - - let(:data) do - {int_arr: [123, 456], - pet_arr: [{name: 'Kitty'}], - int_map: {'int' => 123}, - pet_map: {'pet' => {name: 'Kitty'}}, - int_arr_map: {'int_arr' => [123, 456]}, - pet_arr_map: {'pet_arr' => [{name: 'Kitty'}]}, - boolean_true_arr: [true, "true", "TruE", 1, "y", "yes", "1", "t", "T"], - boolean_false_arr: [false, "", 0, "0", "f", nil, "null"], - } - end - - it 'works for #build_from_hash' do - obj.build_from_hash(data) - - expect(obj.int_arr).to match_array([123, 456]) - - expect(obj.pet_arr).to be_instance_of(Array) - expect(obj.pet_arr).to be_instance_of(1) - - pet = obj.pet_arr.first - expect(pet).to be_instance_of(Petstore::Pet) - expect(pet.name).to eq('Kitty') - - expect(obj.int_map).to be_instance_of(Hash) - expect(obj.int_map).to eq({'int' => 123}) - - expect(obj.pet_map).to be_instance_of(Hash) - pet = obj.pet_map['pet'] - expect(pet).to be_instance_of(Petstore::Pet) - expect(pet.name).to eq('Kitty') - - expect(obj.int_arr_map).to be_instance_of(Hash) - arr = obj.int_arr_map['int_arr'] - expect(arr).to match_array([123, 456]) - - expect(obj.pet_arr_map).to be_instance_of(Hash) - arr = obj.pet_arr_map['pet_arr'] - expect(arr).to be_instance_of(Array) - expect(arr.size).to eq(1) - pet = arr.first - expect(pet).to be_instance_of(Petstore::Pet) - expect(pet.name).to eq('Kitty') - - expect(obj.boolean_true_arr).to be_instance_of(Array) - obj.boolean_true_arr.each do |b| - expect(b).to eq(true) - end - - expect(obj.boolean_false_arr).to be_instance_of(Array) - obj.boolean_false_arr.each do |b| - expect(b).to eq(false) - end - end - - it 'works for #to_hash' do - obj.build_from_hash(data) - expect_data = data.dup - expect_data[:boolean_true_arr].map! {true} - expect_data[:boolean_false_arr].map! {false} - expect(obj.to_hash).to eq(expect_data) - end - end -end From 7073859aa8f49f9bbac0607d57400fc8bd4fb24c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 3 Jan 2020 22:54:52 +0800 Subject: [PATCH 21/82] replace petstore_api with packageName (#4921) --- .../src/main/resources/python/setup_cfg.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/python/setup_cfg.mustache b/modules/openapi-generator/src/main/resources/python/setup_cfg.mustache index d89aa72ee4..931f02c5d1 100644 --- a/modules/openapi-generator/src/main/resources/python/setup_cfg.mustache +++ b/modules/openapi-generator/src/main/resources/python/setup_cfg.mustache @@ -5,7 +5,7 @@ verbosity=2 randomize=true exe=true with-coverage=true -cover-package=petstore_api +cover-package={{{packageName}}} cover-erase=true {{/useNose}} From 6dc3216f6d8c8566931552a59198c3e13cfaa291 Mon Sep 17 00:00:00 2001 From: Andrii Date: Sun, 5 Jan 2020 15:41:51 +0200 Subject: [PATCH 22/82] Added ability to work with `defaultHeaders` and fixed authentication for code generated by openapi-generator for typescript-node (#4896) * Added ability to work with `defaultHeaders` and fixed authentication for code generated by openapi-generator for typescript-node: - added getter/setter for `defaultHeaders` property - fixed authentication for clients that support several auth methods (use auth method only if auth credentials are set) * Update petstore templates --- .../typescript-node/api-single.mustache | 34 ++++++++-- .../typescript-node/default/api/petApi.ts | 66 ++++++++++++------- .../typescript-node/default/api/storeApi.ts | 23 +++++-- .../typescript-node/default/api/userApi.ts | 26 +++++--- .../typescript-node/npm/api/petApi.ts | 66 ++++++++++++------- .../typescript-node/npm/api/storeApi.ts | 23 +++++-- .../typescript-node/npm/api/userApi.ts | 26 +++++--- 7 files changed, 178 insertions(+), 86 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache b/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache index 922a654f44..d54c5bd341 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache @@ -36,7 +36,7 @@ export enum {{classname}}ApiKeys { export class {{classname}} { protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; + protected _defaultHeaders : any = {}; protected _useQuerystring : boolean = false; protected authentications = { @@ -93,6 +93,14 @@ export class {{classname}} { this._basePath = basePath; } + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { return this._basePath; } @@ -149,7 +157,7 @@ export class {{classname}} { const localVarPath = this.basePath + '{{{path}}}'{{#pathParams}} .replace('{' + '{{baseName}}' + '}', encodeURIComponent(String({{paramName}}))){{/pathParams}}; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); {{#hasProduces}} const produces = [{{#produces}}'{{{mediaType}}}'{{#hasMore}}, {{/hasMore}}{{/produces}}]; // give precedence to 'application/json' @@ -216,8 +224,26 @@ export class {{classname}} { let authenticationPromise = Promise.resolve(); {{#authMethods}} - authenticationPromise = authenticationPromise.then(() => this.authentications.{{name}}.applyToRequest(localVarRequestOptions)); - + {{#isApiKey}} + if (this.authentications.{{name}}.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.{{name}}.applyToRequest(localVarRequestOptions)); + } + {{/isApiKey}} + {{#isBasicBasic}} + if (this.authentications.{{name}}.username && this.authentications.{{name}}.password) { + authenticationPromise = authenticationPromise.then(() => this.authentications.{{name}}.applyToRequest(localVarRequestOptions)); + } + {{/isBasicBasic}} + {{#isBasicBearer}} + if (this.authentications.{{name}}.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.{{name}}.applyToRequest(localVarRequestOptions)); + } + {{/isBasicBearer}} + {{#isOAuth}} + if (this.authentications.{{name}}.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.{{name}}.applyToRequest(localVarRequestOptions)); + } + {{/isOAuth}} {{/authMethods}} authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); diff --git a/samples/client/petstore/typescript-node/default/api/petApi.ts b/samples/client/petstore/typescript-node/default/api/petApi.ts index c6794b6145..610dafca44 100644 --- a/samples/client/petstore/typescript-node/default/api/petApi.ts +++ b/samples/client/petstore/typescript-node/default/api/petApi.ts @@ -34,7 +34,7 @@ export enum PetApiApiKeys { export class PetApi { protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; + protected _defaultHeaders : any = {}; protected _useQuerystring : boolean = false; protected authentications = { @@ -66,6 +66,14 @@ export class PetApi { this._basePath = basePath; } + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { return this._basePath; } @@ -94,7 +102,7 @@ export class PetApi { public async addPet (body: Pet, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/pet'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'body' is not null or undefined @@ -117,8 +125,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -159,7 +168,7 @@ export class PetApi { const localVarPath = this.basePath + '/pet/{petId}' .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'petId' is not null or undefined @@ -182,8 +191,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -222,7 +232,7 @@ export class PetApi { public async findPetsByStatus (status: Array<'available' | 'pending' | 'sold'>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { const localVarPath = this.basePath + '/pet/findByStatus'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -255,8 +265,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -296,7 +307,7 @@ export class PetApi { public async findPetsByTags (tags: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { const localVarPath = this.basePath + '/pet/findByTags'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -329,8 +340,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -371,7 +383,7 @@ export class PetApi { const localVarPath = this.basePath + '/pet/{petId}' .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -400,8 +412,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions)); - + if (this.authentications.api_key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -441,7 +454,7 @@ export class PetApi { public async updatePet (body: Pet, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/pet'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'body' is not null or undefined @@ -464,8 +477,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -507,7 +521,7 @@ export class PetApi { const localVarPath = this.basePath + '/pet/{petId}' .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'petId' is not null or undefined @@ -537,8 +551,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -580,7 +595,7 @@ export class PetApi { const localVarPath = this.basePath + '/pet/{petId}/uploadImage' .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -618,8 +633,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; diff --git a/samples/client/petstore/typescript-node/default/api/storeApi.ts b/samples/client/petstore/typescript-node/default/api/storeApi.ts index 501a3195ab..42ca3f345a 100644 --- a/samples/client/petstore/typescript-node/default/api/storeApi.ts +++ b/samples/client/petstore/typescript-node/default/api/storeApi.ts @@ -33,7 +33,7 @@ export enum StoreApiApiKeys { export class StoreApi { protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; + protected _defaultHeaders : any = {}; protected _useQuerystring : boolean = false; protected authentications = { @@ -64,6 +64,14 @@ export class StoreApi { this._basePath = basePath; } + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { return this._basePath; } @@ -89,7 +97,7 @@ export class StoreApi { const localVarPath = this.basePath + '/store/order/{orderId}' .replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'orderId' is not null or undefined @@ -148,7 +156,7 @@ export class StoreApi { public async getInventory (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: { [key: string]: number; }; }> { const localVarPath = this.basePath + '/store/inventory'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -172,8 +180,9 @@ export class StoreApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions)); - + if (this.authentications.api_key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -214,7 +223,7 @@ export class StoreApi { const localVarPath = this.basePath + '/store/order/{orderId}' .replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -282,7 +291,7 @@ export class StoreApi { public async placeOrder (body: Order, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Order; }> { const localVarPath = this.basePath + '/store/order'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { diff --git a/samples/client/petstore/typescript-node/default/api/userApi.ts b/samples/client/petstore/typescript-node/default/api/userApi.ts index 75c6854780..d22eedd21f 100644 --- a/samples/client/petstore/typescript-node/default/api/userApi.ts +++ b/samples/client/petstore/typescript-node/default/api/userApi.ts @@ -31,7 +31,7 @@ export enum UserApiApiKeys { export class UserApi { protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; + protected _defaultHeaders : any = {}; protected _useQuerystring : boolean = false; protected authentications = { @@ -61,6 +61,14 @@ export class UserApi { this._basePath = basePath; } + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { return this._basePath; } @@ -85,7 +93,7 @@ export class UserApi { public async createUser (body: User, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/user'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'body' is not null or undefined @@ -146,7 +154,7 @@ export class UserApi { public async createUsersWithArrayInput (body: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/user/createWithArray'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'body' is not null or undefined @@ -207,7 +215,7 @@ export class UserApi { public async createUsersWithListInput (body: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/user/createWithList'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'body' is not null or undefined @@ -269,7 +277,7 @@ export class UserApi { const localVarPath = this.basePath + '/user/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'username' is not null or undefined @@ -330,7 +338,7 @@ export class UserApi { const localVarPath = this.basePath + '/user/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -399,7 +407,7 @@ export class UserApi { public async loginUser (username: string, password: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: string; }> { const localVarPath = this.basePath + '/user/login'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -479,7 +487,7 @@ export class UserApi { public async logoutUser (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/user/logout'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; (Object).assign(localVarHeaderParams, options.headers); @@ -536,7 +544,7 @@ export class UserApi { const localVarPath = this.basePath + '/user/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'username' is not null or undefined diff --git a/samples/client/petstore/typescript-node/npm/api/petApi.ts b/samples/client/petstore/typescript-node/npm/api/petApi.ts index c6794b6145..610dafca44 100644 --- a/samples/client/petstore/typescript-node/npm/api/petApi.ts +++ b/samples/client/petstore/typescript-node/npm/api/petApi.ts @@ -34,7 +34,7 @@ export enum PetApiApiKeys { export class PetApi { protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; + protected _defaultHeaders : any = {}; protected _useQuerystring : boolean = false; protected authentications = { @@ -66,6 +66,14 @@ export class PetApi { this._basePath = basePath; } + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { return this._basePath; } @@ -94,7 +102,7 @@ export class PetApi { public async addPet (body: Pet, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/pet'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'body' is not null or undefined @@ -117,8 +125,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -159,7 +168,7 @@ export class PetApi { const localVarPath = this.basePath + '/pet/{petId}' .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'petId' is not null or undefined @@ -182,8 +191,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -222,7 +232,7 @@ export class PetApi { public async findPetsByStatus (status: Array<'available' | 'pending' | 'sold'>, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { const localVarPath = this.basePath + '/pet/findByStatus'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -255,8 +265,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -296,7 +307,7 @@ export class PetApi { public async findPetsByTags (tags: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Array; }> { const localVarPath = this.basePath + '/pet/findByTags'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -329,8 +340,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -371,7 +383,7 @@ export class PetApi { const localVarPath = this.basePath + '/pet/{petId}' .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -400,8 +412,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions)); - + if (this.authentications.api_key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -441,7 +454,7 @@ export class PetApi { public async updatePet (body: Pet, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/pet'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'body' is not null or undefined @@ -464,8 +477,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -507,7 +521,7 @@ export class PetApi { const localVarPath = this.basePath + '/pet/{petId}' .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'petId' is not null or undefined @@ -537,8 +551,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -580,7 +595,7 @@ export class PetApi { const localVarPath = this.basePath + '/pet/{petId}/uploadImage' .replace('{' + 'petId' + '}', encodeURIComponent(String(petId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -618,8 +633,9 @@ export class PetApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); - + if (this.authentications.petstore_auth.accessToken) { + authenticationPromise = authenticationPromise.then(() => this.authentications.petstore_auth.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; diff --git a/samples/client/petstore/typescript-node/npm/api/storeApi.ts b/samples/client/petstore/typescript-node/npm/api/storeApi.ts index 501a3195ab..42ca3f345a 100644 --- a/samples/client/petstore/typescript-node/npm/api/storeApi.ts +++ b/samples/client/petstore/typescript-node/npm/api/storeApi.ts @@ -33,7 +33,7 @@ export enum StoreApiApiKeys { export class StoreApi { protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; + protected _defaultHeaders : any = {}; protected _useQuerystring : boolean = false; protected authentications = { @@ -64,6 +64,14 @@ export class StoreApi { this._basePath = basePath; } + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { return this._basePath; } @@ -89,7 +97,7 @@ export class StoreApi { const localVarPath = this.basePath + '/store/order/{orderId}' .replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'orderId' is not null or undefined @@ -148,7 +156,7 @@ export class StoreApi { public async getInventory (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: { [key: string]: number; }; }> { const localVarPath = this.basePath + '/store/inventory'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -172,8 +180,9 @@ export class StoreApi { }; let authenticationPromise = Promise.resolve(); - authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions)); - + if (this.authentications.api_key.apiKey) { + authenticationPromise = authenticationPromise.then(() => this.authentications.api_key.applyToRequest(localVarRequestOptions)); + } authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions)); let interceptorPromise = authenticationPromise; @@ -214,7 +223,7 @@ export class StoreApi { const localVarPath = this.basePath + '/store/order/{orderId}' .replace('{' + 'orderId' + '}', encodeURIComponent(String(orderId))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -282,7 +291,7 @@ export class StoreApi { public async placeOrder (body: Order, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: Order; }> { const localVarPath = this.basePath + '/store/order'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { diff --git a/samples/client/petstore/typescript-node/npm/api/userApi.ts b/samples/client/petstore/typescript-node/npm/api/userApi.ts index 75c6854780..d22eedd21f 100644 --- a/samples/client/petstore/typescript-node/npm/api/userApi.ts +++ b/samples/client/petstore/typescript-node/npm/api/userApi.ts @@ -31,7 +31,7 @@ export enum UserApiApiKeys { export class UserApi { protected _basePath = defaultBasePath; - protected defaultHeaders : any = {}; + protected _defaultHeaders : any = {}; protected _useQuerystring : boolean = false; protected authentications = { @@ -61,6 +61,14 @@ export class UserApi { this._basePath = basePath; } + set defaultHeaders(defaultHeaders: any) { + this._defaultHeaders = defaultHeaders; + } + + get defaultHeaders() { + return this._defaultHeaders; + } + get basePath() { return this._basePath; } @@ -85,7 +93,7 @@ export class UserApi { public async createUser (body: User, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/user'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'body' is not null or undefined @@ -146,7 +154,7 @@ export class UserApi { public async createUsersWithArrayInput (body: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/user/createWithArray'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'body' is not null or undefined @@ -207,7 +215,7 @@ export class UserApi { public async createUsersWithListInput (body: Array, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/user/createWithList'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'body' is not null or undefined @@ -269,7 +277,7 @@ export class UserApi { const localVarPath = this.basePath + '/user/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'username' is not null or undefined @@ -330,7 +338,7 @@ export class UserApi { const localVarPath = this.basePath + '/user/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -399,7 +407,7 @@ export class UserApi { public async loginUser (username: string, password: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body: string; }> { const localVarPath = this.basePath + '/user/login'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); const produces = ['application/xml', 'application/json']; // give precedence to 'application/json' if (produces.indexOf('application/json') >= 0) { @@ -479,7 +487,7 @@ export class UserApi { public async logoutUser (options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.ClientResponse; body?: any; }> { const localVarPath = this.basePath + '/user/logout'; let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; (Object).assign(localVarHeaderParams, options.headers); @@ -536,7 +544,7 @@ export class UserApi { const localVarPath = this.basePath + '/user/{username}' .replace('{' + 'username' + '}', encodeURIComponent(String(username))); let localVarQueryParameters: any = {}; - let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders); + let localVarHeaderParams: any = (Object).assign({}, this._defaultHeaders); let localVarFormParams: any = {}; // verify required parameter 'username' is not null or undefined From 965efdd9650220abd6e7a819d562e51022cd522c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 5 Jan 2020 21:53:22 +0800 Subject: [PATCH 23/82] remove nodejs server samples, scripts (#4919) --- bin/nodejs-petstore-google-cloud-functions.sh | 32 - bin/nodejs-petstore-server.sh | 32 - .../nodejs-petstore-google-cloud-functions.sh | 32 - bin/openapi3/nodejs-petstore-server.sh | 32 - .../nodejs-express-server/package.mustache | 6 +- .../.openapi-generator-ignore | 23 - .../.openapi-generator/VERSION | 1 - .../nodejs-google-cloud-functions/README.md | 11 - .../api/openapi.yaml | 837 ------------------ .../api/swagger.yaml | 775 ---------------- .../controllers/Pet.js | 98 -- .../controllers/PetService.js | 166 ---- .../controllers/Store.js | 47 - .../controllers/StoreService.js | 82 -- .../controllers/User.js | 93 -- .../controllers/UserService.js | 114 --- .../nodejs-google-cloud-functions/index.js | 44 - .../package.json | 15 - .../service/PetService.js | 191 ---- .../service/StoreService.js | 87 -- .../service/UserService.js | 130 --- .../utils/writer.js | 43 - .../petstore/nodejs/.openapi-generator-ignore | 23 - .../nodejs/.openapi-generator/VERSION | 1 - samples/server/petstore/nodejs/README.md | 19 - .../server/petstore/nodejs/api/openapi.yaml | 837 ------------------ .../server/petstore/nodejs/controllers/Pet.js | 98 -- .../petstore/nodejs/controllers/Store.js | 47 - .../petstore/nodejs/controllers/User.js | 93 -- samples/server/petstore/nodejs/index.js | 44 - samples/server/petstore/nodejs/package.json | 20 - .../petstore/nodejs/service/PetService.js | 191 ---- .../petstore/nodejs/service/StoreService.js | 87 -- .../petstore/nodejs/service/UserService.js | 130 --- .../server/petstore/nodejs/utils/writer.js | 43 - 35 files changed, 3 insertions(+), 4521 deletions(-) delete mode 100755 bin/nodejs-petstore-google-cloud-functions.sh delete mode 100755 bin/nodejs-petstore-server.sh delete mode 100755 bin/openapi3/nodejs-petstore-google-cloud-functions.sh delete mode 100755 bin/openapi3/nodejs-petstore-server.sh delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator-ignore delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/README.md delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/api/swagger.yaml delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/controllers/PetService.js delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/controllers/Store.js delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/controllers/StoreService.js delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/controllers/User.js delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/controllers/UserService.js delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/index.js delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/package.json delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/service/StoreService.js delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/service/UserService.js delete mode 100644 samples/server/petstore/nodejs-google-cloud-functions/utils/writer.js delete mode 100644 samples/server/petstore/nodejs/.openapi-generator-ignore delete mode 100644 samples/server/petstore/nodejs/.openapi-generator/VERSION delete mode 100644 samples/server/petstore/nodejs/README.md delete mode 100644 samples/server/petstore/nodejs/api/openapi.yaml delete mode 100644 samples/server/petstore/nodejs/controllers/Pet.js delete mode 100644 samples/server/petstore/nodejs/controllers/Store.js delete mode 100644 samples/server/petstore/nodejs/controllers/User.js delete mode 100644 samples/server/petstore/nodejs/index.js delete mode 100644 samples/server/petstore/nodejs/package.json delete mode 100644 samples/server/petstore/nodejs/service/PetService.js delete mode 100644 samples/server/petstore/nodejs/service/StoreService.js delete mode 100644 samples/server/petstore/nodejs/service/UserService.js delete mode 100644 samples/server/petstore/nodejs/utils/writer.js diff --git a/bin/nodejs-petstore-google-cloud-functions.sh b/bin/nodejs-petstore-google-cloud-functions.sh deleted file mode 100755 index bfb02d960d..0000000000 --- a/bin/nodejs-petstore-google-cloud-functions.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/nodejs-petstore-server.sh b/bin/nodejs-petstore-server.sh deleted file mode 100755 index fbbed3e46f..0000000000 --- a/bin/nodejs-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh b/bin/openapi3/nodejs-petstore-google-cloud-functions.sh deleted file mode 100755 index 00ab32fb9a..0000000000 --- a/bin/openapi3/nodejs-petstore-google-cloud-functions.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated --additional-properties=googleCloudFunctions=true -o samples/server/petstore/nodejs-google-cloud-functions -Dservice $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/nodejs-petstore-server.sh b/bin/openapi3/nodejs-petstore-server.sh deleted file mode 100755 index a987aced35..0000000000 --- a/bin/openapi3/nodejs-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/nodejs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g nodejs-server-deprecated -o samples/server/petstore/nodejs -Dservice $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/modules/openapi-generator/src/main/resources/nodejs-express-server/package.mustache b/modules/openapi-generator/src/main/resources/nodejs-express-server/package.mustache index e4bdc09d99..e057d8e060 100644 --- a/modules/openapi-generator/src/main/resources/nodejs-express-server/package.mustache +++ b/modules/openapi-generator/src/main/resources/nodejs-express-server/package.mustache @@ -1,7 +1,7 @@ { - "name": "openapi-petstore", - "version": "1.0.0", - "description": "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", + "name": "{{projectName}}", + "version": "{{appVersion}}", + "description": "{{{appDescription}}}", "main": "index.js", "scripts": { "prestart": "npm install", diff --git a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator-ignore b/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION b/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION deleted file mode 100644 index d96260ba33..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nodejs-google-cloud-functions/README.md b/samples/server/petstore/nodejs-google-cloud-functions/README.md deleted file mode 100644 index 44270f0a19..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Swagger generated server - -## Overview -This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. - -### Deploying the function -To deploy this module into Google Cloud Functions, you will have to use Google Cloud SDK commandline tool. - -See [Google Cloud Functions quick start guide](https://cloud.google.com/functions/docs/quickstart) and [Deploying Cloud Functions](https://cloud.google.com/functions/docs/deploying/) for the details. - -This project leverages the mega-awesome [swagger-tools](https://github.com/apigee-127/swagger-tools) middleware which does most all the work. diff --git a/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml b/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml deleted file mode 100644 index f2908efade..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/api/openapi.yaml +++ /dev/null @@ -1,837 +0,0 @@ -openapi: 3.0.0 -info: - description: This is a sample server Petstore server. For this sample, you can use - the api key `special-key` to test the authorization filters. - license: - name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore - version: 1.0.0 -externalDocs: - description: Find out more about Swagger - url: http://swagger.io -servers: -- url: http://petstore.swagger.io/v2 -tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user -paths: - /pet: - post: - operationId: addPet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store - tags: - - pet - x-swagger-router-controller: Pet - put: - operationId: updatePet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 400: - description: Invalid ID supplied - 404: - description: Pet not found - 405: - description: Validation exception - security: - - petstore_auth: - - write:pets - - read:pets - summary: Update an existing pet - tags: - - pet - x-swagger-router-controller: Pet - /pet/findByStatus: - get: - description: Multiple status values can be provided with comma separated strings - operationId: findPetsByStatus - parameters: - - description: Status values that need to be considered for filter - explode: false - in: query - name: status - required: true - schema: - items: - default: available - enum: - - available - - pending - - sold - type: string - type: array - style: form - responses: - 200: - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - 400: - description: Invalid status value - security: - - petstore_auth: - - read:pets - summary: Finds Pets by status - tags: - - pet - x-swagger-router-controller: Pet - /pet/findByTags: - get: - deprecated: true - description: Multiple tags can be provided with comma separated strings. Use - tag1, tag2, tag3 for testing. - operationId: findPetsByTags - parameters: - - description: Tags to filter by - explode: false - in: query - name: tags - required: true - schema: - items: - type: string - type: array - style: form - - description: Maximum number of items to return - explode: true - in: query - name: maxCount - required: false - schema: - format: int32 - type: integer - style: form - responses: - 200: - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - 400: - description: Invalid tag value - security: - - petstore_auth: - - read:pets - summary: Finds Pets by tags - tags: - - pet - x-swagger-router-controller: Pet - /pet/{petId}: - delete: - operationId: deletePet - parameters: - - explode: false - in: header - name: api_key - required: false - schema: - type: string - style: simple - - description: Pet id to delete - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - 400: - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet - tags: - - pet - x-swagger-router-controller: Pet - get: - description: Returns a single pet - operationId: getPetById - parameters: - - description: ID of pet to return - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Pet' - application/json: - schema: - $ref: '#/components/schemas/Pet' - description: successful operation - 400: - description: Invalid ID supplied - 404: - description: Pet not found - security: - - api_key: [] - summary: Find pet by ID - tags: - - pet - x-swagger-router-controller: Pet - post: - operationId: updatePetWithForm - parameters: - - description: ID of pet that needs to be updated - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - $ref: '#/components/requestBodies/inline_object' - content: - application/x-www-form-urlencoded: - schema: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Updates a pet in the store with form data - tags: - - pet - x-swagger-router-controller: Pet - /pet/{petId}/uploadImage: - post: - operationId: uploadFile - parameters: - - description: ID of pet to update - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - $ref: '#/components/requestBodies/inline_object_1' - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image - tags: - - pet - x-swagger-router-controller: Pet - /store/inventory: - get: - description: Returns a map of status codes to quantities - operationId: getInventory - responses: - 200: - content: - application/json: - schema: - additionalProperties: - format: int32 - type: integer - type: object - description: successful operation - security: - - api_key: [] - summary: Returns pet inventories by status - tags: - - store - x-swagger-router-controller: Store - /store/order: - post: - operationId: placeOrder - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet - required: true - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - 400: - description: Invalid Order - summary: Place an order for a pet - tags: - - store - x-swagger-router-controller: Store - /store/order/{orderId}: - delete: - description: For valid response try integer IDs with value < 1000. Anything - above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - explode: false - in: path - name: orderId - required: true - schema: - type: string - style: simple - responses: - 400: - description: Invalid ID supplied - 404: - description: Order not found - summary: Delete purchase order by ID - tags: - - store - x-swagger-router-controller: Store - get: - description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions - operationId: getOrderById - parameters: - - description: ID of pet that needs to be fetched - explode: false - in: path - name: orderId - required: true - schema: - format: int64 - maximum: 5 - minimum: 1 - type: integer - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - 400: - description: Invalid ID supplied - 404: - description: Order not found - summary: Find purchase order by ID - tags: - - store - x-swagger-router-controller: Store - /user: - post: - description: This can only be done by the logged in user. - operationId: createUser - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: Created user object - required: true - responses: - default: - description: successful operation - security: - - auth_cookie: [] - summary: Create user - tags: - - user - x-swagger-router-controller: User - /user/createWithArray: - post: - operationId: createUsersWithArrayInput - requestBody: - $ref: '#/components/requestBodies/UserArray' - responses: - default: - description: successful operation - security: - - auth_cookie: [] - summary: Creates list of users with given input array - tags: - - user - x-swagger-router-controller: User - /user/createWithList: - post: - operationId: createUsersWithListInput - requestBody: - $ref: '#/components/requestBodies/UserArray' - responses: - default: - description: successful operation - security: - - auth_cookie: [] - summary: Creates list of users with given input array - tags: - - user - x-swagger-router-controller: User - /user/login: - get: - operationId: loginUser - parameters: - - description: The user name for login - explode: true - in: query - name: username - required: true - schema: - pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ - type: string - style: form - - description: The password for login in clear text - explode: true - in: query - name: password - required: true - schema: - type: string - style: form - responses: - 200: - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string - description: successful operation - headers: - Set-Cookie: - description: Cookie authentication key for use with the `auth_cookie` - apiKey authentication. - explode: false - schema: - example: AUTH_KEY=abcde12345; Path=/; HttpOnly - type: string - style: simple - X-Rate-Limit: - description: calls per hour allowed by the user - explode: false - schema: - format: int32 - type: integer - style: simple - X-Expires-After: - description: date in UTC when toekn expires - explode: false - schema: - format: date-time - type: string - style: simple - 400: - description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user - x-swagger-router-controller: User - /user/logout: - get: - operationId: logoutUser - responses: - default: - description: successful operation - security: - - auth_cookie: [] - summary: Logs out current logged in user session - tags: - - user - x-swagger-router-controller: User - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - 400: - description: Invalid username supplied - 404: - description: User not found - security: - - auth_cookie: [] - summary: Delete user - tags: - - user - x-swagger-router-controller: User - get: - operationId: getUserByName - parameters: - - description: The name that needs to be fetched. Use user1 for testing. - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/User' - application/json: - schema: - $ref: '#/components/schemas/User' - description: successful operation - 400: - description: Invalid username supplied - 404: - description: User not found - summary: Get user by user name - tags: - - user - x-swagger-router-controller: User - put: - description: This can only be done by the logged in user. - operationId: updateUser - parameters: - - description: name that need to be deleted - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: Updated user object - required: true - responses: - 400: - description: Invalid user supplied - 404: - description: User not found - security: - - auth_cookie: [] - summary: Updated user - tags: - - user - x-swagger-router-controller: User -components: - requestBodies: - UserArray: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - Pet: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - inline_object: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object' - inline_object_1: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/inline_object_1' - schemas: - Order: - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - title: Pet Order - type: object - xml: - name: Order - Category: - description: A category for a pet - example: - name: name - id: 6 - properties: - id: - format: int64 - type: integer - name: - pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ - type: string - title: Pet category - type: object - xml: - name: Category - User: - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - title: a User - type: object - xml: - name: User - Tag: - description: A tag for a pet - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - title: Pet Tag - type: object - xml: - name: Tag - Pet: - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - category: - $ref: '#/components/schemas/Category' - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: '#/components/schemas/Tag' - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold - type: string - required: - - name - - photoUrls - title: a Pet - type: object - xml: - name: Pet - ApiResponse: - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message - properties: - code: - format: int32 - type: integer - type: - type: string - message: - type: string - title: An uploaded response - type: object - inline_object: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - inline_object_1: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object - securitySchemes: - petstore_auth: - flows: - implicit: - authorizationUrl: http://petstore.swagger.io/api/oauth/dialog - scopes: - write:pets: modify pets in your account - read:pets: read your pets - type: oauth2 - api_key: - in: header - name: api_key - type: apiKey - auth_cookie: - in: cookie - name: AUTH_KEY - type: apiKey diff --git a/samples/server/petstore/nodejs-google-cloud-functions/api/swagger.yaml b/samples/server/petstore/nodejs-google-cloud-functions/api/swagger.yaml deleted file mode 100644 index e5e6334e32..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/api/swagger.yaml +++ /dev/null @@ -1,775 +0,0 @@ ---- -swagger: "2.0" -info: - description: "This is a sample server Petstore server. You can find out more about\ - \ Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\ - \ For this sample, you can use the api key `special-key` to test the authorization\ - \ filters." - version: "1.0.0" - title: "Swagger Petstore" - termsOfService: "http://swagger.io/terms/" - contact: - email: "apiteam@swagger.io" - license: - name: "Apache-2.0" - url: "http://www.apache.org/licenses/LICENSE-2.0.html" -host: "petstore.swagger.io" -basePath: "/v2" -tags: -- name: "pet" - description: "Everything about your Pets" - externalDocs: - description: "Find out more" - url: "http://swagger.io" -- name: "store" - description: "Access to Petstore orders" -- name: "user" - description: "Operations about user" - externalDocs: - description: "Find out more about our store" - url: "http://swagger.io" -schemes: -- "http" -paths: - /pet: - post: - tags: - - "pet" - summary: "Add a new pet to the store" - description: "" - operationId: "addPet" - consumes: - - "application/json" - - "application/xml" - produces: - - "application/xml" - - "application/json" - parameters: - - in: "body" - name: "body" - description: "Pet object that needs to be added to the store" - required: true - schema: - $ref: "#/definitions/Pet" - responses: - 405: - description: "Invalid input" - security: - - petstore_auth: - - "write:pets" - - "read:pets" - x-swagger-router-controller: "Pet" - put: - tags: - - "pet" - summary: "Update an existing pet" - description: "" - operationId: "updatePet" - consumes: - - "application/json" - - "application/xml" - produces: - - "application/xml" - - "application/json" - parameters: - - in: "body" - name: "body" - description: "Pet object that needs to be added to the store" - required: true - schema: - $ref: "#/definitions/Pet" - responses: - 400: - description: "Invalid ID supplied" - 404: - description: "Pet not found" - 405: - description: "Validation exception" - security: - - petstore_auth: - - "write:pets" - - "read:pets" - x-swagger-router-controller: "Pet" - /pet/findByStatus: - get: - tags: - - "pet" - summary: "Finds Pets by status" - description: "Multiple status values can be provided with comma separated strings" - operationId: "findPetsByStatus" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "status" - in: "query" - description: "Status values that need to be considered for filter" - required: true - type: "array" - items: - type: "string" - default: "available" - enum: - - "available" - - "pending" - - "sold" - collectionFormat: "csv" - responses: - 200: - description: "successful operation" - schema: - type: "array" - items: - $ref: "#/definitions/Pet" - 400: - description: "Invalid status value" - security: - - petstore_auth: - - "write:pets" - - "read:pets" - x-swagger-router-controller: "Pet" - /pet/findByTags: - get: - tags: - - "pet" - summary: "Finds Pets by tags" - description: "Multiple tags can be provided with comma separated strings. Use\ - \ tag1, tag2, tag3 for testing." - operationId: "findPetsByTags" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "tags" - in: "query" - description: "Tags to filter by" - required: true - type: "array" - items: - type: "string" - collectionFormat: "csv" - responses: - 200: - description: "successful operation" - schema: - type: "array" - items: - $ref: "#/definitions/Pet" - 400: - description: "Invalid tag value" - security: - - petstore_auth: - - "write:pets" - - "read:pets" - deprecated: true - x-swagger-router-controller: "Pet" - /pet/{petId}: - get: - tags: - - "pet" - summary: "Find pet by ID" - description: "Returns a single pet" - operationId: "getPetById" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "petId" - in: "path" - description: "ID of pet to return" - required: true - type: "integer" - format: "int64" - responses: - 200: - description: "successful operation" - schema: - $ref: "#/definitions/Pet" - 400: - description: "Invalid ID supplied" - 404: - description: "Pet not found" - security: - - api_key: [] - x-swagger-router-controller: "Pet" - post: - tags: - - "pet" - summary: "Updates a pet in the store with form data" - description: "" - operationId: "updatePetWithForm" - consumes: - - "application/x-www-form-urlencoded" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "petId" - in: "path" - description: "ID of pet that needs to be updated" - required: true - type: "integer" - format: "int64" - - name: "name" - in: "formData" - description: "Updated name of the pet" - required: false - type: "string" - - name: "status" - in: "formData" - description: "Updated status of the pet" - required: false - type: "string" - responses: - 405: - description: "Invalid input" - security: - - petstore_auth: - - "write:pets" - - "read:pets" - x-swagger-router-controller: "Pet" - delete: - tags: - - "pet" - summary: "Deletes a pet" - description: "" - operationId: "deletePet" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "api_key" - in: "header" - required: false - type: "string" - - name: "petId" - in: "path" - description: "Pet id to delete" - required: true - type: "integer" - format: "int64" - responses: - 400: - description: "Invalid pet value" - security: - - petstore_auth: - - "write:pets" - - "read:pets" - x-swagger-router-controller: "Pet" - /pet/{petId}/uploadImage: - post: - tags: - - "pet" - summary: "uploads an image" - description: "" - operationId: "uploadFile" - consumes: - - "multipart/form-data" - produces: - - "application/json" - parameters: - - name: "petId" - in: "path" - description: "ID of pet to update" - required: true - type: "integer" - format: "int64" - - name: "additionalMetadata" - in: "formData" - description: "Additional data to pass to server" - required: false - type: "string" - - name: "file" - in: "formData" - description: "file to upload" - required: false - type: "file" - responses: - 200: - description: "successful operation" - schema: - $ref: "#/definitions/ApiResponse" - security: - - petstore_auth: - - "write:pets" - - "read:pets" - x-swagger-router-controller: "Pet" - /store/inventory: - get: - tags: - - "store" - summary: "Returns pet inventories by status" - description: "Returns a map of status codes to quantities" - operationId: "getInventory" - produces: - - "application/json" - parameters: [] - responses: - 200: - description: "successful operation" - schema: - type: "object" - additionalProperties: - type: "integer" - format: "int32" - security: - - api_key: [] - x-swagger-router-controller: "Store" - /store/order: - post: - tags: - - "store" - summary: "Place an order for a pet" - description: "" - operationId: "placeOrder" - produces: - - "application/xml" - - "application/json" - parameters: - - in: "body" - name: "body" - description: "order placed for purchasing the pet" - required: true - schema: - $ref: "#/definitions/Order" - responses: - 200: - description: "successful operation" - schema: - $ref: "#/definitions/Order" - 400: - description: "Invalid Order" - x-swagger-router-controller: "Store" - /store/order/{orderId}: - get: - tags: - - "store" - summary: "Find purchase order by ID" - description: "For valid response try integer IDs with value <= 5 or > 10. Other\ - \ values will generated exceptions" - operationId: "getOrderById" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "orderId" - in: "path" - description: "ID of pet that needs to be fetched" - required: true - type: "integer" - maximum: 5 - minimum: 1 - format: "int64" - responses: - 200: - description: "successful operation" - schema: - $ref: "#/definitions/Order" - 400: - description: "Invalid ID supplied" - 404: - description: "Order not found" - x-swagger-router-controller: "Store" - delete: - tags: - - "store" - summary: "Delete purchase order by ID" - description: "For valid response try integer IDs with value < 1000. Anything\ - \ above 1000 or nonintegers will generate API errors" - operationId: "deleteOrder" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "orderId" - in: "path" - description: "ID of the order that needs to be deleted" - required: true - type: "string" - responses: - 400: - description: "Invalid ID supplied" - 404: - description: "Order not found" - x-swagger-router-controller: "Store" - /user: - post: - tags: - - "user" - summary: "Create user" - description: "This can only be done by the logged in user." - operationId: "createUser" - produces: - - "application/xml" - - "application/json" - parameters: - - in: "body" - name: "body" - description: "Created user object" - required: true - schema: - $ref: "#/definitions/User" - responses: - default: - description: "successful operation" - x-swagger-router-controller: "User" - /user/createWithArray: - post: - tags: - - "user" - summary: "Creates list of users with given input array" - description: "" - operationId: "createUsersWithArrayInput" - produces: - - "application/xml" - - "application/json" - parameters: - - in: "body" - name: "body" - description: "List of user object" - required: true - schema: - type: "array" - items: - $ref: "#/definitions/User" - responses: - default: - description: "successful operation" - x-swagger-router-controller: "User" - /user/createWithList: - post: - tags: - - "user" - summary: "Creates list of users with given input array" - description: "" - operationId: "createUsersWithListInput" - produces: - - "application/xml" - - "application/json" - parameters: - - in: "body" - name: "body" - description: "List of user object" - required: true - schema: - type: "array" - items: - $ref: "#/definitions/User" - responses: - default: - description: "successful operation" - x-swagger-router-controller: "User" - /user/login: - get: - tags: - - "user" - summary: "Logs user into the system" - description: "" - operationId: "loginUser" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "username" - in: "query" - description: "The user name for login" - required: true - type: "string" - - name: "password" - in: "query" - description: "The password for login in clear text" - required: true - type: "string" - responses: - 200: - description: "successful operation" - schema: - type: "string" - headers: - X-Rate-Limit: - type: "integer" - format: "int32" - description: "calls per hour allowed by the user" - X-Expires-After: - type: "string" - format: "date-time" - description: "date in UTC when toekn expires" - 400: - description: "Invalid username/password supplied" - x-swagger-router-controller: "User" - /user/logout: - get: - tags: - - "user" - summary: "Logs out current logged in user session" - description: "" - operationId: "logoutUser" - produces: - - "application/xml" - - "application/json" - parameters: [] - responses: - default: - description: "successful operation" - x-swagger-router-controller: "User" - /user/{username}: - get: - tags: - - "user" - summary: "Get user by user name" - description: "" - operationId: "getUserByName" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "username" - in: "path" - description: "The name that needs to be fetched. Use user1 for testing." - required: true - type: "string" - responses: - 200: - description: "successful operation" - schema: - $ref: "#/definitions/User" - 400: - description: "Invalid username supplied" - 404: - description: "User not found" - x-swagger-router-controller: "User" - put: - tags: - - "user" - summary: "Updated user" - description: "This can only be done by the logged in user." - operationId: "updateUser" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "username" - in: "path" - description: "name that need to be deleted" - required: true - type: "string" - - in: "body" - name: "body" - description: "Updated user object" - required: true - schema: - $ref: "#/definitions/User" - responses: - 400: - description: "Invalid user supplied" - 404: - description: "User not found" - x-swagger-router-controller: "User" - delete: - tags: - - "user" - summary: "Delete user" - description: "This can only be done by the logged in user." - operationId: "deleteUser" - produces: - - "application/xml" - - "application/json" - parameters: - - name: "username" - in: "path" - description: "The name that needs to be deleted" - required: true - type: "string" - responses: - 400: - description: "Invalid username supplied" - 404: - description: "User not found" - x-swagger-router-controller: "User" -securityDefinitions: - petstore_auth: - type: "oauth2" - authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog" - flow: "implicit" - scopes: - write:pets: "modify pets in your account" - read:pets: "read your pets" - api_key: - type: "apiKey" - name: "api_key" - in: "header" -definitions: - Order: - type: "object" - properties: - id: - type: "integer" - format: "int64" - petId: - type: "integer" - format: "int64" - quantity: - type: "integer" - format: "int32" - shipDate: - type: "string" - format: "date-time" - status: - type: "string" - description: "Order Status" - enum: - - "placed" - - "approved" - - "delivered" - complete: - type: "boolean" - default: false - title: "Pet Order" - description: "An order for a pets from the pet store" - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: "2000-01-23T04:56:07.000+00:00" - complete: false - status: "placed" - xml: - name: "Order" - Category: - type: "object" - properties: - id: - type: "integer" - format: "int64" - name: - type: "string" - title: "Pet category" - description: "A category for a pet" - example: - name: "name" - id: 6 - xml: - name: "Category" - User: - type: "object" - properties: - id: - type: "integer" - format: "int64" - username: - type: "string" - firstName: - type: "string" - lastName: - type: "string" - email: - type: "string" - password: - type: "string" - phone: - type: "string" - userStatus: - type: "integer" - format: "int32" - description: "User Status" - title: "a User" - description: "A User who is purchasing from the pet store" - example: - firstName: "firstName" - lastName: "lastName" - password: "password" - userStatus: 6 - phone: "phone" - id: 0 - email: "email" - username: "username" - xml: - name: "User" - Tag: - type: "object" - properties: - id: - type: "integer" - format: "int64" - name: - type: "string" - title: "Pet Tag" - description: "A tag for a pet" - example: - name: "name" - id: 1 - xml: - name: "Tag" - Pet: - type: "object" - required: - - "name" - - "photoUrls" - properties: - id: - type: "integer" - format: "int64" - category: - $ref: "#/definitions/Category" - name: - type: "string" - example: "doggie" - photoUrls: - type: "array" - xml: - name: "photoUrl" - wrapped: true - items: - type: "string" - tags: - type: "array" - xml: - name: "tag" - wrapped: true - items: - $ref: "#/definitions/Tag" - status: - type: "string" - description: "pet status in the store" - enum: - - "available" - - "pending" - - "sold" - title: "a Pet" - description: "A pet for sale in the pet store" - example: - photoUrls: - - "photoUrls" - - "photoUrls" - name: "doggie" - id: 0 - category: - name: "name" - id: 6 - tags: - - name: "name" - id: 1 - - name: "name" - id: 1 - status: "available" - xml: - name: "Pet" - ApiResponse: - type: "object" - properties: - code: - type: "integer" - format: "int32" - type: - type: "string" - message: - type: "string" - title: "An uploaded response" - description: "Describes the result of uploading an image resource" - example: - code: 0 - type: "type" - message: "message" -externalDocs: - description: "Find out more about Swagger" - url: "http://swagger.io" diff --git a/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js b/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js deleted file mode 100644 index 14a5573b64..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/controllers/Pet.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -var utils = require('../utils/writer.js'); -var Pet = require('../service/PetService'); - -module.exports.addPet = function addPet (req, res, next) { - var pet = req.swagger.params['Pet'].value; - Pet.addPet(pet) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.deletePet = function deletePet (req, res, next) { - var petId = req.swagger.params['petId'].value; - var apiUnderscorekey = req.swagger.params['api_key'].value; - Pet.deletePet(petId,apiUnderscorekey) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.findPetsByStatus = function findPetsByStatus (req, res, next) { - var status = req.swagger.params['status'].value; - Pet.findPetsByStatus(status) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.findPetsByTags = function findPetsByTags (req, res, next) { - var tags = req.swagger.params['tags'].value; - var maxCount = req.swagger.params['maxCount'].value; - Pet.findPetsByTags(tags,maxCount) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.getPetById = function getPetById (req, res, next) { - var petId = req.swagger.params['petId'].value; - Pet.getPetById(petId) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.updatePet = function updatePet (req, res, next) { - var pet = req.swagger.params['Pet'].value; - Pet.updatePet(pet) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.updatePetWithForm = function updatePetWithForm (req, res, next) { - var petId = req.swagger.params['petId'].value; - var name = req.swagger.params['name'].value; - var status = req.swagger.params['status'].value; - Pet.updatePetWithForm(petId,name,status) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.uploadFile = function uploadFile (req, res, next) { - var petId = req.swagger.params['petId'].value; - var additionalMetadata = req.swagger.params['additionalMetadata'].value; - var file = req.swagger.params['file'].value; - Pet.uploadFile(petId,additionalMetadata,file) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; diff --git a/samples/server/petstore/nodejs-google-cloud-functions/controllers/PetService.js b/samples/server/petstore/nodejs-google-cloud-functions/controllers/PetService.js deleted file mode 100644 index 36f3434274..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/controllers/PetService.js +++ /dev/null @@ -1,166 +0,0 @@ -'use strict'; - -exports.addPet = function(args, res, next) { - /** - * Add a new pet to the store - * - * - * body Pet Pet object that needs to be added to the store - * no response value expected for this operation - **/ - res.end(); -} - -exports.deletePet = function(args, res, next) { - /** - * Deletes a pet - * - * - * petId Long Pet id to delete - * api_key String (optional) - * no response value expected for this operation - **/ - res.end(); -} - -exports.findPetsByStatus = function(args, res, next) { - /** - * Finds Pets by status - * Multiple status values can be provided with comma separated strings - * - * status List Status values that need to be considered for filter - * returns List - **/ - var examples = {}; - examples['application/json'] = [ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "aeiou", - "id" : 6 - }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]; - if (Object.keys(examples).length > 0) { - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(examples[Object.keys(examples)[0]] || {}, null, 2)); - } else { - res.end(); - } -} - -exports.findPetsByTags = function(args, res, next) { - /** - * Finds Pets by tags - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * tags List Tags to filter by - * returns List - **/ - var examples = {}; - examples['application/json'] = [ { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "aeiou", - "id" : 6 - }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -} ]; - if (Object.keys(examples).length > 0) { - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(examples[Object.keys(examples)[0]] || {}, null, 2)); - } else { - res.end(); - } -} - -exports.getPetById = function(args, res, next) { - /** - * Find pet by ID - * Returns a single pet - * - * petId Long ID of pet to return - * returns Pet - **/ - var examples = {}; - examples['application/json'] = { - "photoUrls" : [ "aeiou" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "aeiou", - "id" : 6 - }, - "tags" : [ { - "name" : "aeiou", - "id" : 1 - } ], - "status" : "available" -}; - if (Object.keys(examples).length > 0) { - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(examples[Object.keys(examples)[0]] || {}, null, 2)); - } else { - res.end(); - } -} - -exports.updatePet = function(args, res, next) { - /** - * Update an existing pet - * - * - * body Pet Pet object that needs to be added to the store - * no response value expected for this operation - **/ - res.end(); -} - -exports.updatePetWithForm = function(args, res, next) { - /** - * Updates a pet in the store with form data - * - * - * petId Long ID of pet that needs to be updated - * name String Updated name of the pet (optional) - * status String Updated status of the pet (optional) - * no response value expected for this operation - **/ - res.end(); -} - -exports.uploadFile = function(args, res, next) { - /** - * uploads an image - * - * - * petId Long ID of pet to update - * additionalMetadata String Additional data to pass to server (optional) - * file File file to upload (optional) - * returns ApiResponse - **/ - var examples = {}; - examples['application/json'] = { - "code" : 0, - "type" : "aeiou", - "message" : "aeiou" -}; - if (Object.keys(examples).length > 0) { - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(examples[Object.keys(examples)[0]] || {}, null, 2)); - } else { - res.end(); - } -} - diff --git a/samples/server/petstore/nodejs-google-cloud-functions/controllers/Store.js b/samples/server/petstore/nodejs-google-cloud-functions/controllers/Store.js deleted file mode 100644 index eb403b6b87..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/controllers/Store.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -var utils = require('../utils/writer.js'); -var Store = require('../service/StoreService'); - -module.exports.deleteOrder = function deleteOrder (req, res, next) { - var orderId = req.swagger.params['orderId'].value; - Store.deleteOrder(orderId) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.getInventory = function getInventory (req, res, next) { - Store.getInventory() - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.getOrderById = function getOrderById (req, res, next) { - var orderId = req.swagger.params['orderId'].value; - Store.getOrderById(orderId) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.placeOrder = function placeOrder (req, res, next) { - var order = req.swagger.params['Order'].value; - Store.placeOrder(order) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; diff --git a/samples/server/petstore/nodejs-google-cloud-functions/controllers/StoreService.js b/samples/server/petstore/nodejs-google-cloud-functions/controllers/StoreService.js deleted file mode 100644 index be99ec7acb..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/controllers/StoreService.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - -exports.deleteOrder = function(args, res, next) { - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * orderId String ID of the order that needs to be deleted - * no response value expected for this operation - **/ - res.end(); -} - -exports.getInventory = function(args, res, next) { - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - * - * returns Map - **/ - var examples = {}; - examples['application/json'] = { - "key" : 0 -}; - if (Object.keys(examples).length > 0) { - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(examples[Object.keys(examples)[0]] || {}, null, 2)); - } else { - res.end(); - } -} - -exports.getOrderById = function(args, res, next) { - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * - * orderId Long ID of pet that needs to be fetched - * returns Order - **/ - var examples = {}; - examples['application/json'] = { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" -}; - if (Object.keys(examples).length > 0) { - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(examples[Object.keys(examples)[0]] || {}, null, 2)); - } else { - res.end(); - } -} - -exports.placeOrder = function(args, res, next) { - /** - * Place an order for a pet - * - * - * body Order order placed for purchasing the pet - * returns Order - **/ - var examples = {}; - examples['application/json'] = { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" -}; - if (Object.keys(examples).length > 0) { - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(examples[Object.keys(examples)[0]] || {}, null, 2)); - } else { - res.end(); - } -} - diff --git a/samples/server/petstore/nodejs-google-cloud-functions/controllers/User.js b/samples/server/petstore/nodejs-google-cloud-functions/controllers/User.js deleted file mode 100644 index 6a67f0ea21..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/controllers/User.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; - -var utils = require('../utils/writer.js'); -var User = require('../service/UserService'); - -module.exports.createUser = function createUser (req, res, next) { - var user = req.swagger.params['User'].value; - User.createUser(user) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.createUsersWithArrayInput = function createUsersWithArrayInput (req, res, next) { - var user = req.swagger.params['User'].value; - User.createUsersWithArrayInput(user) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.createUsersWithListInput = function createUsersWithListInput (req, res, next) { - var user = req.swagger.params['User'].value; - User.createUsersWithListInput(user) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.deleteUser = function deleteUser (req, res, next) { - var username = req.swagger.params['username'].value; - User.deleteUser(username) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.getUserByName = function getUserByName (req, res, next) { - var username = req.swagger.params['username'].value; - User.getUserByName(username) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.loginUser = function loginUser (req, res, next) { - var username = req.swagger.params['username'].value; - var password = req.swagger.params['password'].value; - User.loginUser(username,password) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.logoutUser = function logoutUser (req, res, next) { - User.logoutUser() - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.updateUser = function updateUser (req, res, next) { - var username = req.swagger.params['username'].value; - var user = req.swagger.params['User'].value; - User.updateUser(username,user) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; diff --git a/samples/server/petstore/nodejs-google-cloud-functions/controllers/UserService.js b/samples/server/petstore/nodejs-google-cloud-functions/controllers/UserService.js deleted file mode 100644 index d15268eee6..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/controllers/UserService.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict'; - -exports.createUser = function(args, res, next) { - /** - * Create user - * This can only be done by the logged in user. - * - * body User Created user object - * no response value expected for this operation - **/ - res.end(); -} - -exports.createUsersWithArrayInput = function(args, res, next) { - /** - * Creates list of users with given input array - * - * - * body List List of user object - * no response value expected for this operation - **/ - res.end(); -} - -exports.createUsersWithListInput = function(args, res, next) { - /** - * Creates list of users with given input array - * - * - * body List List of user object - * no response value expected for this operation - **/ - res.end(); -} - -exports.deleteUser = function(args, res, next) { - /** - * Delete user - * This can only be done by the logged in user. - * - * username String The name that needs to be deleted - * no response value expected for this operation - **/ - res.end(); -} - -exports.getUserByName = function(args, res, next) { - /** - * Get user by user name - * - * - * username String The name that needs to be fetched. Use user1 for testing. - * returns User - **/ - var examples = {}; - examples['application/json'] = { - "firstName" : "aeiou", - "lastName" : "aeiou", - "password" : "aeiou", - "userStatus" : 6, - "phone" : "aeiou", - "id" : 0, - "email" : "aeiou", - "username" : "aeiou" -}; - if (Object.keys(examples).length > 0) { - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(examples[Object.keys(examples)[0]] || {}, null, 2)); - } else { - res.end(); - } -} - -exports.loginUser = function(args, res, next) { - /** - * Logs user into the system - * - * - * username String The user name for login - * password String The password for login in clear text - * returns String - **/ - var examples = {}; - examples['application/json'] = "aeiou"; - if (Object.keys(examples).length > 0) { - res.setHeader('Content-Type', 'application/json'); - res.end(JSON.stringify(examples[Object.keys(examples)[0]] || {}, null, 2)); - } else { - res.end(); - } -} - -exports.logoutUser = function(args, res, next) { - /** - * Logs out current logged in user session - * - * - * no response value expected for this operation - **/ - res.end(); -} - -exports.updateUser = function(args, res, next) { - /** - * Updated user - * This can only be done by the logged in user. - * - * username String name that need to be deleted - * body User Updated user object - * no response value expected for this operation - **/ - res.end(); -} - diff --git a/samples/server/petstore/nodejs-google-cloud-functions/index.js b/samples/server/petstore/nodejs-google-cloud-functions/index.js deleted file mode 100644 index 7c4cf42a3b..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/index.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -var swaggerTools = require('swagger-tools'); -var jsyaml = require('js-yaml'); -var fs = require('fs'); - -// swaggerRouter configuration -var options = { - controllers: './controllers', - useStubs: false -}; - -// The Swagger document (require it, build it programmatically, fetch it from a URL, ...) -var spec = fs.readFileSync('./api/swagger.yaml', 'utf8'); -var swaggerDoc = jsyaml.safeLoad(spec); - -function toPromise(f, req, res) { - return new Promise(function(resolve, reject) { - f(req, res, function(err) { - if (err) { - reject(err); - } else { - resolve(); - } - }); - }); -} - -exports.v2 = function(req, res) { - swaggerTools.initializeMiddleware(swaggerDoc, function(middleware) { - var metadata = middleware.swaggerMetadata(); - var validator = middleware.swaggerValidator(); - var router = middleware.swaggerRouter(options); - req.url = swaggerDoc.basePath + req.url; - toPromise(metadata, req, res).then(function() { - return toPromise(validator, req, res); - }).then(function() { - return toPromise(router, req, res); - }).catch(function(err) { - console.error(err); - res.status(res.statusCode || 400).send(err); - }); - }); -}; diff --git a/samples/server/petstore/nodejs-google-cloud-functions/package.json b/samples/server/petstore/nodejs-google-cloud-functions/package.json deleted file mode 100644 index 5008aba1ac..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "swagger-petstore", - "version": "1.0.0", - "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "main": "index.js", - "keywords": [ - "swagger" - ], - "license": "Unlicense", - "private": true, - "dependencies": { - "js-yaml": "^3.3.0", - "swagger-tools": "0.10.1" - } -} diff --git a/samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js b/samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js deleted file mode 100644 index 441e248b27..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/service/PetService.js +++ /dev/null @@ -1,191 +0,0 @@ -'use strict'; - - -/** - * Add a new pet to the store - * - * pet Pet Pet object that needs to be added to the store - * no response value expected for this operation - **/ -exports.addPet = function(pet) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Deletes a pet - * - * petId Long Pet id to delete - * apiUnderscorekey String (optional) - * no response value expected for this operation - **/ -exports.deletePet = function(petId,apiUnderscorekey) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Finds Pets by status - * Multiple status values can be provided with comma separated strings - * - * status List Status values that need to be considered for filter - * returns List - **/ -exports.findPetsByStatus = function(status) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Finds Pets by tags - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * tags List Tags to filter by - * maxCount Integer Maximum number of items to return (optional) - * returns List - **/ -exports.findPetsByTags = function(tags,maxCount) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Find pet by ID - * Returns a single pet - * - * petId Long ID of pet to return - * returns Pet - **/ -exports.getPetById = function(petId) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Update an existing pet - * - * pet Pet Pet object that needs to be added to the store - * no response value expected for this operation - **/ -exports.updatePet = function(pet) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Updates a pet in the store with form data - * - * petId Long ID of pet that needs to be updated - * name String Updated name of the pet (optional) - * status String Updated status of the pet (optional) - * no response value expected for this operation - **/ -exports.updatePetWithForm = function(petId,name,status) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * uploads an image - * - * petId Long ID of pet to update - * additionalMetadata String Additional data to pass to server (optional) - * file File file to upload (optional) - * returns ApiResponse - **/ -exports.uploadFile = function(petId,additionalMetadata,file) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "code" : 0, - "type" : "type", - "message" : "message" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - diff --git a/samples/server/petstore/nodejs-google-cloud-functions/service/StoreService.js b/samples/server/petstore/nodejs-google-cloud-functions/service/StoreService.js deleted file mode 100644 index 50a2768d90..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/service/StoreService.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - - -/** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * orderId String ID of the order that needs to be deleted - * no response value expected for this operation - **/ -exports.deleteOrder = function(orderId) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Returns pet inventories by status - * Returns a map of status codes to quantities - * - * returns Map - **/ -exports.getInventory = function() { - return new Promise(function(resolve, reject) { - var examples = {}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * - * orderId Long ID of pet that needs to be fetched - * returns Order - **/ -exports.getOrderById = function(orderId) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Place an order for a pet - * - * order Order order placed for purchasing the pet - * returns Order - **/ -exports.placeOrder = function(order) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - diff --git a/samples/server/petstore/nodejs-google-cloud-functions/service/UserService.js b/samples/server/petstore/nodejs-google-cloud-functions/service/UserService.js deleted file mode 100644 index ae482204a2..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/service/UserService.js +++ /dev/null @@ -1,130 +0,0 @@ -'use strict'; - - -/** - * Create user - * This can only be done by the logged in user. - * - * user User Created user object - * no response value expected for this operation - **/ -exports.createUser = function(user) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Creates list of users with given input array - * - * user List List of user object - * no response value expected for this operation - **/ -exports.createUsersWithArrayInput = function(user) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Creates list of users with given input array - * - * user List List of user object - * no response value expected for this operation - **/ -exports.createUsersWithListInput = function(user) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Delete user - * This can only be done by the logged in user. - * - * username String The name that needs to be deleted - * no response value expected for this operation - **/ -exports.deleteUser = function(username) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Get user by user name - * - * username String The name that needs to be fetched. Use user1 for testing. - * returns User - **/ -exports.getUserByName = function(username) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Logs user into the system - * - * username String The user name for login - * password String The password for login in clear text - * returns String - **/ -exports.loginUser = function(username,password) { - return new Promise(function(resolve, reject) { - var examples = {}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Logs out current logged in user session - * - * no response value expected for this operation - **/ -exports.logoutUser = function() { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Updated user - * This can only be done by the logged in user. - * - * username String name that need to be deleted - * user User Updated user object - * no response value expected for this operation - **/ -exports.updateUser = function(username,user) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - diff --git a/samples/server/petstore/nodejs-google-cloud-functions/utils/writer.js b/samples/server/petstore/nodejs-google-cloud-functions/utils/writer.js deleted file mode 100644 index d79f6e1a52..0000000000 --- a/samples/server/petstore/nodejs-google-cloud-functions/utils/writer.js +++ /dev/null @@ -1,43 +0,0 @@ -var ResponsePayload = function(code, payload) { - this.code = code; - this.payload = payload; -} - -exports.respondWithCode = function(code, payload) { - return new ResponsePayload(code, payload); -} - -var writeJson = exports.writeJson = function(response, arg1, arg2) { - var code; - var payload; - - if(arg1 && arg1 instanceof ResponsePayload) { - writeJson(response, arg1.payload, arg1.code); - return; - } - - if(arg2 && Number.isInteger(arg2)) { - code = arg2; - } - else { - if(arg1 && Number.isInteger(arg1)) { - code = arg1; - } - } - if(code && arg1) { - payload = arg1; - } - else if(arg1) { - payload = arg1; - } - - if(!code) { - // if no response code given, we default to 200 - code = 200; - } - if(typeof payload === 'object') { - payload = JSON.stringify(payload, null, 2); - } - response.writeHead(code, {'Content-Type': 'application/json'}); - response.end(payload); -} diff --git a/samples/server/petstore/nodejs/.openapi-generator-ignore b/samples/server/petstore/nodejs/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a..0000000000 --- a/samples/server/petstore/nodejs/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/server/petstore/nodejs/.openapi-generator/VERSION b/samples/server/petstore/nodejs/.openapi-generator/VERSION deleted file mode 100644 index d96260ba33..0000000000 --- a/samples/server/petstore/nodejs/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.0.2-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/nodejs/README.md b/samples/server/petstore/nodejs/README.md deleted file mode 100644 index 83854914e6..0000000000 --- a/samples/server/petstore/nodejs/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# OpenAPI generated server - -## Overview -This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub. - -### Running the server -To run the server, run: - -``` -npm start -``` - -To view the Swagger UI interface: - -``` -open http://localhost:8080/docs -``` - -This project leverages the mega-awesome [swagger-tools](https://github.com/apigee-127/swagger-tools) middleware which does most all the work. diff --git a/samples/server/petstore/nodejs/api/openapi.yaml b/samples/server/petstore/nodejs/api/openapi.yaml deleted file mode 100644 index f2908efade..0000000000 --- a/samples/server/petstore/nodejs/api/openapi.yaml +++ /dev/null @@ -1,837 +0,0 @@ -openapi: 3.0.0 -info: - description: This is a sample server Petstore server. For this sample, you can use - the api key `special-key` to test the authorization filters. - license: - name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore - version: 1.0.0 -externalDocs: - description: Find out more about Swagger - url: http://swagger.io -servers: -- url: http://petstore.swagger.io/v2 -tags: -- description: Everything about your Pets - name: pet -- description: Access to Petstore orders - name: store -- description: Operations about user - name: user -paths: - /pet: - post: - operationId: addPet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store - tags: - - pet - x-swagger-router-controller: Pet - put: - operationId: updatePet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - 400: - description: Invalid ID supplied - 404: - description: Pet not found - 405: - description: Validation exception - security: - - petstore_auth: - - write:pets - - read:pets - summary: Update an existing pet - tags: - - pet - x-swagger-router-controller: Pet - /pet/findByStatus: - get: - description: Multiple status values can be provided with comma separated strings - operationId: findPetsByStatus - parameters: - - description: Status values that need to be considered for filter - explode: false - in: query - name: status - required: true - schema: - items: - default: available - enum: - - available - - pending - - sold - type: string - type: array - style: form - responses: - 200: - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - 400: - description: Invalid status value - security: - - petstore_auth: - - read:pets - summary: Finds Pets by status - tags: - - pet - x-swagger-router-controller: Pet - /pet/findByTags: - get: - deprecated: true - description: Multiple tags can be provided with comma separated strings. Use - tag1, tag2, tag3 for testing. - operationId: findPetsByTags - parameters: - - description: Tags to filter by - explode: false - in: query - name: tags - required: true - schema: - items: - type: string - type: array - style: form - - description: Maximum number of items to return - explode: true - in: query - name: maxCount - required: false - schema: - format: int32 - type: integer - style: form - responses: - 200: - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - 400: - description: Invalid tag value - security: - - petstore_auth: - - read:pets - summary: Finds Pets by tags - tags: - - pet - x-swagger-router-controller: Pet - /pet/{petId}: - delete: - operationId: deletePet - parameters: - - explode: false - in: header - name: api_key - required: false - schema: - type: string - style: simple - - description: Pet id to delete - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - 400: - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet - tags: - - pet - x-swagger-router-controller: Pet - get: - description: Returns a single pet - operationId: getPetById - parameters: - - description: ID of pet to return - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Pet' - application/json: - schema: - $ref: '#/components/schemas/Pet' - description: successful operation - 400: - description: Invalid ID supplied - 404: - description: Pet not found - security: - - api_key: [] - summary: Find pet by ID - tags: - - pet - x-swagger-router-controller: Pet - post: - operationId: updatePetWithForm - parameters: - - description: ID of pet that needs to be updated - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - $ref: '#/components/requestBodies/inline_object' - content: - application/x-www-form-urlencoded: - schema: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - responses: - 405: - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Updates a pet in the store with form data - tags: - - pet - x-swagger-router-controller: Pet - /pet/{petId}/uploadImage: - post: - operationId: uploadFile - parameters: - - description: ID of pet to update - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - $ref: '#/components/requestBodies/inline_object_1' - content: - multipart/form-data: - schema: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object - responses: - 200: - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image - tags: - - pet - x-swagger-router-controller: Pet - /store/inventory: - get: - description: Returns a map of status codes to quantities - operationId: getInventory - responses: - 200: - content: - application/json: - schema: - additionalProperties: - format: int32 - type: integer - type: object - description: successful operation - security: - - api_key: [] - summary: Returns pet inventories by status - tags: - - store - x-swagger-router-controller: Store - /store/order: - post: - operationId: placeOrder - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet - required: true - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - 400: - description: Invalid Order - summary: Place an order for a pet - tags: - - store - x-swagger-router-controller: Store - /store/order/{orderId}: - delete: - description: For valid response try integer IDs with value < 1000. Anything - above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - explode: false - in: path - name: orderId - required: true - schema: - type: string - style: simple - responses: - 400: - description: Invalid ID supplied - 404: - description: Order not found - summary: Delete purchase order by ID - tags: - - store - x-swagger-router-controller: Store - get: - description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions - operationId: getOrderById - parameters: - - description: ID of pet that needs to be fetched - explode: false - in: path - name: orderId - required: true - schema: - format: int64 - maximum: 5 - minimum: 1 - type: integer - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - 400: - description: Invalid ID supplied - 404: - description: Order not found - summary: Find purchase order by ID - tags: - - store - x-swagger-router-controller: Store - /user: - post: - description: This can only be done by the logged in user. - operationId: createUser - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: Created user object - required: true - responses: - default: - description: successful operation - security: - - auth_cookie: [] - summary: Create user - tags: - - user - x-swagger-router-controller: User - /user/createWithArray: - post: - operationId: createUsersWithArrayInput - requestBody: - $ref: '#/components/requestBodies/UserArray' - responses: - default: - description: successful operation - security: - - auth_cookie: [] - summary: Creates list of users with given input array - tags: - - user - x-swagger-router-controller: User - /user/createWithList: - post: - operationId: createUsersWithListInput - requestBody: - $ref: '#/components/requestBodies/UserArray' - responses: - default: - description: successful operation - security: - - auth_cookie: [] - summary: Creates list of users with given input array - tags: - - user - x-swagger-router-controller: User - /user/login: - get: - operationId: loginUser - parameters: - - description: The user name for login - explode: true - in: query - name: username - required: true - schema: - pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ - type: string - style: form - - description: The password for login in clear text - explode: true - in: query - name: password - required: true - schema: - type: string - style: form - responses: - 200: - content: - application/xml: - schema: - type: string - application/json: - schema: - type: string - description: successful operation - headers: - Set-Cookie: - description: Cookie authentication key for use with the `auth_cookie` - apiKey authentication. - explode: false - schema: - example: AUTH_KEY=abcde12345; Path=/; HttpOnly - type: string - style: simple - X-Rate-Limit: - description: calls per hour allowed by the user - explode: false - schema: - format: int32 - type: integer - style: simple - X-Expires-After: - description: date in UTC when toekn expires - explode: false - schema: - format: date-time - type: string - style: simple - 400: - description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user - x-swagger-router-controller: User - /user/logout: - get: - operationId: logoutUser - responses: - default: - description: successful operation - security: - - auth_cookie: [] - summary: Logs out current logged in user session - tags: - - user - x-swagger-router-controller: User - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - 400: - description: Invalid username supplied - 404: - description: User not found - security: - - auth_cookie: [] - summary: Delete user - tags: - - user - x-swagger-router-controller: User - get: - operationId: getUserByName - parameters: - - description: The name that needs to be fetched. Use user1 for testing. - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - 200: - content: - application/xml: - schema: - $ref: '#/components/schemas/User' - application/json: - schema: - $ref: '#/components/schemas/User' - description: successful operation - 400: - description: Invalid username supplied - 404: - description: User not found - summary: Get user by user name - tags: - - user - x-swagger-router-controller: User - put: - description: This can only be done by the logged in user. - operationId: updateUser - parameters: - - description: name that need to be deleted - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: Updated user object - required: true - responses: - 400: - description: Invalid user supplied - 404: - description: User not found - security: - - auth_cookie: [] - summary: Updated user - tags: - - user - x-swagger-router-controller: User -components: - requestBodies: - UserArray: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - Pet: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true - inline_object: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/inline_object' - inline_object_1: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/inline_object_1' - schemas: - Order: - description: An order for a pets from the pet store - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - title: Pet Order - type: object - xml: - name: Order - Category: - description: A category for a pet - example: - name: name - id: 6 - properties: - id: - format: int64 - type: integer - name: - pattern: ^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$ - type: string - title: Pet category - type: object - xml: - name: Category - User: - description: A User who is purchasing from the pet store - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - title: a User - type: object - xml: - name: User - Tag: - description: A tag for a pet - example: - name: name - id: 1 - properties: - id: - format: int64 - type: integer - name: - type: string - title: Pet Tag - type: object - xml: - name: Tag - Pet: - description: A pet for sale in the pet store - example: - photoUrls: - - photoUrls - - photoUrls - name: doggie - id: 0 - category: - name: name - id: 6 - tags: - - name: name - id: 1 - - name: name - id: 1 - status: available - properties: - id: - format: int64 - type: integer - category: - $ref: '#/components/schemas/Category' - name: - example: doggie - type: string - photoUrls: - items: - type: string - type: array - xml: - name: photoUrl - wrapped: true - tags: - items: - $ref: '#/components/schemas/Tag' - type: array - xml: - name: tag - wrapped: true - status: - description: pet status in the store - enum: - - available - - pending - - sold - type: string - required: - - name - - photoUrls - title: a Pet - type: object - xml: - name: Pet - ApiResponse: - description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message - properties: - code: - format: int32 - type: integer - type: - type: string - message: - type: string - title: An uploaded response - type: object - inline_object: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - inline_object_1: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object - securitySchemes: - petstore_auth: - flows: - implicit: - authorizationUrl: http://petstore.swagger.io/api/oauth/dialog - scopes: - write:pets: modify pets in your account - read:pets: read your pets - type: oauth2 - api_key: - in: header - name: api_key - type: apiKey - auth_cookie: - in: cookie - name: AUTH_KEY - type: apiKey diff --git a/samples/server/petstore/nodejs/controllers/Pet.js b/samples/server/petstore/nodejs/controllers/Pet.js deleted file mode 100644 index 14a5573b64..0000000000 --- a/samples/server/petstore/nodejs/controllers/Pet.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -var utils = require('../utils/writer.js'); -var Pet = require('../service/PetService'); - -module.exports.addPet = function addPet (req, res, next) { - var pet = req.swagger.params['Pet'].value; - Pet.addPet(pet) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.deletePet = function deletePet (req, res, next) { - var petId = req.swagger.params['petId'].value; - var apiUnderscorekey = req.swagger.params['api_key'].value; - Pet.deletePet(petId,apiUnderscorekey) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.findPetsByStatus = function findPetsByStatus (req, res, next) { - var status = req.swagger.params['status'].value; - Pet.findPetsByStatus(status) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.findPetsByTags = function findPetsByTags (req, res, next) { - var tags = req.swagger.params['tags'].value; - var maxCount = req.swagger.params['maxCount'].value; - Pet.findPetsByTags(tags,maxCount) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.getPetById = function getPetById (req, res, next) { - var petId = req.swagger.params['petId'].value; - Pet.getPetById(petId) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.updatePet = function updatePet (req, res, next) { - var pet = req.swagger.params['Pet'].value; - Pet.updatePet(pet) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.updatePetWithForm = function updatePetWithForm (req, res, next) { - var petId = req.swagger.params['petId'].value; - var name = req.swagger.params['name'].value; - var status = req.swagger.params['status'].value; - Pet.updatePetWithForm(petId,name,status) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.uploadFile = function uploadFile (req, res, next) { - var petId = req.swagger.params['petId'].value; - var additionalMetadata = req.swagger.params['additionalMetadata'].value; - var file = req.swagger.params['file'].value; - Pet.uploadFile(petId,additionalMetadata,file) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; diff --git a/samples/server/petstore/nodejs/controllers/Store.js b/samples/server/petstore/nodejs/controllers/Store.js deleted file mode 100644 index eb403b6b87..0000000000 --- a/samples/server/petstore/nodejs/controllers/Store.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -var utils = require('../utils/writer.js'); -var Store = require('../service/StoreService'); - -module.exports.deleteOrder = function deleteOrder (req, res, next) { - var orderId = req.swagger.params['orderId'].value; - Store.deleteOrder(orderId) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.getInventory = function getInventory (req, res, next) { - Store.getInventory() - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.getOrderById = function getOrderById (req, res, next) { - var orderId = req.swagger.params['orderId'].value; - Store.getOrderById(orderId) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.placeOrder = function placeOrder (req, res, next) { - var order = req.swagger.params['Order'].value; - Store.placeOrder(order) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; diff --git a/samples/server/petstore/nodejs/controllers/User.js b/samples/server/petstore/nodejs/controllers/User.js deleted file mode 100644 index 6a67f0ea21..0000000000 --- a/samples/server/petstore/nodejs/controllers/User.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; - -var utils = require('../utils/writer.js'); -var User = require('../service/UserService'); - -module.exports.createUser = function createUser (req, res, next) { - var user = req.swagger.params['User'].value; - User.createUser(user) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.createUsersWithArrayInput = function createUsersWithArrayInput (req, res, next) { - var user = req.swagger.params['User'].value; - User.createUsersWithArrayInput(user) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.createUsersWithListInput = function createUsersWithListInput (req, res, next) { - var user = req.swagger.params['User'].value; - User.createUsersWithListInput(user) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.deleteUser = function deleteUser (req, res, next) { - var username = req.swagger.params['username'].value; - User.deleteUser(username) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.getUserByName = function getUserByName (req, res, next) { - var username = req.swagger.params['username'].value; - User.getUserByName(username) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.loginUser = function loginUser (req, res, next) { - var username = req.swagger.params['username'].value; - var password = req.swagger.params['password'].value; - User.loginUser(username,password) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.logoutUser = function logoutUser (req, res, next) { - User.logoutUser() - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; - -module.exports.updateUser = function updateUser (req, res, next) { - var username = req.swagger.params['username'].value; - var user = req.swagger.params['User'].value; - User.updateUser(username,user) - .then(function (response) { - utils.writeJson(res, response); - }) - .catch(function (response) { - utils.writeJson(res, response); - }); -}; diff --git a/samples/server/petstore/nodejs/index.js b/samples/server/petstore/nodejs/index.js deleted file mode 100644 index 58fcccb862..0000000000 --- a/samples/server/petstore/nodejs/index.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -var fs = require('fs'), - path = require('path'), - http = require('http'); - -var app = require('connect')(); -var swaggerTools = require('swagger-tools'); -var jsyaml = require('js-yaml'); -var serverPort = 8080; - -// swaggerRouter configuration -var options = { - swaggerUi: path.join(__dirname, '/openapi.json'), - controllers: path.join(__dirname, './controllers'), - useStubs: process.env.NODE_ENV === 'development' // Conditionally turn on stubs (mock mode) -}; - -// The Swagger document (require it, build it programmatically, fetch it from a URL, ...) -var spec = fs.readFileSync(path.join(__dirname,'api/openapi.yaml'), 'utf8'); -var swaggerDoc = jsyaml.safeLoad(spec); - -// Initialize the Swagger middleware -swaggerTools.initializeMiddleware(swaggerDoc, function (middleware) { - - // Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain - app.use(middleware.swaggerMetadata()); - - // Validate Swagger requests - app.use(middleware.swaggerValidator()); - - // Route validated requests to appropriate controller - app.use(middleware.swaggerRouter(options)); - - // Serve the Swagger documents and Swagger UI - app.use(middleware.swaggerUi()); - - // Start the server - http.createServer(app).listen(serverPort, function () { - console.log('Your server is listening on port %d (http://localhost:%d)', serverPort, serverPort); - console.log('Swagger-ui is available on http://localhost:%d/docs', serverPort); - }); - -}); diff --git a/samples/server/petstore/nodejs/package.json b/samples/server/petstore/nodejs/package.json deleted file mode 100644 index 8bd55927aa..0000000000 --- a/samples/server/petstore/nodejs/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "swagger-petstore", - "version": "1.0.0", - "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "main": "index.js", - "scripts": { - "prestart": "npm install", - "start": "node index.js" - }, - "keywords": [ - "openapi-tools" - ], - "license": "Unlicense", - "private": true, - "dependencies": { - "connect": "^3.2.0", - "js-yaml": "^3.3.0", - "swagger-tools": "0.10.1" - } -} diff --git a/samples/server/petstore/nodejs/service/PetService.js b/samples/server/petstore/nodejs/service/PetService.js deleted file mode 100644 index 441e248b27..0000000000 --- a/samples/server/petstore/nodejs/service/PetService.js +++ /dev/null @@ -1,191 +0,0 @@ -'use strict'; - - -/** - * Add a new pet to the store - * - * pet Pet Pet object that needs to be added to the store - * no response value expected for this operation - **/ -exports.addPet = function(pet) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Deletes a pet - * - * petId Long Pet id to delete - * apiUnderscorekey String (optional) - * no response value expected for this operation - **/ -exports.deletePet = function(petId,apiUnderscorekey) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Finds Pets by status - * Multiple status values can be provided with comma separated strings - * - * status List Status values that need to be considered for filter - * returns List - **/ -exports.findPetsByStatus = function(status) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Finds Pets by tags - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * tags List Tags to filter by - * maxCount Integer Maximum number of items to return (optional) - * returns List - **/ -exports.findPetsByTags = function(tags,maxCount) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Find pet by ID - * Returns a single pet - * - * petId Long ID of pet to return - * returns Pet - **/ -exports.getPetById = function(petId) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Update an existing pet - * - * pet Pet Pet object that needs to be added to the store - * no response value expected for this operation - **/ -exports.updatePet = function(pet) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Updates a pet in the store with form data - * - * petId Long ID of pet that needs to be updated - * name String Updated name of the pet (optional) - * status String Updated status of the pet (optional) - * no response value expected for this operation - **/ -exports.updatePetWithForm = function(petId,name,status) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * uploads an image - * - * petId Long ID of pet to update - * additionalMetadata String Additional data to pass to server (optional) - * file File file to upload (optional) - * returns ApiResponse - **/ -exports.uploadFile = function(petId,additionalMetadata,file) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "code" : 0, - "type" : "type", - "message" : "message" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - diff --git a/samples/server/petstore/nodejs/service/StoreService.js b/samples/server/petstore/nodejs/service/StoreService.js deleted file mode 100644 index 50a2768d90..0000000000 --- a/samples/server/petstore/nodejs/service/StoreService.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - - -/** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * orderId String ID of the order that needs to be deleted - * no response value expected for this operation - **/ -exports.deleteOrder = function(orderId) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Returns pet inventories by status - * Returns a map of status codes to quantities - * - * returns Map - **/ -exports.getInventory = function() { - return new Promise(function(resolve, reject) { - var examples = {}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions - * - * orderId Long ID of pet that needs to be fetched - * returns Order - **/ -exports.getOrderById = function(orderId) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Place an order for a pet - * - * order Order order placed for purchasing the pet - * returns Order - **/ -exports.placeOrder = function(order) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - diff --git a/samples/server/petstore/nodejs/service/UserService.js b/samples/server/petstore/nodejs/service/UserService.js deleted file mode 100644 index ae482204a2..0000000000 --- a/samples/server/petstore/nodejs/service/UserService.js +++ /dev/null @@ -1,130 +0,0 @@ -'use strict'; - - -/** - * Create user - * This can only be done by the logged in user. - * - * user User Created user object - * no response value expected for this operation - **/ -exports.createUser = function(user) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Creates list of users with given input array - * - * user List List of user object - * no response value expected for this operation - **/ -exports.createUsersWithArrayInput = function(user) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Creates list of users with given input array - * - * user List List of user object - * no response value expected for this operation - **/ -exports.createUsersWithListInput = function(user) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Delete user - * This can only be done by the logged in user. - * - * username String The name that needs to be deleted - * no response value expected for this operation - **/ -exports.deleteUser = function(username) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Get user by user name - * - * username String The name that needs to be fetched. Use user1 for testing. - * returns User - **/ -exports.getUserByName = function(username) { - return new Promise(function(resolve, reject) { - var examples = {}; - examples['application/json'] = { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" -}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Logs user into the system - * - * username String The user name for login - * password String The password for login in clear text - * returns String - **/ -exports.loginUser = function(username,password) { - return new Promise(function(resolve, reject) { - var examples = {}; - if (Object.keys(examples).length > 0) { - resolve(examples[Object.keys(examples)[0]]); - } else { - resolve(); - } - }); -} - - -/** - * Logs out current logged in user session - * - * no response value expected for this operation - **/ -exports.logoutUser = function() { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - - -/** - * Updated user - * This can only be done by the logged in user. - * - * username String name that need to be deleted - * user User Updated user object - * no response value expected for this operation - **/ -exports.updateUser = function(username,user) { - return new Promise(function(resolve, reject) { - resolve(); - }); -} - diff --git a/samples/server/petstore/nodejs/utils/writer.js b/samples/server/petstore/nodejs/utils/writer.js deleted file mode 100644 index d79f6e1a52..0000000000 --- a/samples/server/petstore/nodejs/utils/writer.js +++ /dev/null @@ -1,43 +0,0 @@ -var ResponsePayload = function(code, payload) { - this.code = code; - this.payload = payload; -} - -exports.respondWithCode = function(code, payload) { - return new ResponsePayload(code, payload); -} - -var writeJson = exports.writeJson = function(response, arg1, arg2) { - var code; - var payload; - - if(arg1 && arg1 instanceof ResponsePayload) { - writeJson(response, arg1.payload, arg1.code); - return; - } - - if(arg2 && Number.isInteger(arg2)) { - code = arg2; - } - else { - if(arg1 && Number.isInteger(arg1)) { - code = arg1; - } - } - if(code && arg1) { - payload = arg1; - } - else if(arg1) { - payload = arg1; - } - - if(!code) { - // if no response code given, we default to 200 - code = 200; - } - if(typeof payload === 'object') { - payload = JSON.stringify(payload, null, 2); - } - response.writeHead(code, {'Content-Type': 'application/json'}); - response.end(payload); -} From 25036e48d5ae47ce44c0116e6c131ad5bffd0b24 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sun, 5 Jan 2020 09:20:56 -0500 Subject: [PATCH 24/82] [scala] Support for Set when array has uniqueItems=true (#4926) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [scala] Set support for unique arrays This includes and builds upon community contribution for better Set support in Scala. It makes property + model work as expected with Set and default values across all Scala generators. Included tests to account for new changes. This also reverts the community contribution to remove ListBuffer imports and change the default for array to ListBuffer. Users should use the instantiation types map to modify the desired array instantiation type. Any new default should target a new minor release after community discussion, as it affects all existing SDKs generated with openapi-generator. * [scala] Improve default handling of monadic collection type * [scala] Regenerate samples * Update ScalaPlayFrameworkServerCodegen.java Scala Play defaulted to List and should continue to do so. Co-authored-by: František Kocun --- .../languages/AbstractKotlinCodegen.java | 4 +- .../languages/AbstractScalaCodegen.java | 62 +- .../languages/ScalaAkkaClientCodegen.java | 3 + .../languages/ScalaGatlingCodegen.java | 1 - .../languages/ScalaHttpClientCodegen.java | 1 - .../languages/ScalaLagomServerCodegen.java | 1 - .../ScalaPlayFrameworkServerCodegen.java | 3 + .../languages/ScalatraServerCodegen.java | 21 +- .../languages/ScalazClientCodegen.java | 4 +- .../codegen/utils/ModelUtils.java | 4 + .../scalaakka/ScalaAkkaClientCodegenTest.java | 54 ++ .../ScalaHttpClientModelTest.java | 54 ++ .../codegen/utils/ModelUtilsTest.java | 24 + .../scala-akka/.openapi-generator/VERSION | 2 +- .../scala-gatling/.openapi-generator/VERSION | 2 +- .../resources/data/loginUser-queryParams.csv | 2 +- .../client/api/UserApiSimulation.scala | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/scala-httpclient/git_push.sh | 16 +- .../scalaz/.openapi-generator/VERSION | 2 +- .../petstore/scalaz/project/build.properties | 2 +- .../.openapi-generator/VERSION | 2 +- .../petstore/scala-lagom-server/README.md | 8 +- .../petstore/scala-lagom-server/build.sbt | 2 +- .../scala/io/swagger/client/api/PetApi.scala | 12 +- .../io/swagger/client/api/StoreApi.scala | 12 +- .../scala/io/swagger/client/api/UserApi.scala | 14 +- .../io/swagger/client/model/ApiResponse.scala | 14 +- .../io/swagger/client/model/Category.scala | 12 +- .../scala/io/swagger/client/model/Order.scala | 12 +- .../scala/io/swagger/client/model/Pet.scala | 12 +- .../scala/io/swagger/client/model/Tag.scala | 12 +- .../scala/io/swagger/client/model/User.scala | 12 +- .../.openapi-generator/VERSION | 2 +- .../petstore/scala-play-server/README.md | 2 +- .../scala-play-server/app/api/PetApi.scala | 2 +- .../app/api/PetApiController.scala | 2 +- .../app/api/PetApiImpl.scala | 2 +- .../scala-play-server/app/api/StoreApi.scala | 2 +- .../app/api/StoreApiController.scala | 2 +- .../app/api/StoreApiImpl.scala | 2 +- .../scala-play-server/app/api/UserApi.scala | 2 +- .../app/api/UserApiController.scala | 2 +- .../app/api/UserApiImpl.scala | 2 +- .../app/model/ApiResponse.scala | 2 +- .../app/model/Category.scala | 2 +- .../scala-play-server/app/model/Order.scala | 2 +- .../scala-play-server/app/model/Pet.scala | 2 +- .../scala-play-server/app/model/Tag.scala | 2 +- .../scala-play-server/app/model/User.scala | 2 +- .../app/org/openapitools/Module.scala | 2 +- .../scala-play-server/public/openapi.json | 878 +++++++++--------- 52 files changed, 757 insertions(+), 547 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index b0227feae1..9c8eb435e5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -426,7 +426,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co additionalProperties.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, getSortParamsByRequiredFlag()); additionalProperties.put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, getSortModelPropertiesByRequiredFlag()); - + additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage()); additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage()); @@ -674,7 +674,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co // TODO: collection type here should be fully qualified namespace to avoid model conflicts // This supports arrays of arrays. String arrayType = typeMapping.get("array"); - if (Boolean.TRUE.equals(arr.getUniqueItems())) { + if (ModelUtils.isSet(arr)) { arrayType = typeMapping.get("set"); } StringBuilder instantiationType = new StringBuilder(arrayType); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java index e0ce0e8c9d..80d17966d5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java @@ -23,9 +23,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -106,6 +104,14 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { "yield" )); + importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); + // although Seq is a predef, before Scala 2.13, it _could_ refer to a mutable Seq in some cases. + importMapping.put("Seq", "scala.collection.immutable.Seq"); + importMapping.put("Set", "scala.collection.immutable.Set"); + importMapping.put("ListSet", "scala.collection.immutable.ListSet"); + + instantiationTypes.put("set", "Set"); + cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC)); @@ -199,7 +205,11 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { @Override public String getSchemaType(Schema p) { String openAPIType = super.getSchemaType(p); - String type = null; + if (ModelUtils.isSet(p)) { + openAPIType = "set"; + } + + String type; if (typeMapping.containsKey(openAPIType)) { type = typeMapping.get(openAPIType); if (languageSpecificPrimitives.contains(type)) { @@ -219,7 +229,7 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); - return instantiationTypes.get("array") + "[" + inner + "]"; + return ( ModelUtils.isSet(ap) ? instantiationTypes.get("set") : instantiationTypes.get("array") ) + "[" + inner + "]"; } else { return null; } @@ -248,7 +258,28 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); - return "new ListBuffer[" + inner + "]() "; + String genericType; + if (ModelUtils.isSet(ap)) { + genericType = instantiationTypes.get("set"); + } else { + genericType = instantiationTypes.get("array"); + } + + // test for immutable Monoids with .empty method for idiomatic defaults + if ("List".equals(genericType) || + "Set".equals(genericType) || + "Seq".equals(genericType) || + "Array".equals(genericType) || + "Vector".equals(genericType) || + "IndexedSeq".equals(genericType) || + "Iterable".equals(genericType) || + "ListSet".equals(genericType) + ) { + return genericType + "[" + inner + "].empty "; + } + + // Assume that any other generic types can be new'd up. + return "new " + genericType + "[" + inner + "]() "; } else if (ModelUtils.isStringSchema(p)) { return null; } else { @@ -256,6 +287,25 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen { } } + /** + * Convert OAS Property object to Codegen Property object + * + * @param name name of the property + * @param p OAS property object + * @return Codegen Property object + */ + @Override + public CodegenProperty fromProperty(String name, Schema p) { + CodegenProperty prop = super.fromProperty(name, p); + if (ModelUtils.isArraySchema(p)) { + ArraySchema as = (ArraySchema) p; + if (ModelUtils.isSet(as)) { + prop.containerType = "set"; + } + } + return prop; + } + @Override public Map postProcessModels(Map objs) { // remove model imports to avoid warnings for importing class in the same package in Scala diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java index a8f4327f9f..749ffeadd4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java @@ -265,6 +265,9 @@ public class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements Code } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); + if (ModelUtils.isSet(ap)) { + return "Set[" + inner + "].empty "; + } return "Seq[" + inner + "].empty "; } else if (ModelUtils.isStringSchema(p)) { return null; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java index 000430d1af..47af557626 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java @@ -151,7 +151,6 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen importMapping.remove("Map"); importMapping.put("Date", "java.util.Date"); - importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); typeMapping = new HashMap(); typeMapping.put("enum", "NSString"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java index 637a5c819c..433519a710 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java @@ -110,7 +110,6 @@ public class ScalaHttpClientCodegen extends AbstractScalaCodegen implements Code importMapping.remove("Map"); importMapping.put("Date", "java.util.Date"); - importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); typeMapping = new HashMap(); typeMapping.put("enum", "NSString"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java index 9b4651e601..2d331b2d31 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java @@ -76,7 +76,6 @@ public class ScalaLagomServerCodegen extends AbstractScalaCodegen implements Cod importMapping.remove("Map"); importMapping.put("DateTime", "org.joda.time.DateTime"); - importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); typeMapping = new HashMap<>(); typeMapping.put("Integer", "Int"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java index 1f02cc989f..22bcbf8f61 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java @@ -348,6 +348,9 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem if (ModelUtils.isArraySchema(p)) { Schema items = ((ArraySchema) p).getItems(); String inner = getSchemaType(items); + if (ModelUtils.isSet(p)) { + return "Set.empty[" + inner + "]"; + } return "List.empty[" + inner + "]"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java index 806157ce87..91176fbf25 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java @@ -63,14 +63,27 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg "Integer", "Long", "Float", - "List", "Set", "Map") ); + typeMapping = new HashMap<>(); + typeMapping.put("array", "List"); + typeMapping.put("set", "Set"); + typeMapping.put("boolean", "Boolean"); + typeMapping.put("string", "String"); + typeMapping.put("int", "Int"); typeMapping.put("integer", "Int"); typeMapping.put("long", "Long"); + typeMapping.put("float", "Float"); + typeMapping.put("byte", "Byte"); + typeMapping.put("short", "Short"); + typeMapping.put("char", "Char"); + typeMapping.put("double", "Double"); + typeMapping.put("object", "Any"); + typeMapping.put("file", "File"); typeMapping.put("binary", "File"); + typeMapping.put("number", "Double"); additionalProperties.put("appName", "OpenAPI Sample"); additionalProperties.put("appDescription", "A sample openapi server"); @@ -95,7 +108,6 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg supportingFiles.add(new SupportingFile("project/plugins.sbt", "project", "plugins.sbt")); supportingFiles.add(new SupportingFile("sbt", "", "sbt")); - instantiationTypes.put("array", "ArrayList"); instantiationTypes.put("map", "HashMap"); importMapping = new HashMap(); @@ -113,6 +125,11 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg importMapping.put("LocalDateTime", "org.joda.time.LocalDateTime"); importMapping.put("LocalDate", "org.joda.time.LocalDate"); importMapping.put("LocalTime", "org.joda.time.LocalTime"); + importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); + importMapping.put("Set", "scala.collection.immutable.Set"); + importMapping.put("ListSet", "scala.collection.immutable.ListSet"); + + instantiationTypes.put("set", "Set"); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java index ec9cd9f2bf..e385ccca20 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java @@ -76,8 +76,6 @@ public class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen importMapping.remove("List"); importMapping.remove("Set"); importMapping.remove("Map"); - - importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer"); // Overrides defaults applied in DefaultCodegen which don't apply cleanly to Scala. importMapping.put("Date", "java.util.Date"); @@ -214,7 +212,7 @@ public class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; String inner = getSchemaType(ap.getItems()); - String collectionType = typeMapping.get("array"); + String collectionType = ModelUtils.isSet(ap) ? typeMapping.get("set") : typeMapping.get("array"); // We assume that users would map these collections to a monoid with an identity function // There's no reason to assume mutable structure here (which may make consumption more difficult) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 89c84256d6..6b02731d12 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -386,6 +386,10 @@ public class ModelUtils { return (schema instanceof ArraySchema); } + public static boolean isSet(Schema schema) { + return ModelUtils.isArraySchema(schema) && Boolean.TRUE.equals(schema.getUniqueItems()); + } + public static boolean isStringSchema(Schema schema) { if (schema instanceof StringSchema || SchemaTypeUtil.STRING_TYPE.equals(schema.getType())) { return true; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalaakka/ScalaAkkaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalaakka/ScalaAkkaClientCodegenTest.java index 9d3c526498..d4e657b5fc 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalaakka/ScalaAkkaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalaakka/ScalaAkkaClientCodegenTest.java @@ -212,6 +212,37 @@ public class ScalaAkkaClientCodegenTest { Assert.assertTrue(property1.isContainer); } + @Test(description = "convert a model with set (unique array) property") + public void complexSetPropertyTest() { + final Schema model = new Schema() + .description("a sample model") + .addProperties("children", new ArraySchema() + .items(new Schema().$ref("#/definitions/Children")) + .uniqueItems(Boolean.TRUE)); + final DefaultCodegen codegen = new ScalaAkkaClientCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "children"); + Assert.assertEquals(property1.complexType, "Children"); + Assert.assertEquals(property1.getter, "getChildren"); + Assert.assertEquals(property1.setter, "setChildren"); + Assert.assertEquals(property1.dataType, "Set[Children]"); + Assert.assertEquals(property1.name, "children"); + Assert.assertEquals(property1.defaultValue, "Set[Children].empty "); + Assert.assertEquals(property1.baseType, "Set"); + Assert.assertEquals(property1.containerType, "set"); + Assert.assertFalse(property1.required); + Assert.assertTrue(property1.isContainer); + } + @Test(description = "convert a model with complex map property") public void complexMapPropertyTest() { final Schema model = new Schema() @@ -258,10 +289,33 @@ public class ScalaAkkaClientCodegenTest { Assert.assertEquals(cm.description, "an array model"); Assert.assertEquals(cm.vars.size(), 0); Assert.assertEquals(cm.parent, "ListBuffer[Children]"); + Assert.assertEquals(cm.arrayModelType, "Children"); Assert.assertEquals(cm.imports.size(), 2); Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ListBuffer", "Children")).size(), 2); } + @Test(description = "convert an array model with unique items to set") + public void arrayAsSetModelTest() { + final Schema schema = new ArraySchema() + .items(new Schema().$ref("#/definitions/Children")) + .description("a set of Children models"); + schema.setUniqueItems(true); + + final DefaultCodegen codegen = new ScalaAkkaClientCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", schema); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a set of Children models"); + Assert.assertEquals(cm.vars.size(), 0); + Assert.assertEquals(cm.parent, "Set[Children]"); + Assert.assertEquals(cm.arrayModelType, "Children"); + Assert.assertEquals(cm.imports.size(), 2); + Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Set", "Children")).size(), 2); + } + @Test(description = "convert a map model") public void mapModelTest() { final Schema model = new Schema() diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalahttpclient/ScalaHttpClientModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalahttpclient/ScalaHttpClientModelTest.java index b3df6a5f81..1b91375a3c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalahttpclient/ScalaHttpClientModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/scalahttpclient/ScalaHttpClientModelTest.java @@ -25,6 +25,7 @@ import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.languages.ScalaAkkaClientCodegen; import org.openapitools.codegen.languages.ScalaHttpClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; @@ -119,6 +120,37 @@ public class ScalaHttpClientModelTest { Assert.assertTrue(property1.isContainer); } + @Test(description = "convert a model with set (unique array) property") + public void complexSetPropertyTest() { + final Schema model = new Schema() + .description("a sample model") + .addProperties("children", new ArraySchema() + .items(new Schema().$ref("#/definitions/Children")) + .uniqueItems(Boolean.TRUE)); + final DefaultCodegen codegen = new ScalaHttpClientCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", model); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a sample model"); + Assert.assertEquals(cm.vars.size(), 1); + + final CodegenProperty property1 = cm.vars.get(0); + Assert.assertEquals(property1.baseName, "children"); + Assert.assertEquals(property1.complexType, "Children"); + Assert.assertEquals(property1.getter, "getChildren"); + Assert.assertEquals(property1.setter, "setChildren"); + Assert.assertEquals(property1.dataType, "Set[Children]"); + Assert.assertEquals(property1.name, "children"); + Assert.assertEquals(property1.defaultValue, "Set[Children].empty "); + Assert.assertEquals(property1.baseType, "Set"); + Assert.assertEquals(property1.containerType, "set"); + Assert.assertFalse(property1.required); + Assert.assertTrue(property1.isContainer); + } + @Test(description = "convert a model with a map property") public void mapPropertyTest() { final Schema model = new Schema() @@ -256,6 +288,28 @@ public class ScalaHttpClientModelTest { Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ListBuffer", "Children")).size(), 2); } + @Test(description = "convert an array model with unique items to set") + public void arrayAsSetModelTest() { + final Schema schema = new ArraySchema() + .items(new Schema().$ref("#/definitions/Children")) + .description("a set of Children models"); + schema.setUniqueItems(true); + + final DefaultCodegen codegen = new ScalaHttpClientCodegen(); + OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); + codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel("sample", schema); + + Assert.assertEquals(cm.name, "sample"); + Assert.assertEquals(cm.classname, "Sample"); + Assert.assertEquals(cm.description, "a set of Children models"); + Assert.assertEquals(cm.vars.size(), 0); + Assert.assertEquals(cm.parent, "Set[Children]"); + Assert.assertEquals(cm.arrayModelType, "Children"); + Assert.assertEquals(cm.imports.size(), 2); + Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Set", "Children")).size(), 2); + } + @Test(description = "convert a map model") public void mapModelTest() { final Schema model = new Schema() diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java index 8e20b035a5..7d4b9f8fb9 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/utils/ModelUtilsTest.java @@ -235,4 +235,28 @@ public class ModelUtilsTest { // Test a null schema Assert.assertFalse(ModelUtils.isFreeFormObject(null)); } + + @Test + public void testIsSetForValidSet() { + ArraySchema as = new ArraySchema() + .items(new StringSchema()); + as.setUniqueItems(true); + + Assert.assertTrue(ModelUtils.isSet(as)); + } + + @Test + public void testIsSetFalseForInvalidSet() { + ArraySchema as = new ArraySchema() + .items(new StringSchema()); + as.setUniqueItems(false); + + Assert.assertFalse(ModelUtils.isSet(as)); + } + + @Test + public void testIsSetFailsForNullSchema() { + ArraySchema as = null; + Assert.assertFalse(ModelUtils.isSet(as)); + } } diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION index 0e97bd19ef..58592f031f 100644 --- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-gatling/.openapi-generator/VERSION b/samples/client/petstore/scala-gatling/.openapi-generator/VERSION index 096bf47efe..58592f031f 100644 --- a/samples/client/petstore/scala-gatling/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-gatling/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-gatling/src/gatling/resources/data/loginUser-queryParams.csv b/samples/client/petstore/scala-gatling/src/gatling/resources/data/loginUser-queryParams.csv index d8bc9aec67..418fd574de 100644 --- a/samples/client/petstore/scala-gatling/src/gatling/resources/data/loginUser-queryParams.csv +++ b/samples/client/petstore/scala-gatling/src/gatling/resources/data/loginUser-queryParams.csv @@ -1 +1 @@ -username,password \ No newline at end of file +password,username \ No newline at end of file diff --git a/samples/client/petstore/scala-gatling/src/gatling/scala/org/openapitools/client/api/UserApiSimulation.scala b/samples/client/petstore/scala-gatling/src/gatling/scala/org/openapitools/client/api/UserApiSimulation.scala index c12112e8b0..6b97d7c049 100644 --- a/samples/client/petstore/scala-gatling/src/gatling/scala/org/openapitools/client/api/UserApiSimulation.scala +++ b/samples/client/petstore/scala-gatling/src/gatling/scala/org/openapitools/client/api/UserApiSimulation.scala @@ -147,8 +147,8 @@ class UserApiSimulation extends Simulation { .feed(loginUserQUERYFeeder) .exec(http("loginUser") .httpRequest("GET","/user/login") - .queryParam("username","${username}") .queryParam("password","${password}") + .queryParam("username","${username}") ) // Run scnloginUser with warm up and reach a constant rate for entire duration diff --git a/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION b/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION index 06b5019af3..58592f031f 100644 --- a/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION +++ b/samples/client/petstore/scala-httpclient/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.1-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scala-httpclient/git_push.sh b/samples/client/petstore/scala-httpclient/git_push.sh index 8442b80bb4..ced3be2b0c 100644 --- a/samples/client/petstore/scala-httpclient/git_push.sh +++ b/samples/client/petstore/scala-httpclient/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -28,7 +34,7 @@ git init # Adds the files in the local repository and stages them for commit. git add . -# Commits the tracked changes and prepares them to be pushed to a remote repository. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/scalaz/.openapi-generator/VERSION b/samples/client/petstore/scalaz/.openapi-generator/VERSION index e4955748d3..58592f031f 100644 --- a/samples/client/petstore/scalaz/.openapi-generator/VERSION +++ b/samples/client/petstore/scalaz/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.2-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/scalaz/project/build.properties b/samples/client/petstore/scalaz/project/build.properties index 64317fdae5..cf19fd026f 100644 --- a/samples/client/petstore/scalaz/project/build.properties +++ b/samples/client/petstore/scalaz/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.15 +sbt.version=0.13.15 \ No newline at end of file diff --git a/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION b/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION index f9f7450d13..58592f031f 100644 --- a/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION +++ b/samples/server/petstore/scala-lagom-server/.openapi-generator/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-lagom-server/README.md b/samples/server/petstore/scala-lagom-server/README.md index 938d7331cb..e80ddccb7e 100644 --- a/samples/server/petstore/scala-lagom-server/README.md +++ b/samples/server/petstore/scala-lagom-server/README.md @@ -1,9 +1,9 @@ -# Swagger generated scala-lagomApi +# OpenAPI generated scala-lagomApi ## Overview -This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the -[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This -is an example of building a swagger-enabled lagon-api. +This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the +[OpenAPI-Spec](https://openapis.org) from a remote server, you can easily generate a server stub. This +is an example of building a OpenAPI-enabled lagon-api. This example uses the [lagomframework](https://www.lagomframework.com) lagomframework. diff --git a/samples/server/petstore/scala-lagom-server/build.sbt b/samples/server/petstore/scala-lagom-server/build.sbt index ea9dd5789f..b6ab43cf17 100644 --- a/samples/server/petstore/scala-lagom-server/build.sbt +++ b/samples/server/petstore/scala-lagom-server/build.sbt @@ -2,7 +2,7 @@ version := "1.0.0" name := "scala-lagom-server" -organization := "io.swagger" +organization := "org.openapitools" scalaVersion := "2.11.8" diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala index 6ee03b22ac..559f0820c4 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala index ff42a995e9..2386c18298 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala index b62b48d875..211db9974b 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/UserApi.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -75,7 +75,7 @@ trait UserApi extends Service { * Get user by user name * * - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. * @return User */ def getUserByName(username: String): ServiceCall[NotUsed ,User] diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala index 884853e5c2..28448672d5 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/ApiResponse.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ @@ -15,7 +15,7 @@ import play.api.libs.json._ case class ApiResponse ( code: Option[Int], - _type: Option[String], + `type`: Option[String], message: Option[String] ) diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala index c50c6e71c6..68f37da0d9 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Category.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala index c79ffb780e..1f86d47b25 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Order.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala index acc6c25afc..56798d01ee 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Pet.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala index 65aa9c628b..8d8da70ff8 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/Tag.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala index b21cd2e7e7..f5de40df36 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/model/User.scala @@ -1,12 +1,12 @@ /** - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io + * The version of the OpenAPI document: 1.0.0 + * * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech * Do not edit the class manually. */ diff --git a/samples/server/petstore/scala-play-server/.openapi-generator/VERSION b/samples/server/petstore/scala-play-server/.openapi-generator/VERSION index afa6365606..58592f031f 100644 --- a/samples/server/petstore/scala-play-server/.openapi-generator/VERSION +++ b/samples/server/petstore/scala-play-server/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/scala-play-server/README.md b/samples/server/petstore/scala-play-server/README.md index 7f34257575..87528aac7f 100644 --- a/samples/server/petstore/scala-play-server/README.md +++ b/samples/server/petstore/scala-play-server/README.md @@ -2,7 +2,7 @@ This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. -This Scala Play Framework project was generated by the OpenAPI generator tool at 2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]. +This Scala Play Framework project was generated by the OpenAPI generator tool at 2020-01-04T23:10:22.106-05:00[America/New_York]. ## API diff --git a/samples/server/petstore/scala-play-server/app/api/PetApi.scala b/samples/server/petstore/scala-play-server/app/api/PetApi.scala index 1f7eaed70b..ec7dc810a4 100644 --- a/samples/server/petstore/scala-play-server/app/api/PetApi.scala +++ b/samples/server/petstore/scala-play-server/app/api/PetApi.scala @@ -4,7 +4,7 @@ import model.ApiResponse import model.Pet import play.api.libs.Files.TemporaryFile -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") trait PetApi { /** * Add a new pet to the store diff --git a/samples/server/petstore/scala-play-server/app/api/PetApiController.scala b/samples/server/petstore/scala-play-server/app/api/PetApiController.scala index 33f0797563..36d5ff287f 100644 --- a/samples/server/petstore/scala-play-server/app/api/PetApiController.scala +++ b/samples/server/petstore/scala-play-server/app/api/PetApiController.scala @@ -8,7 +8,7 @@ import model.ApiResponse import model.Pet import play.api.libs.Files.TemporaryFile -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") @Singleton class PetApiController @Inject()(cc: ControllerComponents, api: PetApi) extends AbstractController(cc) { /** diff --git a/samples/server/petstore/scala-play-server/app/api/PetApiImpl.scala b/samples/server/petstore/scala-play-server/app/api/PetApiImpl.scala index d3a8ea67b1..b5186deba4 100644 --- a/samples/server/petstore/scala-play-server/app/api/PetApiImpl.scala +++ b/samples/server/petstore/scala-play-server/app/api/PetApiImpl.scala @@ -7,7 +7,7 @@ import play.api.libs.Files.TemporaryFile /** * Provides a default implementation for [[PetApi]]. */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") class PetApiImpl extends PetApi { /** * @inheritdoc diff --git a/samples/server/petstore/scala-play-server/app/api/StoreApi.scala b/samples/server/petstore/scala-play-server/app/api/StoreApi.scala index 11ee201126..3197b95ed8 100644 --- a/samples/server/petstore/scala-play-server/app/api/StoreApi.scala +++ b/samples/server/petstore/scala-play-server/app/api/StoreApi.scala @@ -2,7 +2,7 @@ package api import model.Order -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") trait StoreApi { /** * Delete purchase order by ID diff --git a/samples/server/petstore/scala-play-server/app/api/StoreApiController.scala b/samples/server/petstore/scala-play-server/app/api/StoreApiController.scala index 161cf5805c..f36218bd62 100644 --- a/samples/server/petstore/scala-play-server/app/api/StoreApiController.scala +++ b/samples/server/petstore/scala-play-server/app/api/StoreApiController.scala @@ -6,7 +6,7 @@ import play.api.libs.json._ import play.api.mvc._ import model.Order -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") @Singleton class StoreApiController @Inject()(cc: ControllerComponents, api: StoreApi) extends AbstractController(cc) { /** diff --git a/samples/server/petstore/scala-play-server/app/api/StoreApiImpl.scala b/samples/server/petstore/scala-play-server/app/api/StoreApiImpl.scala index 8a996a93e4..efe32363e9 100644 --- a/samples/server/petstore/scala-play-server/app/api/StoreApiImpl.scala +++ b/samples/server/petstore/scala-play-server/app/api/StoreApiImpl.scala @@ -5,7 +5,7 @@ import model.Order /** * Provides a default implementation for [[StoreApi]]. */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") class StoreApiImpl extends StoreApi { /** * @inheritdoc diff --git a/samples/server/petstore/scala-play-server/app/api/UserApi.scala b/samples/server/petstore/scala-play-server/app/api/UserApi.scala index 41b24e8756..df0471d833 100644 --- a/samples/server/petstore/scala-play-server/app/api/UserApi.scala +++ b/samples/server/petstore/scala-play-server/app/api/UserApi.scala @@ -2,7 +2,7 @@ package api import model.User -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") trait UserApi { /** * Create user diff --git a/samples/server/petstore/scala-play-server/app/api/UserApiController.scala b/samples/server/petstore/scala-play-server/app/api/UserApiController.scala index 05550df7c6..2675c44baf 100644 --- a/samples/server/petstore/scala-play-server/app/api/UserApiController.scala +++ b/samples/server/petstore/scala-play-server/app/api/UserApiController.scala @@ -6,7 +6,7 @@ import play.api.libs.json._ import play.api.mvc._ import model.User -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") @Singleton class UserApiController @Inject()(cc: ControllerComponents, api: UserApi) extends AbstractController(cc) { /** diff --git a/samples/server/petstore/scala-play-server/app/api/UserApiImpl.scala b/samples/server/petstore/scala-play-server/app/api/UserApiImpl.scala index 01ce46e98e..b14446f643 100644 --- a/samples/server/petstore/scala-play-server/app/api/UserApiImpl.scala +++ b/samples/server/petstore/scala-play-server/app/api/UserApiImpl.scala @@ -5,7 +5,7 @@ import model.User /** * Provides a default implementation for [[UserApi]]. */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") class UserApiImpl extends UserApi { /** * @inheritdoc diff --git a/samples/server/petstore/scala-play-server/app/model/ApiResponse.scala b/samples/server/petstore/scala-play-server/app/model/ApiResponse.scala index 529462aa08..956360fa5e 100644 --- a/samples/server/petstore/scala-play-server/app/model/ApiResponse.scala +++ b/samples/server/petstore/scala-play-server/app/model/ApiResponse.scala @@ -5,7 +5,7 @@ import play.api.libs.json._ /** * Describes the result of uploading an image resource */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class ApiResponse( code: Option[Int], `type`: Option[String], diff --git a/samples/server/petstore/scala-play-server/app/model/Category.scala b/samples/server/petstore/scala-play-server/app/model/Category.scala index 006c0e561d..120411990f 100644 --- a/samples/server/petstore/scala-play-server/app/model/Category.scala +++ b/samples/server/petstore/scala-play-server/app/model/Category.scala @@ -5,7 +5,7 @@ import play.api.libs.json._ /** * A category for a pet */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class Category( id: Option[Long], name: Option[String] diff --git a/samples/server/petstore/scala-play-server/app/model/Order.scala b/samples/server/petstore/scala-play-server/app/model/Order.scala index b82378a379..c911b7f444 100644 --- a/samples/server/petstore/scala-play-server/app/model/Order.scala +++ b/samples/server/petstore/scala-play-server/app/model/Order.scala @@ -7,7 +7,7 @@ import java.time.OffsetDateTime * An order for a pets from the pet store * @param status Order Status */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class Order( id: Option[Long], petId: Option[Long], diff --git a/samples/server/petstore/scala-play-server/app/model/Pet.scala b/samples/server/petstore/scala-play-server/app/model/Pet.scala index 2079298092..2f50116cd4 100644 --- a/samples/server/petstore/scala-play-server/app/model/Pet.scala +++ b/samples/server/petstore/scala-play-server/app/model/Pet.scala @@ -6,7 +6,7 @@ import play.api.libs.json._ * A pet for sale in the pet store * @param status pet status in the store */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class Pet( id: Option[Long], category: Option[Category], diff --git a/samples/server/petstore/scala-play-server/app/model/Tag.scala b/samples/server/petstore/scala-play-server/app/model/Tag.scala index 2d8a1f21fc..4a20e2acdf 100644 --- a/samples/server/petstore/scala-play-server/app/model/Tag.scala +++ b/samples/server/petstore/scala-play-server/app/model/Tag.scala @@ -5,7 +5,7 @@ import play.api.libs.json._ /** * A tag for a pet */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class Tag( id: Option[Long], name: Option[String] diff --git a/samples/server/petstore/scala-play-server/app/model/User.scala b/samples/server/petstore/scala-play-server/app/model/User.scala index 4d92a101a9..af11a3d3c9 100644 --- a/samples/server/petstore/scala-play-server/app/model/User.scala +++ b/samples/server/petstore/scala-play-server/app/model/User.scala @@ -6,7 +6,7 @@ import play.api.libs.json._ * A User who is purchasing from the pet store * @param userStatus User Status */ -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") case class User( id: Option[Long], username: Option[String], diff --git a/samples/server/petstore/scala-play-server/app/org/openapitools/Module.scala b/samples/server/petstore/scala-play-server/app/org/openapitools/Module.scala index f135171d48..98382284f9 100644 --- a/samples/server/petstore/scala-play-server/app/org/openapitools/Module.scala +++ b/samples/server/petstore/scala-play-server/app/org/openapitools/Module.scala @@ -4,7 +4,7 @@ import api._ import play.api.inject.{Binding, Module => PlayModule} import play.api.{Configuration, Environment} -@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") +@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]") class Module extends PlayModule { override def bindings(environment: Environment, configuration: Configuration): Seq[Binding[_]] = Seq( bind[PetApi].to[PetApiImpl], diff --git a/samples/server/petstore/scala-play-server/public/openapi.json b/samples/server/petstore/scala-play-server/public/openapi.json index 5781506eb9..0ef21458be 100644 --- a/samples/server/petstore/scala-play-server/public/openapi.json +++ b/samples/server/petstore/scala-play-server/public/openapi.json @@ -1,35 +1,32 @@ { "openapi" : "3.0.1", "info" : { - "title" : "OpenAPI Petstore", "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" }, + "title" : "OpenAPI Petstore", "version" : "1.0.0" }, "servers" : [ { "url" : "http://petstore.swagger.io/v2" } ], "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets" + "description" : "Everything about your Pets", + "name" : "pet" }, { - "name" : "store", - "description" : "Access to Petstore orders" + "description" : "Access to Petstore orders", + "name" : "store" }, { - "name" : "user", - "description" : "Operations about user" + "description" : "Operations about user", + "name" : "user" } ], "paths" : { "/pet" : { - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "operationId" : "updatePet", + "post" : { + "operationId" : "addPet", "requestBody" : { - "description" : "Pet object that needs to be added to the store", "content" : { "application/json" : { "schema" : { @@ -42,185 +39,215 @@ } } }, + "description" : "Pet object that needs to be added to the store", + "required" : true + }, + "responses" : { + "405" : { + "content" : { }, + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "Add a new pet to the store", + "tags" : [ "pet" ], + "x-codegen-request-body-name" : "body" + }, + "put" : { + "operationId" : "updatePet", + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Pet" + } + } + }, + "description" : "Pet object that needs to be added to the store", "required" : true }, "responses" : { "400" : { - "description" : "Invalid ID supplied", - "content" : { } + "content" : { }, + "description" : "Invalid ID supplied" }, "404" : { - "description" : "Pet not found", - "content" : { } + "content" : { }, + "description" : "Pet not found" }, "405" : { - "description" : "Validation exception", - "content" : { } + "content" : { }, + "description" : "Validation exception" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] } ], - "x-codegen-request-body-name" : "body" - }, - "post" : { + "summary" : "Update an existing pet", "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "operationId" : "addPet", - "requestBody" : { - "description" : "Pet object that needs to be added to the store", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - }, - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Pet" - } - } - }, - "required" : true - }, - "responses" : { - "405" : { - "description" : "Invalid input", - "content" : { } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], "x-codegen-request-body-name" : "body" } }, "/pet/findByStatus" : { "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", "description" : "Multiple status values can be provided with comma separated strings", "operationId" : "findPetsByStatus", "parameters" : [ { - "name" : "status", - "in" : "query", "description" : "Status values that need to be considered for filter", - "required" : true, - "style" : "form", "explode" : false, + "in" : "query", + "name" : "status", + "required" : true, "schema" : { - "type" : "array", "items" : { - "type" : "string", "default" : "available", - "enum" : [ "available", "pending", "sold" ] - } - } + "enum" : [ "available", "pending", "sold" ], + "type" : "string" + }, + "type" : "array" + }, + "style" : "form" } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } }, "application/json" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid status value", - "content" : { } + "content" : { }, + "description" : "Invalid status value" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "summary" : "Finds Pets by status", + "tags" : [ "pet" ] } }, "/pet/findByTags" : { "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", + "deprecated" : true, "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", "operationId" : "findPetsByTags", "parameters" : [ { - "name" : "tags", - "in" : "query", "description" : "Tags to filter by", - "required" : true, - "style" : "form", "explode" : false, + "in" : "query", + "name" : "tags", + "required" : true, "schema" : { - "type" : "array", "items" : { "type" : "string" - } - } + }, + "type" : "array" + }, + "style" : "form" } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } }, "application/json" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/Pet" - } + }, + "type" : "array" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid tag value", - "content" : { } + "content" : { }, + "description" : "Invalid tag value" } }, - "deprecated" : true, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "summary" : "Finds Pets by tags", + "tags" : [ "pet" ] } }, "/pet/{petId}" : { + "delete" : { + "operationId" : "deletePet", + "parameters" : [ { + "in" : "header", + "name" : "api_key", + "schema" : { + "type" : "string" + } + }, { + "description" : "Pet id to delete", + "in" : "path", + "name" : "petId", + "required" : true, + "schema" : { + "format" : "int64", + "type" : "integer" + } + } ], + "responses" : { + "400" : { + "content" : { }, + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "summary" : "Deletes a pet", + "tags" : [ "pet" ] + }, "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", "description" : "Returns a single pet", "operationId" : "getPetById", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet to return", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -232,33 +259,34 @@ "$ref" : "#/components/schemas/Pet" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid ID supplied", - "content" : { } + "content" : { }, + "description" : "Invalid ID supplied" }, "404" : { - "description" : "Pet not found", - "content" : { } + "content" : { }, + "description" : "Pet not found" } }, "security" : [ { "api_key" : [ ] - } ] + } ], + "summary" : "Find pet by ID", + "tags" : [ "pet" ] }, "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", "operationId" : "updatePetWithForm", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet that needs to be updated", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "requestBody" : { @@ -267,12 +295,12 @@ "schema" : { "properties" : { "name" : { - "type" : "string", - "description" : "Updated name of the pet" + "description" : "Updated name of the pet", + "type" : "string" }, "status" : { - "type" : "string", - "description" : "Updated status of the pet" + "description" : "Updated status of the pet", + "type" : "string" } } } @@ -281,58 +309,28 @@ }, "responses" : { "405" : { - "description" : "Invalid input", - "content" : { } + "content" : { }, + "description" : "Invalid input" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "operationId" : "deletePet", - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "schema" : { - "type" : "string" - } - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } } ], - "responses" : { - "400" : { - "description" : "Invalid pet value", - "content" : { } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + "summary" : "Updates a pet in the store with form data", + "tags" : [ "pet" ] } }, "/pet/{petId}/uploadImage" : { "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", "operationId" : "uploadFile", "parameters" : [ { - "name" : "petId", - "in" : "path", "description" : "ID of pet to update", + "in" : "path", + "name" : "petId", "required" : true, "schema" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" } } ], "requestBody" : { @@ -341,13 +339,13 @@ "schema" : { "properties" : { "additionalMetadata" : { - "type" : "string", - "description" : "Additional data to pass to server" + "description" : "Additional data to pass to server", + "type" : "string" }, "file" : { - "type" : "string", "description" : "file to upload", - "format" : "binary" + "format" : "binary", + "type" : "string" } } } @@ -356,55 +354,54 @@ }, "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ApiResponse" } } - } + }, + "description" : "successful operation" } }, "security" : [ { "petstore_auth" : [ "write:pets", "read:pets" ] - } ] + } ], + "summary" : "uploads an image", + "tags" : [ "pet" ] } }, "/store/inventory" : { "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", "description" : "Returns a map of status codes to quantities", "operationId" : "getInventory", "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/json" : { "schema" : { - "type" : "object", "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } + "format" : "int32", + "type" : "integer" + }, + "type" : "object" } } - } + }, + "description" : "successful operation" } }, "security" : [ { "api_key" : [ ] - } ] + } ], + "summary" : "Returns pet inventories by status", + "tags" : [ "store" ] } }, "/store/order" : { "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", "operationId" : "placeOrder", "requestBody" : { - "description" : "order placed for purchasing the pet", "content" : { "*/*" : { "schema" : { @@ -412,11 +409,11 @@ } } }, + "description" : "order placed for purchasing the pet", "required" : true }, "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -428,69 +425,27 @@ "$ref" : "#/components/schemas/Order" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid Order", - "content" : { } + "content" : { }, + "description" : "Invalid Order" } }, + "summary" : "Place an order for a pet", + "tags" : [ "store" ], "x-codegen-request-body-name" : "body" } }, "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "schema" : { - "maximum" : 5, - "minimum" : 1, - "type" : "integer", - "format" : "int64" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "content" : { - "application/xml" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - }, - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Order" - } - } - } - }, - "400" : { - "description" : "Invalid ID supplied", - "content" : { } - }, - "404" : { - "description" : "Order not found", - "content" : { } - } - } - }, "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", "operationId" : "deleteOrder", "parameters" : [ { - "name" : "orderId", - "in" : "path", "description" : "ID of the order that needs to be deleted", + "in" : "path", + "name" : "orderId", "required" : true, "schema" : { "type" : "string" @@ -498,24 +453,66 @@ } ], "responses" : { "400" : { - "description" : "Invalid ID supplied", - "content" : { } + "content" : { }, + "description" : "Invalid ID supplied" }, "404" : { - "description" : "Order not found", - "content" : { } + "content" : { }, + "description" : "Order not found" } - } + }, + "summary" : "Delete purchase order by ID", + "tags" : [ "store" ] + }, + "get" : { + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "parameters" : [ { + "description" : "ID of pet that needs to be fetched", + "in" : "path", + "name" : "orderId", + "required" : true, + "schema" : { + "format" : "int64", + "maximum" : 5, + "minimum" : 1, + "type" : "integer" + } + } ], + "responses" : { + "200" : { + "content" : { + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Order" + } + }, + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Order" + } + } + }, + "description" : "successful operation" + }, + "400" : { + "content" : { }, + "description" : "Invalid ID supplied" + }, + "404" : { + "content" : { }, + "description" : "Order not found" + } + }, + "summary" : "Find purchase order by ID", + "tags" : [ "store" ] } }, "/user" : { "post" : { - "tags" : [ "user" ], - "summary" : "Create user", "description" : "This can only be done by the logged in user.", "operationId" : "createUser", "requestBody" : { - "description" : "Created user object", "content" : { "*/*" : { "schema" : { @@ -523,90 +520,91 @@ } } }, + "description" : "Created user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } }, + "summary" : "Create user", + "tags" : [ "user" ], "x-codegen-request-body-name" : "body" } }, "/user/createWithArray" : { "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", "operationId" : "createUsersWithArrayInput", "requestBody" : { - "description" : "List of user object", "content" : { "*/*" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/User" - } + }, + "type" : "array" } } }, + "description" : "List of user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } }, + "summary" : "Creates list of users with given input array", + "tags" : [ "user" ], "x-codegen-request-body-name" : "body" } }, "/user/createWithList" : { "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", "operationId" : "createUsersWithListInput", "requestBody" : { - "description" : "List of user object", "content" : { "*/*" : { "schema" : { - "type" : "array", "items" : { "$ref" : "#/components/schemas/User" - } + }, + "type" : "array" } } }, + "description" : "List of user object", "required" : true }, "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } }, + "summary" : "Creates list of users with given input array", + "tags" : [ "user" ], "x-codegen-request-body-name" : "body" } }, "/user/login" : { "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", "operationId" : "loginUser", "parameters" : [ { - "name" : "username", - "in" : "query", "description" : "The user name for login", + "in" : "query", + "name" : "username", "required" : true, "schema" : { "type" : "string" } }, { - "name" : "password", - "in" : "query", "description" : "The password for login in clear text", + "in" : "query", + "name" : "password", "required" : true, "schema" : { "type" : "string" @@ -614,65 +612,90 @@ } ], "responses" : { "200" : { + "content" : { + "application/xml" : { + "schema" : { + "type" : "string" + } + }, + "application/json" : { + "schema" : { + "type" : "string" + } + } + }, "description" : "successful operation", "headers" : { "X-Rate-Limit" : { "description" : "calls per hour allowed by the user", "schema" : { - "type" : "integer", - "format" : "int32" + "format" : "int32", + "type" : "integer" } }, "X-Expires-After" : { "description" : "date in UTC when toekn expires", "schema" : { - "type" : "string", - "format" : "date-time" - } - } - }, - "content" : { - "application/xml" : { - "schema" : { - "type" : "string" - } - }, - "application/json" : { - "schema" : { + "format" : "date-time", "type" : "string" } } } }, "400" : { - "description" : "Invalid username/password supplied", - "content" : { } + "content" : { }, + "description" : "Invalid username/password supplied" } - } + }, + "summary" : "Logs user into the system", + "tags" : [ "user" ] } }, "/user/logout" : { "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", "operationId" : "logoutUser", "responses" : { "default" : { - "description" : "successful operation", - "content" : { } + "content" : { }, + "description" : "successful operation" } - } + }, + "summary" : "Logs out current logged in user session", + "tags" : [ "user" ] } }, "/user/{username}" : { + "delete" : { + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "parameters" : [ { + "description" : "The name that needs to be deleted", + "in" : "path", + "name" : "username", + "required" : true, + "schema" : { + "type" : "string" + } + } ], + "responses" : { + "400" : { + "content" : { }, + "description" : "Invalid username supplied" + }, + "404" : { + "content" : { }, + "description" : "User not found" + } + }, + "summary" : "Delete user", + "tags" : [ "user" ] + }, "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", "operationId" : "getUserByName", "parameters" : [ { - "name" : "username", - "in" : "path", "description" : "The name that needs to be fetched. Use user1 for testing.", + "in" : "path", + "name" : "username", "required" : true, "schema" : { "type" : "string" @@ -680,7 +703,6 @@ } ], "responses" : { "200" : { - "description" : "successful operation", "content" : { "application/xml" : { "schema" : { @@ -692,34 +714,34 @@ "$ref" : "#/components/schemas/User" } } - } + }, + "description" : "successful operation" }, "400" : { - "description" : "Invalid username supplied", - "content" : { } + "content" : { }, + "description" : "Invalid username supplied" }, "404" : { - "description" : "User not found", - "content" : { } + "content" : { }, + "description" : "User not found" } - } + }, + "summary" : "Get user by user name", + "tags" : [ "user" ] }, "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", "description" : "This can only be done by the logged in user.", "operationId" : "updateUser", "parameters" : [ { - "name" : "username", - "in" : "path", "description" : "name that need to be deleted", + "in" : "path", + "name" : "username", "required" : true, "schema" : { "type" : "string" } } ], "requestBody" : { - "description" : "Updated user object", "content" : { "*/*" : { "schema" : { @@ -727,79 +749,28 @@ } } }, + "description" : "Updated user object", "required" : true }, "responses" : { "400" : { - "description" : "Invalid user supplied", - "content" : { } + "content" : { }, + "description" : "Invalid user supplied" }, "404" : { - "description" : "User not found", - "content" : { } + "content" : { }, + "description" : "User not found" } }, - "x-codegen-request-body-name" : "body" - }, - "delete" : { + "summary" : "Updated user", "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied", - "content" : { } - }, - "404" : { - "description" : "User not found", - "content" : { } - } - } + "x-codegen-request-body-name" : "body" } } }, "components" : { "schemas" : { "Order" : { - "title" : "Pet Order", - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, "description" : "An order for a pets from the pet store", "example" : { "petId" : 6, @@ -809,38 +780,76 @@ "complete" : false, "status" : "placed" }, + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "petId" : { + "format" : "int64", + "type" : "integer" + }, + "quantity" : { + "format" : "int32", + "type" : "integer" + }, + "shipDate" : { + "format" : "date-time", + "type" : "string" + }, + "status" : { + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ], + "type" : "string" + }, + "complete" : { + "default" : false, + "type" : "boolean" + } + }, + "title" : "Pet Order", + "type" : "object", "xml" : { "name" : "Order" } }, "Category" : { - "title" : "Pet category", - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, "description" : "A category for a pet", "example" : { "name" : "name", "id" : 6 }, + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet category", + "type" : "object", "xml" : { "name" : "Category" } }, "User" : { - "title" : "a User", - "type" : "object", + "description" : "A User who is purchasing from the pet store", + "example" : { + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }, "properties" : { "id" : { - "type" : "integer", - "format" : "int64" + "format" : "int64", + "type" : "integer" }, "username" : { "type" : "string" @@ -861,89 +870,39 @@ "type" : "string" }, "userStatus" : { - "type" : "integer", "description" : "User Status", - "format" : "int32" + "format" : "int32", + "type" : "integer" } }, - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, + "title" : "a User", + "type" : "object", "xml" : { "name" : "User" } }, "Tag" : { - "title" : "Pet Tag", - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, "description" : "A tag for a pet", "example" : { "name" : "name", "id" : 1 }, + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "type" : "object", "xml" : { "name" : "Tag" } }, "Pet" : { - "title" : "a Pet", - "required" : [ "name", "photoUrls" ], - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/components/schemas/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/components/schemas/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, "description" : "A pet for sale in the pet store", "example" : { "photoUrls" : [ "photoUrls", "photoUrls" ], @@ -962,17 +921,62 @@ } ], "status" : "available" }, + "properties" : { + "id" : { + "format" : "int64", + "type" : "integer" + }, + "category" : { + "$ref" : "#/components/schemas/Category" + }, + "name" : { + "example" : "doggie", + "type" : "string" + }, + "photoUrls" : { + "items" : { + "type" : "string" + }, + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + } + }, + "tags" : { + "items" : { + "$ref" : "#/components/schemas/Tag" + }, + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + } + }, + "status" : { + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ], + "type" : "string" + } + }, + "required" : [ "name", "photoUrls" ], + "title" : "a Pet", + "type" : "object", "xml" : { "name" : "Pet" } }, "ApiResponse" : { - "title" : "An uploaded response", - "type" : "object", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + }, "properties" : { "code" : { - "type" : "integer", - "format" : "int32" + "format" : "int32", + "type" : "integer" }, "type" : { "type" : "string" @@ -981,17 +985,12 @@ "type" : "string" } }, - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } + "title" : "An uploaded response", + "type" : "object" } }, "securitySchemes" : { "petstore_auth" : { - "type" : "oauth2", "flows" : { "implicit" : { "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", @@ -1000,12 +999,13 @@ "read:pets" : "read your pets" } } - } + }, + "type" : "oauth2" }, "api_key" : { - "type" : "apiKey", + "in" : "header", "name" : "api_key", - "in" : "header" + "type" : "apiKey" } } } From c2ee4aefe13448aa16701bdbc5edcb8129a4f22a Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sun, 5 Jan 2020 09:23:04 -0500 Subject: [PATCH 25/82] Initial CODEOWNERS (#4924) --- .github/CODEOWNERS | 30 +++++++++ modules/openapi-generator/.gitignore | 3 - .../src/main/java/config/Config.java | 51 ---------------- .../src/main/java/config/ConfigParser.java | 61 ------------------- 4 files changed, 30 insertions(+), 115 deletions(-) create mode 100644 .github/CODEOWNERS delete mode 100644 modules/openapi-generator/.gitignore delete mode 100644 modules/openapi-generator/src/main/java/config/Config.java delete mode 100644 modules/openapi-generator/src/main/java/config/ConfigParser.java diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..26b750dff4 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,30 @@ +## Core team +modules/openapi-generator/src/main/java/org/openapitools/codegen/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/config/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/**/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/serializer/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/**/*.java @OpenAPITools/generator-core-team +modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/**/*.java @OpenAPITools/generator-core-team +modules/openapi-generator-core/**/* @OpenAPITools/generator-core-team + +# No need for auto-generated subdirectories (reduces noise) +docs/ @OpenAPITools/generator-core-team + +## Individual interests +.github/**/* @jimschubert +scripts/**/* @jimschubert +website/**/* @jimschubert +bin/ci/**/* @jimschubert + +## Bulid related +CI/**/* @OpenAPITools/build +.mvn/**/* @OpenAPITools/build +bin/utils/**/* @OpenAPITools/build + +## Module-specific +modules/openapi-generator-cli/**/* @jimschubert +modules/openapi-generator-gradle-plugin/**/* @jimschubert +modules/openapi-generator-maven-plugin/**/* @jimschubert + diff --git a/modules/openapi-generator/.gitignore b/modules/openapi-generator/.gitignore deleted file mode 100644 index 3e9b4fcd79..0000000000 --- a/modules/openapi-generator/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/.settings/ -/test-output/ -/bin/ diff --git a/modules/openapi-generator/src/main/java/config/Config.java b/modules/openapi-generator/src/main/java/config/Config.java deleted file mode 100644 index c4b1718771..0000000000 --- a/modules/openapi-generator/src/main/java/config/Config.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config; - -import com.google.common.collect.ImmutableMap; - -import java.util.HashMap; -import java.util.Map; - -public class Config { - private Map options; - - public Config() { - this.options = new HashMap(); - } - - public Config(Map properties) { - this.options = properties; - } - - public Map getOptions() { - return ImmutableMap.copyOf(options); - } - - public boolean hasOption(String opt) { - return options.containsKey(opt); - } - - public String getOption(String opt) { - return options.get(opt); - } - - public void setOption(String opt, String value) { - options.put(opt, value); - } -} diff --git a/modules/openapi-generator/src/main/java/config/ConfigParser.java b/modules/openapi-generator/src/main/java/config/ConfigParser.java deleted file mode 100644 index 3c3040faed..0000000000 --- a/modules/openapi-generator/src/main/java/config/ConfigParser.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.util.Iterator; -import java.util.Map; - -public class ConfigParser { - - private static final Logger LOGGER = LoggerFactory.getLogger(ConfigParser.class); - - public static Config read(String location) { - - LOGGER.info("reading config from " + location); - - ObjectMapper mapper = new ObjectMapper(); - - Config config = new Config(); - - try { - JsonNode rootNode = mapper.readTree(new File(location)); - Iterator> optionNodes = rootNode.fields(); - - while (optionNodes.hasNext()) { - Map.Entry optionNode = optionNodes.next(); - - if (optionNode.getValue().isValueNode()) { - config.setOption(optionNode.getKey(), optionNode.getValue().asText()); - } else { - LOGGER.warn("omitting non-value node " + optionNode.getKey()); - } - } - } catch (Exception e) { - LOGGER.error(e.getMessage()); - return null; - } - - return config; - } -} From 79d11d7129f63d87e8d1cfa282a8b6a7b170462b Mon Sep 17 00:00:00 2001 From: Richard Whitehouse Date: Sun, 5 Jan 2020 14:46:09 +0000 Subject: [PATCH 26/82] [Rust Server] Fix panic handling headers (#4877) [Rust Server] Fix panic handling headers If we have an API which has multiple auth types, we may panic. This is because in Hyper 0.11, the following code will panic: ``` use hyper::header::{Authorization, Basic, Bearer, Headers}; fn main() { let mut headers = Headers::default(); let basic = Basic { username: "richard".to_string(), password: None }; headers.set::>(Authorization(basic)); println!("Auth: {:?}", headers.get::>()); } ``` as it mixes up an `Authorization` and `Authorization` as both have `Authorization:` as the header name. This is fixed by using `swagger::SafeHeaders` added in https://github.com/Metaswitch/swagger-rs/pull/90 --- .../main/resources/rust-server/Cargo.mustache | 2 +- .../resources/rust-server/client-mod.mustache | 4 +++- .../rust-server/server-context.mustache | 7 ++++--- .../resources/rust-server/server-mod.mustache | 13 +++++++------ .../rust-server/output/multipart-v3/Cargo.toml | 2 +- .../output/multipart-v3/src/client/mod.rs | 2 ++ .../output/multipart-v3/src/server/context.rs | 1 + .../output/multipart-v3/src/server/mod.rs | 11 ++++++----- .../rust-server/output/openapi-v3/Cargo.toml | 2 +- .../output/openapi-v3/src/client/mod.rs | 8 +++++--- .../output/openapi-v3/src/server/context.rs | 3 ++- .../output/openapi-v3/src/server/mod.rs | 1 + .../rust-server/output/ops-v3/Cargo.toml | 2 +- .../rust-server/output/ops-v3/src/client/mod.rs | 2 ++ .../output/ops-v3/src/server/context.rs | 1 + .../rust-server/output/ops-v3/src/server/mod.rs | 1 + .../Cargo.toml | 2 +- .../src/client/mod.rs | 6 ++++-- .../src/server/context.rs | 7 ++++--- .../src/server/mod.rs | 17 +++++++++-------- .../output/rust-server-test/Cargo.toml | 2 +- .../output/rust-server-test/src/client/mod.rs | 2 ++ .../rust-server-test/src/server/context.rs | 1 + .../output/rust-server-test/src/server/mod.rs | 1 + 24 files changed, 62 insertions(+), 38 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache index cd5ba4fab6..5b03cf9d69 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache @@ -17,7 +17,7 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- # Common chrono = { version = "0.4", features = ["serde"] } futures = "0.1" -swagger = "2" +swagger = "2.2" lazy_static = "1.4" log = "0.3.0" mime = "0.2.6" diff --git a/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache b/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache index bd0f3af3e0..f6176fc5bd 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache @@ -33,6 +33,8 @@ use std::sync::Arc; use std::str; use std::str::FromStr; use std::string::ToString; +use swagger::headers::SafeHeaders; + {{#apiUsesMultipart}} use hyper::mime::Mime; use std::io::Cursor; @@ -478,7 +480,7 @@ impl Api for Client where {{#responses}} {{{code}}} => { {{#headers}} header! { (Response{{{nameInCamelCase}}}, "{{{baseName}}}") => [{{{datatype}}}] } - let response_{{{name}}} = match response.headers().get::() { + let response_{{{name}}} = match response.headers().safe_get::() { Some(response_{{{name}}}) => response_{{{name}}}.0.clone(), None => return Box::new(future::err(ApiError(String::from("Required response header {{{baseName}}} for response {{{code}}} was not found.")))) as Box>, }; diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-context.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-context.mustache index 75b37a6308..103442c5ea 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-context.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-context.mustache @@ -6,6 +6,7 @@ use hyper::{Request, Response, Error, StatusCode}; use server::url::form_urlencoded; use swagger::auth::{Authorization, AuthData, Scopes}; use swagger::{Has, Pop, Push, XSpanIdString}; +use swagger::headers::SafeHeaders; use Api; pub struct NewAddContext @@ -88,7 +89,7 @@ impl hyper::server::Service for AddContext { use hyper::header::{Authorization as HyperAuth, Basic, Bearer}; use std::ops::Deref; - if let Some(basic) = req.headers().get::>().cloned() { + if let Some(basic) = req.headers().safe_get::>() { let auth_data = AuthData::Basic(basic.deref().clone()); let context = context.push(Some(auth_data)); let context = context.push(None::); @@ -100,7 +101,7 @@ impl hyper::server::Service for AddContext { use hyper::header::{Authorization as HyperAuth, Basic, Bearer}; use std::ops::Deref; - if let Some(bearer) = req.headers().get::>().cloned() { + if let Some(bearer) = req.headers().safe_get::>() { let auth_data = AuthData::Bearer(bearer.deref().clone()); let context = context.push(Some(auth_data)); let context = context.push(None::); @@ -112,7 +113,7 @@ impl hyper::server::Service for AddContext {{#isKeyInHeader}} { header! { (ApiKey{{-index}}, "{{{keyParamName}}}") => [String] } - if let Some(header) = req.headers().get::().cloned() { + if let Some(header) = req.headers().safe_get::() { let auth_data = AuthData::ApiKey(header.0); let context = context.push(Some(auth_data)); let context = context.push(None::); diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache index 060b64422b..591609bbbe 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache @@ -45,6 +45,7 @@ use std::collections::BTreeSet; pub use swagger::auth::Authorization; use swagger::{ApiError, XSpanId, XSpanIdString, Has, RequestParser}; use swagger::auth::Scopes; +use swagger::headers::SafeHeaders; use {Api{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}, {{{operationId}}}Response{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} @@ -178,7 +179,7 @@ where {{#vendorExtensions}} {{#consumesMultipart}} let boundary = match multipart_boundary(&headers) { - Some(boundary) => boundary.to_string(), + Some(boundary) => boundary, None => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body("Couldn't find valid multipart body"))), }; {{/consumesMultipart}} @@ -214,7 +215,7 @@ where }; {{/required}} {{^required}} - let param_{{{paramName}}} = headers.get::().map(|header| header.0.clone()); + let param_{{{paramName}}} = headers.safe_get::().map(|header| header.0.clone()); {{/required}} {{/headerParams}} {{#queryParams}} @@ -530,11 +531,11 @@ impl Clone for Service {{#apiUsesMultipart}} /// Utility function to get the multipart boundary marker (if any) from the Headers. -fn multipart_boundary<'a>(headers: &'a Headers) -> Option<&'a str> { - headers.get::().and_then(|content_type| { - let ContentType(ref mime) = *content_type; +fn multipart_boundary(headers: &Headers) -> Option { + headers.safe_get::().and_then(|content_type| { + let ContentType(mime) = content_type; if mime.type_() == hyper::mime::MULTIPART && mime.subtype() == hyper::mime::FORM_DATA { - mime.get_param(hyper::mime::BOUNDARY).map(|x| x.as_str()) + mime.get_param(hyper::mime::BOUNDARY).map(|x| x.as_str().to_string()) } else { None } diff --git a/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml b/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml index 7243310bec..90110b3f1c 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/multipart-v3/Cargo.toml @@ -15,7 +15,7 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- # Common chrono = { version = "0.4", features = ["serde"] } futures = "0.1" -swagger = "2" +swagger = "2.2" lazy_static = "1.4" log = "0.3.0" mime = "0.2.6" diff --git a/samples/server/petstore/rust-server/output/multipart-v3/src/client/mod.rs b/samples/server/petstore/rust-server/output/multipart-v3/src/client/mod.rs index 22d89d8542..45b69c8534 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/multipart-v3/src/client/mod.rs @@ -25,6 +25,8 @@ use std::sync::Arc; use std::str; use std::str::FromStr; use std::string::ToString; +use swagger::headers::SafeHeaders; + use hyper::mime::Mime; use std::io::Cursor; use client::multipart::client::lazy::Multipart; diff --git a/samples/server/petstore/rust-server/output/multipart-v3/src/server/context.rs b/samples/server/petstore/rust-server/output/multipart-v3/src/server/context.rs index 6f2900b3d7..e8fc8922e9 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/src/server/context.rs +++ b/samples/server/petstore/rust-server/output/multipart-v3/src/server/context.rs @@ -6,6 +6,7 @@ use hyper::{Request, Response, Error, StatusCode}; use server::url::form_urlencoded; use swagger::auth::{Authorization, AuthData, Scopes}; use swagger::{Has, Pop, Push, XSpanIdString}; +use swagger::headers::SafeHeaders; use Api; pub struct NewAddContext diff --git a/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs index 4bd030b24d..5748e1aa9b 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/multipart-v3/src/server/mod.rs @@ -35,6 +35,7 @@ use std::collections::BTreeSet; pub use swagger::auth::Authorization; use swagger::{ApiError, XSpanId, XSpanIdString, Has, RequestParser}; use swagger::auth::Scopes; +use swagger::headers::SafeHeaders; use {Api, MultipartRequestPostResponse @@ -123,7 +124,7 @@ where // MultipartRequestPost - POST /multipart_request &hyper::Method::Post if path.matched(paths::ID_MULTIPART_REQUEST) => { let boundary = match multipart_boundary(&headers) { - Some(boundary) => boundary.to_string(), + Some(boundary) => boundary, None => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body("Couldn't find valid multipart body"))), }; // Form Body parameters (note that non-required body parameters will ignore garbage @@ -250,11 +251,11 @@ impl Clone for Service } /// Utility function to get the multipart boundary marker (if any) from the Headers. -fn multipart_boundary<'a>(headers: &'a Headers) -> Option<&'a str> { - headers.get::().and_then(|content_type| { - let ContentType(ref mime) = *content_type; +fn multipart_boundary(headers: &Headers) -> Option { + headers.safe_get::().and_then(|content_type| { + let ContentType(mime) = content_type; if mime.type_() == hyper::mime::MULTIPART && mime.subtype() == hyper::mime::FORM_DATA { - mime.get_param(hyper::mime::BOUNDARY).map(|x| x.as_str()) + mime.get_param(hyper::mime::BOUNDARY).map(|x| x.as_str().to_string()) } else { None } diff --git a/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml b/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml index 846d7d087e..38c0912213 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/openapi-v3/Cargo.toml @@ -15,7 +15,7 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- # Common chrono = { version = "0.4", features = ["serde"] } futures = "0.1" -swagger = "2" +swagger = "2.2" lazy_static = "1.4" log = "0.3.0" mime = "0.2.6" diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/client/mod.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/client/mod.rs index 1fce126e4b..0301284ab1 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/client/mod.rs @@ -25,6 +25,8 @@ use std::sync::Arc; use std::str; use std::str::FromStr; use std::string::ToString; +use swagger::headers::SafeHeaders; + use mimetypes; use serde_json; use serde_xml_rs; @@ -675,7 +677,7 @@ impl Api for Client where match response.status().as_u16() { 200 => { header! { (ResponseSuccessInfo, "Success-Info") => [String] } - let response_success_info = match response.headers().get::() { + let response_success_info = match response.headers().safe_get::() { Some(response_success_info) => response_success_info.0.clone(), None => return Box::new(future::err(ApiError(String::from("Required response header Success-Info for response 200 was not found.")))) as Box>, }; @@ -699,12 +701,12 @@ impl Api for Client where }, 412 => { header! { (ResponseFurtherInfo, "Further-Info") => [String] } - let response_further_info = match response.headers().get::() { + let response_further_info = match response.headers().safe_get::() { Some(response_further_info) => response_further_info.0.clone(), None => return Box::new(future::err(ApiError(String::from("Required response header Further-Info for response 412 was not found.")))) as Box>, }; header! { (ResponseFailureInfo, "Failure-Info") => [String] } - let response_failure_info = match response.headers().get::() { + let response_failure_info = match response.headers().safe_get::() { Some(response_failure_info) => response_failure_info.0.clone(), None => return Box::new(future::err(ApiError(String::from("Required response header Failure-Info for response 412 was not found.")))) as Box>, }; diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/server/context.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/server/context.rs index a377b535b6..3ec7a40825 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/server/context.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/server/context.rs @@ -6,6 +6,7 @@ use hyper::{Request, Response, Error, StatusCode}; use server::url::form_urlencoded; use swagger::auth::{Authorization, AuthData, Scopes}; use swagger::{Has, Pop, Push, XSpanIdString}; +use swagger::headers::SafeHeaders; use Api; pub struct NewAddContext @@ -86,7 +87,7 @@ impl hyper::server::Service for AddContext { use hyper::header::{Authorization as HyperAuth, Basic, Bearer}; use std::ops::Deref; - if let Some(bearer) = req.headers().get::>().cloned() { + if let Some(bearer) = req.headers().safe_get::>() { let auth_data = AuthData::Bearer(bearer.deref().clone()); let context = context.push(Some(auth_data)); let context = context.push(None::); diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs index 4800083b06..9d667a2657 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/server/mod.rs @@ -33,6 +33,7 @@ use std::collections::BTreeSet; pub use swagger::auth::Authorization; use swagger::{ApiError, XSpanId, XSpanIdString, Has, RequestParser}; use swagger::auth::Scopes; +use swagger::headers::SafeHeaders; use {Api, MultigetGetResponse, diff --git a/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml b/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml index 088555ff7e..574d4eae56 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml +++ b/samples/server/petstore/rust-server/output/ops-v3/Cargo.toml @@ -15,7 +15,7 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- # Common chrono = { version = "0.4", features = ["serde"] } futures = "0.1" -swagger = "2" +swagger = "2.2" lazy_static = "1.4" log = "0.3.0" mime = "0.2.6" diff --git a/samples/server/petstore/rust-server/output/ops-v3/src/client/mod.rs b/samples/server/petstore/rust-server/output/ops-v3/src/client/mod.rs index ecb62ede32..f0e1bbe1bf 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/ops-v3/src/client/mod.rs @@ -24,6 +24,8 @@ use std::sync::Arc; use std::str; use std::str::FromStr; use std::string::ToString; +use swagger::headers::SafeHeaders; + use mimetypes; use serde_json; diff --git a/samples/server/petstore/rust-server/output/ops-v3/src/server/context.rs b/samples/server/petstore/rust-server/output/ops-v3/src/server/context.rs index 6f2900b3d7..e8fc8922e9 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/src/server/context.rs +++ b/samples/server/petstore/rust-server/output/ops-v3/src/server/context.rs @@ -6,6 +6,7 @@ use hyper::{Request, Response, Error, StatusCode}; use server::url::form_urlencoded; use swagger::auth::{Authorization, AuthData, Scopes}; use swagger::{Has, Pop, Push, XSpanIdString}; +use swagger::headers::SafeHeaders; use Api; pub struct NewAddContext diff --git a/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs b/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs index 7714591e7c..5d8ed9eb4e 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/ops-v3/src/server/mod.rs @@ -31,6 +31,7 @@ use std::collections::BTreeSet; pub use swagger::auth::Authorization; use swagger::{ApiError, XSpanId, XSpanIdString, Has, RequestParser}; use swagger::auth::Scopes; +use swagger::headers::SafeHeaders; use {Api, Op10GetResponse, diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml index 45332e7a07..0a11b55054 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/Cargo.toml @@ -15,7 +15,7 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- # Common chrono = { version = "0.4", features = ["serde"] } futures = "0.1" -swagger = "2" +swagger = "2.2" lazy_static = "1.4" log = "0.3.0" mime = "0.2.6" diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs index 0684eae45e..9976c76758 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs @@ -27,6 +27,8 @@ use std::sync::Arc; use std::str; use std::str::FromStr; use std::string::ToString; +use swagger::headers::SafeHeaders; + use hyper::mime::Mime; use std::io::Cursor; use client::multipart::client::lazy::Multipart; @@ -2705,12 +2707,12 @@ impl Api for Client where match response.status().as_u16() { 200 => { header! { (ResponseXRateLimit, "X-Rate-Limit") => [i32] } - let response_x_rate_limit = match response.headers().get::() { + let response_x_rate_limit = match response.headers().safe_get::() { Some(response_x_rate_limit) => response_x_rate_limit.0.clone(), None => return Box::new(future::err(ApiError(String::from("Required response header X-Rate-Limit for response 200 was not found.")))) as Box>, }; header! { (ResponseXExpiresAfter, "X-Expires-After") => [chrono::DateTime] } - let response_x_expires_after = match response.headers().get::() { + let response_x_expires_after = match response.headers().safe_get::() { Some(response_x_expires_after) => response_x_expires_after.0.clone(), None => return Box::new(future::err(ApiError(String::from("Required response header X-Expires-After for response 200 was not found.")))) as Box>, }; diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/context.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/context.rs index 010f21f45b..a826bb5ca0 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/context.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/context.rs @@ -6,6 +6,7 @@ use hyper::{Request, Response, Error, StatusCode}; use server::url::form_urlencoded; use swagger::auth::{Authorization, AuthData, Scopes}; use swagger::{Has, Pop, Push, XSpanIdString}; +use swagger::headers::SafeHeaders; use Api; pub struct NewAddContext @@ -85,7 +86,7 @@ impl hyper::server::Service for AddContext { header! { (ApiKey1, "api_key") => [String] } - if let Some(header) = req.headers().get::().cloned() { + if let Some(header) = req.headers().safe_get::() { let auth_data = AuthData::ApiKey(header.0); let context = context.push(Some(auth_data)); let context = context.push(None::); @@ -107,7 +108,7 @@ impl hyper::server::Service for AddContext { use hyper::header::{Authorization as HyperAuth, Basic, Bearer}; use std::ops::Deref; - if let Some(basic) = req.headers().get::>().cloned() { + if let Some(basic) = req.headers().safe_get::>() { let auth_data = AuthData::Basic(basic.deref().clone()); let context = context.push(Some(auth_data)); let context = context.push(None::); @@ -117,7 +118,7 @@ impl hyper::server::Service for AddContext { use hyper::header::{Authorization as HyperAuth, Basic, Bearer}; use std::ops::Deref; - if let Some(bearer) = req.headers().get::>().cloned() { + if let Some(bearer) = req.headers().safe_get::>() { let auth_data = AuthData::Bearer(bearer.deref().clone()); let context = context.push(Some(auth_data)); let context = context.push(None::); diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs index 3f3c511493..79556f3ae9 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs @@ -37,6 +37,7 @@ use std::collections::BTreeSet; pub use swagger::auth::Authorization; use swagger::{ApiError, XSpanId, XSpanIdString, Has, RequestParser}; use swagger::auth::Scopes; +use swagger::headers::SafeHeaders; use {Api, TestSpecialTagsResponse, @@ -752,9 +753,9 @@ where &hyper::Method::Get if path.matched(paths::ID_FAKE) => { // Header parameters header! { (RequestEnumHeaderStringArray, "enum_header_string_array") => (String)* } - let param_enum_header_string_array = headers.get::().map(|header| header.0.clone()); + let param_enum_header_string_array = headers.safe_get::().map(|header| header.0.clone()); header! { (RequestEnumHeaderString, "enum_header_string") => [String] } - let param_enum_header_string = headers.get::().map(|header| header.0.clone()); + let param_enum_header_string = headers.safe_get::().map(|header| header.0.clone()); // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) let query_params = form_urlencoded::parse(uri.query().unwrap_or_default().as_bytes()).collect::>(); let param_enum_query_string_array = query_params.iter().filter(|e| e.0 == "enum_query_string_array").map(|e| e.1.to_owned()) @@ -1132,7 +1133,7 @@ where }; // Header parameters header! { (RequestApiKey, "api_key") => [String] } - let param_api_key = headers.get::().map(|header| header.0.clone()); + let param_api_key = headers.safe_get::().map(|header| header.0.clone()); Box::new({ {{ Box::new(api_impl.delete_pet(param_pet_id, param_api_key, &context) @@ -1614,7 +1615,7 @@ where } } let boundary = match multipart_boundary(&headers) { - Some(boundary) => boundary.to_string(), + Some(boundary) => boundary, None => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body("Couldn't find valid multipart body"))), }; // Path parameters @@ -2489,11 +2490,11 @@ impl Clone for Service } /// Utility function to get the multipart boundary marker (if any) from the Headers. -fn multipart_boundary<'a>(headers: &'a Headers) -> Option<&'a str> { - headers.get::().and_then(|content_type| { - let ContentType(ref mime) = *content_type; +fn multipart_boundary(headers: &Headers) -> Option { + headers.safe_get::().and_then(|content_type| { + let ContentType(mime) = content_type; if mime.type_() == hyper::mime::MULTIPART && mime.subtype() == hyper::mime::FORM_DATA { - mime.get_param(hyper::mime::BOUNDARY).map(|x| x.as_str()) + mime.get_param(hyper::mime::BOUNDARY).map(|x| x.as_str().to_string()) } else { None } diff --git a/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml b/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml index 789fbdc0e1..c239a281ba 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml +++ b/samples/server/petstore/rust-server/output/rust-server-test/Cargo.toml @@ -15,7 +15,7 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk- # Common chrono = { version = "0.4", features = ["serde"] } futures = "0.1" -swagger = "2" +swagger = "2.2" lazy_static = "1.4" log = "0.3.0" mime = "0.2.6" diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs index 762cd4e491..8df289aa97 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/client/mod.rs @@ -24,6 +24,8 @@ use std::sync::Arc; use std::str; use std::str::FromStr; use std::string::ToString; +use swagger::headers::SafeHeaders; + use mimetypes; use serde_json; diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/server/context.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/server/context.rs index 6f2900b3d7..e8fc8922e9 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/server/context.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/server/context.rs @@ -6,6 +6,7 @@ use hyper::{Request, Response, Error, StatusCode}; use server::url::form_urlencoded; use swagger::auth::{Authorization, AuthData, Scopes}; use swagger::{Has, Pop, Push, XSpanIdString}; +use swagger::headers::SafeHeaders; use Api; pub struct NewAddContext diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs index 93d2128128..0c173a4309 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/server/mod.rs @@ -31,6 +31,7 @@ use std::collections::BTreeSet; pub use swagger::auth::Authorization; use swagger::{ApiError, XSpanId, XSpanIdString, Has, RequestParser}; use swagger::auth::Scopes; +use swagger::headers::SafeHeaders; use {Api, DummyGetResponse, From 38185d8558c45b52fbe076c444c341fcb95304eb Mon Sep 17 00:00:00 2001 From: Matt Traynham Date: Sun, 5 Jan 2020 10:10:03 -0500 Subject: [PATCH 27/82] [Kotlin] Correct isInherited flag for Kotlin generators (#4254) * Correct isInherited flag for Kotlin generators * Update Kotlin Client inheritance test to check variables --- .../languages/AbstractKotlinCodegen.java | 19 ++++++- .../languages/KotlinSpringServerCodegen.java | 12 ---- .../kotlin/AbstractKotlinCodegenTest.java | 56 ++++++++++++++++++- 3 files changed, 73 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index 9c8eb435e5..9c6610a350 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -33,7 +33,9 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; +import java.util.stream.Stream; import static org.openapitools.codegen.utils.StringUtils.*; @@ -771,7 +773,22 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co public CodegenModel fromModel(String name, Schema schema) { CodegenModel m = super.fromModel(name, schema); m.optionalVars = m.optionalVars.stream().distinct().collect(Collectors.toList()); - m.allVars.stream().filter(p -> !m.vars.contains(p)).forEach(p -> p.isInherited = true); + // Update allVars/requiredVars/optionalVars with isInherited + // Each of these lists contains elements that are similar, but they are all cloned + // via CodegenModel.removeAllDuplicatedProperty and therefore need to be updated + // separately. + // First find only the parent vars via baseName matching + Map allVarsMap = m.allVars.stream() + .collect(Collectors.toMap(CodegenProperty::getBaseName, Function.identity())); + allVarsMap.keySet() + .removeAll(m.vars.stream().map(CodegenProperty::getBaseName).collect(Collectors.toSet())); + // Update the allVars + allVarsMap.values().forEach(p -> p.isInherited = true); + // Update any other vars (requiredVars, optionalVars) + Stream.of(m.requiredVars, m.optionalVars) + .flatMap(List::stream) + .filter(p -> allVarsMap.containsKey(p.baseName)) + .forEach(p -> p.isInherited = true); return m; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index fa884f1bd2..f5ca516d50 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -617,18 +617,6 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen } } - // Can't figure out the logic in DefaultCodegen but optional vars are getting duplicated when there's - // inheritance involved. Also, isInherited doesn't seem to be getting set properly ¯\_(ツ)_/¯ - @Override - public CodegenModel fromModel(String name, Schema schema) { - CodegenModel m = super.fromModel(name, schema); - - m.optionalVars = m.optionalVars.stream().distinct().collect(Collectors.toList()); - m.allVars.stream().filter(p -> !m.vars.contains(p)).forEach(p -> p.isInherited = true); - - return m; - } - /** * Output the proper model name (capitalized). * In case the name belongs to the TypeSystem it won't be renamed. diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java index 90c8acff52..453409dc3a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java @@ -1,12 +1,25 @@ package org.openapitools.codegen.kotlin; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.ComposedSchema; +import io.swagger.v3.oas.models.media.ObjectSchema; +import io.swagger.v3.oas.models.media.Schema; +import io.swagger.v3.oas.models.media.StringSchema; import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.AbstractKotlinCodegen; import org.testng.Assert; import org.testng.annotations.Test; import java.io.File; +import java.util.HashSet; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; import static org.openapitools.codegen.CodegenConstants.ENUM_PROPERTY_NAMING_TYPE.*; import static org.testng.Assert.*; @@ -197,4 +210,45 @@ public class AbstractKotlinCodegenTest { codegen.processOpts(); Assert.assertFalse((boolean) codegen.additionalProperties().get(CodegenConstants.SERIALIZABLE_MODEL)); } -} \ No newline at end of file + + @Test + public void handleInheritance() { + Schema parent = new ObjectSchema() + .addProperties("a", new StringSchema()) + .addProperties("b", new StringSchema()) + .addRequiredItem("a") + .name("Parent"); + Schema child = new ComposedSchema() + .addAllOfItem(new Schema().$ref("Parent")) + .addAllOfItem(new ObjectSchema() + .addProperties("c", new StringSchema()) + .addProperties("d", new StringSchema()) + .addRequiredItem("c")) + .name("Child"); + OpenAPI openAPI = TestUtils.createOpenAPI(); + openAPI.getComponents().addSchemas(parent.getName(), parent); + openAPI.getComponents().addSchemas(child.getName(), child); + + final DefaultCodegen codegen = new P_AbstractKotlinCodegen(); + codegen.setOpenAPI(openAPI); + + final CodegenModel pm = codegen + .fromModel("Child", child); + Map allVarsMap = pm.allVars.stream() + .collect(Collectors.toMap(CodegenProperty::getBaseName, Function.identity())); + for (CodegenProperty p : pm.requiredVars) { + Assert.assertEquals(allVarsMap.get(p.baseName).isInherited, p.isInherited); + } + Assert.assertEqualsNoOrder( + pm.requiredVars.stream().map(CodegenProperty::getBaseName).toArray(), + new String[] {"a", "c"} + ); + for (CodegenProperty p : pm.optionalVars) { + Assert.assertEquals(allVarsMap.get(p.baseName).isInherited, p.isInherited); + } + Assert.assertEqualsNoOrder( + pm.optionalVars.stream().map(CodegenProperty::getBaseName).toArray(), + new String[] {"b", "d"} + ); + } +} From 9b893ef3c19afd71813d080325a2d9fbbca18175 Mon Sep 17 00:00:00 2001 From: scott dallamura Date: Sun, 5 Jan 2020 10:25:08 -0500 Subject: [PATCH 28/82] [C#] allow customization of generated enum suffixes (#4301) * [C#] allow customization of generated enum suffixes --- docs/generators/aspnetcore.md | 2 + .../codegen/CodegenConstants.java | 6 +++ .../languages/AbstractCSharpCodegen.java | 22 +++++++++- .../languages/AspNetCoreServerCodegen.java | 10 ++++- .../codegen/csharp/CsharpModelEnumTest.java | 44 ++++++++++++++++++- 5 files changed, 79 insertions(+), 5 deletions(-) diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 761ba0f0c4..012b747f2b 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -27,6 +27,8 @@ sidebar_label: aspnetcore |useNewtonsoft|Uses the Newtonsoft JSON library.| |true| |newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0-preview5-19227-01| |useDefaultRouting|Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.| |true| +|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| +|enumValueNameSuffix|Suffix that will be appended to all enum value names.| |Enum| |classModifier|Class Modifier can be empty, abstract| || |operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual| |buildTarget|Target to build an application or library| |program| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index 1c79ee3b1d..1d6a4e9928 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -224,6 +224,12 @@ public class CodegenConstants { public static final String MODEL_NAME_SUFFIX = "modelNameSuffix"; public static final String MODEL_NAME_SUFFIX_DESC = "Suffix that will be appended to all model names."; + public static final String ENUM_NAME_SUFFIX = "enumNameSuffix"; + public static final String ENUM_NAME_SUFFIX_DESC = "Suffix that will be appended to all enum names."; + + public static final String ENUM_VALUE_NAME_SUFFIX = "enumValueNameSuffix"; + public static final String ENUM_VALUE_NAME_SUFFIX_DESC = "Suffix that will be appended to all enum value names."; + public static final String GIT_HOST = "gitHost"; public static final String GIT_HOST_DESC = "Git host, e.g. gitlab.com."; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 0e73bbc50d..6a24895fb7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -62,6 +62,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co protected String packageAuthors = "OpenAPI"; protected String interfacePrefix = "I"; + protected String enumNameSuffix = "Enum"; + protected String enumValueNameSuffix = "Enum"; protected String sourceFolder = "src"; @@ -361,6 +363,14 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co } } + if (additionalProperties().containsKey(CodegenConstants.ENUM_NAME_SUFFIX)) { + setEnumNameSuffix(additionalProperties.get(CodegenConstants.ENUM_NAME_SUFFIX).toString()); + } + + if (additionalProperties().containsKey(CodegenConstants.ENUM_VALUE_NAME_SUFFIX)) { + setEnumValueNameSuffix(additionalProperties.get(CodegenConstants.ENUM_VALUE_NAME_SUFFIX).toString()); + } + // This either updates additionalProperties with the above fixes, or sets the default if the option was not specified. additionalProperties.put(CodegenConstants.INTERFACE_PREFIX, interfacePrefix); } @@ -1003,6 +1013,14 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co this.interfacePrefix = interfacePrefix; } + public void setEnumNameSuffix(final String enumNameSuffix) { + this.enumNameSuffix = enumNameSuffix; + } + + public void setEnumValueNameSuffix(final String enumValueNameSuffix) { + this.enumValueNameSuffix = enumValueNameSuffix; + } + public boolean isSupportNullable() { return supportNullable; } @@ -1040,7 +1058,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co enumName = enumName.replaceFirst("^_", ""); enumName = enumName.replaceFirst("_$", ""); - enumName = camelize(enumName) + "Enum"; + enumName = camelize(enumName) + this.enumValueNameSuffix; if (enumName.matches("\\d.*")) { // starts with number return "_" + enumName; @@ -1051,7 +1069,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co @Override public String toEnumName(CodegenProperty property) { - return sanitizeName(camelize(property.name)) + "Enum"; + return sanitizeName(camelize(property.name)) + this.enumNameSuffix; } public String testPackageName() { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index 8126b4dbb7..91ea06e1a8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -206,11 +206,18 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { "Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+", newtonsoftVersion); - addSwitch(USE_DEFAULT_ROUTING, "Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.", useDefaultRouting); + addOption(CodegenConstants.ENUM_NAME_SUFFIX, + CodegenConstants.ENUM_NAME_SUFFIX_DESC, + enumNameSuffix); + + addOption(CodegenConstants.ENUM_VALUE_NAME_SUFFIX, + CodegenConstants.ENUM_VALUE_NAME_SUFFIX_DESC, + enumValueNameSuffix); + classModifier.addEnum("", "Keep class default with no modifier"); classModifier.addEnum("abstract", "Make class abstract"); classModifier.setDefault(""); @@ -348,7 +355,6 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("Project.nuspec.mustache", packageFolder, packageName + ".nuspec")); } - if (useSwashbuckle) { supportingFiles.add(new SupportingFile("Filters" + File.separator + "BasePathFilter.mustache", packageFolder + File.separator + "Filters", "BasePathFilter.cs")); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java index 081368d0f7..675b1d1bc5 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java @@ -16,15 +16,21 @@ */ package org.openapitools.codegen.csharp; - +import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import org.openapitools.codegen.CodegenModel; +import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.languages.AspNetCoreServerCodegen; import org.openapitools.codegen.languages.CSharpClientCodegen; +import org.testng.Assert; import org.testng.annotations.Test; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; public class CsharpModelEnumTest { @@ -86,4 +92,40 @@ public class CsharpModelEnumTest { Assert.assertTrue(enumVar.isEnum); */ } + + @Test(description = "use default suffixes for enums") + public void useDefaultEnumSuffixes() { + final AspNetCoreServerCodegen codegen = new AspNetCoreServerCodegen(); + + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/petstore.yaml"); + codegen.setOpenAPI(openAPI); + + final Schema petSchema = openAPI.getComponents().getSchemas().get("Pet"); + final CodegenModel cm = codegen.fromModel("Pet", petSchema); + final CodegenProperty statusProperty = cm.vars.get(5); + Assert.assertEquals(statusProperty.name, "Status"); + Assert.assertTrue(statusProperty.isEnum); + Assert.assertEquals(statusProperty.datatypeWithEnum, "StatusEnum"); + + Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "AaaaEnum"); + } + + @Test(description = "use custom suffixes for enums") + public void useCustomEnumSuffixes() { + final AspNetCoreServerCodegen codegen = new AspNetCoreServerCodegen(); + codegen.setEnumNameSuffix("EnumName"); + codegen.setEnumValueNameSuffix("EnumValue"); + + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/petstore.yaml"); + codegen.setOpenAPI(openAPI); + + final Schema petSchema = openAPI.getComponents().getSchemas().get("Pet"); + final CodegenModel cm = codegen.fromModel("Pet", petSchema); + final CodegenProperty statusProperty = cm.vars.get(5); + Assert.assertEquals(statusProperty.name, "Status"); + Assert.assertTrue(statusProperty.isEnum); + Assert.assertEquals(statusProperty.datatypeWithEnum, "StatusEnumName"); + + Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "AaaaEnumValue"); + } } From ec1e9a4c9b88730cac8cdea2d851f82a2104acaa Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sun, 5 Jan 2020 16:18:19 -0500 Subject: [PATCH 29/82] [csharp] enum suffix changes enumValueNameSuffix to enumValueSuffix (#4927) * [csharp] Change enum value suffix name 'enumValueNameSuffix' and 'enumNameSuffix' were introduced in a recent commit. This changes 'enumValueNameSuffix' to 'enumValueSuffix' to better differentiate between the two options. This also adds a caveat to the default description which explains that this flexibility may cause issues when used by client generator. * [csharp][aspnetcore] Regenerate samples --- docs/generators/aspnetcore.md | 2 +- .../codegen/CodegenConstants.java | 4 +- .../languages/AbstractCSharpCodegen.java | 12 +- .../languages/AspNetCoreServerCodegen.java | 6 +- .../codegen/csharp/CsharpModelEnumTest.java | 34 +++- .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNet35/README.md | 2 + .../csharp/OpenAPIClientNet35/docs/BigCat.md | 14 ++ .../OpenAPIClientNet35/docs/BigCatAllOf.md | 13 ++ .../Model/BigCatAllOfTests.cs | 79 ++++++++ .../Model/BigCatTests.cs | 79 ++++++++ .../src/Org.OpenAPITools/Model/Animal.cs | 1 + .../src/Org.OpenAPITools/Model/BigCat.cs | 153 ++++++++++++++ .../src/Org.OpenAPITools/Model/BigCatAllOf.cs | 147 ++++++++++++++ .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNet40/README.md | 2 + .../csharp/OpenAPIClientNet40/docs/BigCat.md | 14 ++ .../OpenAPIClientNet40/docs/BigCatAllOf.md | 13 ++ .../Model/BigCatAllOfTests.cs | 79 ++++++++ .../Model/BigCatTests.cs | 79 ++++++++ .../src/Org.OpenAPITools/Model/Animal.cs | 1 + .../src/Org.OpenAPITools/Model/BigCat.cs | 163 +++++++++++++++ .../src/Org.OpenAPITools/Model/BigCatAllOf.cs | 156 +++++++++++++++ .../src/Org.OpenAPITools/Model/Cat.cs | 10 + .../.openapi-generator/VERSION | 2 +- .../csharp/OpenAPIClientNetStandard/README.md | 2 + .../OpenAPIClientNetStandard/docs/BigCat.md | 14 ++ .../docs/BigCatAllOf.md | 13 ++ .../src/Org.OpenAPITools/Model/Animal.cs | 1 + .../src/Org.OpenAPITools/Model/BigCat.cs | 150 ++++++++++++++ .../src/Org.OpenAPITools/Model/BigCatAllOf.cs | 144 ++++++++++++++ .../.openapi-generator/VERSION | 2 +- .../README.md | 2 + .../docs/BigCat.md | 14 ++ .../docs/BigCatAllOf.md | 13 ++ .../Model/BigCatAllOfTests.cs | 79 ++++++++ .../Model/BigCatTests.cs | 79 ++++++++ .../src/Org.OpenAPITools/Model/Animal.cs | 1 + .../src/Org.OpenAPITools/Model/BigCat.cs | 186 ++++++++++++++++++ .../src/Org.OpenAPITools/Model/BigCatAllOf.cs | 179 +++++++++++++++++ .../src/Org.OpenAPITools/Model/Cat.cs | 10 + .../client/petstore/dart2/openapi/README.md | 52 ++--- .../petstore/dart2/openapi/pubspec.yaml | 3 + .../aspnetcore/.openapi-generator/VERSION | 2 +- 44 files changed, 1965 insertions(+), 50 deletions(-) create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCat.md create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCatAllOf.md create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatTests.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCat.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCatAllOf.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCat.md create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCatAllOf.md create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatTests.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCat.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCatAllOf.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCat.md create mode 100644 samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCatAllOf.md create mode 100644 samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCat.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCatAllOf.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCat.md create mode 100644 samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCatAllOf.md create mode 100644 samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatTests.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCat.cs create mode 100644 samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCatAllOf.cs diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 012b747f2b..dc3db6878b 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -28,7 +28,7 @@ sidebar_label: aspnetcore |newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0-preview5-19227-01| |useDefaultRouting|Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| -|enumValueNameSuffix|Suffix that will be appended to all enum value names.| |Enum| +|enumValueSuffix|Suffix that will be appended to all enum values.| |Enum| |classModifier|Class Modifier can be empty, abstract| || |operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual| |buildTarget|Target to build an application or library| |program| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index 1d6a4e9928..ca990d7fe5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -227,8 +227,8 @@ public class CodegenConstants { public static final String ENUM_NAME_SUFFIX = "enumNameSuffix"; public static final String ENUM_NAME_SUFFIX_DESC = "Suffix that will be appended to all enum names."; - public static final String ENUM_VALUE_NAME_SUFFIX = "enumValueNameSuffix"; - public static final String ENUM_VALUE_NAME_SUFFIX_DESC = "Suffix that will be appended to all enum value names."; + public static final String ENUM_VALUE_SUFFIX = "enumValueSuffix"; + public static final String ENUM_VALUE_SUFFIX_DESC = "Suffix that will be appended to all enum values. Note: For clients this may impact serialization and deserialization of enum values."; public static final String GIT_HOST = "gitHost"; public static final String GIT_HOST_DESC = "Git host, e.g. gitlab.com."; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 6a24895fb7..90e536e575 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -63,7 +63,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co protected String interfacePrefix = "I"; protected String enumNameSuffix = "Enum"; - protected String enumValueNameSuffix = "Enum"; + protected String enumValueSuffix = "Enum"; protected String sourceFolder = "src"; @@ -367,8 +367,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co setEnumNameSuffix(additionalProperties.get(CodegenConstants.ENUM_NAME_SUFFIX).toString()); } - if (additionalProperties().containsKey(CodegenConstants.ENUM_VALUE_NAME_SUFFIX)) { - setEnumValueNameSuffix(additionalProperties.get(CodegenConstants.ENUM_VALUE_NAME_SUFFIX).toString()); + if (additionalProperties().containsKey(CodegenConstants.ENUM_VALUE_SUFFIX)) { + setEnumValueSuffix(additionalProperties.get(CodegenConstants.ENUM_VALUE_SUFFIX).toString()); } // This either updates additionalProperties with the above fixes, or sets the default if the option was not specified. @@ -1017,8 +1017,8 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co this.enumNameSuffix = enumNameSuffix; } - public void setEnumValueNameSuffix(final String enumValueNameSuffix) { - this.enumValueNameSuffix = enumValueNameSuffix; + public void setEnumValueSuffix(final String enumValueSuffix) { + this.enumValueSuffix = enumValueSuffix; } public boolean isSupportNullable() { @@ -1058,7 +1058,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co enumName = enumName.replaceFirst("^_", ""); enumName = enumName.replaceFirst("_$", ""); - enumName = camelize(enumName) + this.enumValueNameSuffix; + enumName = camelize(enumName) + this.enumValueSuffix; if (enumName.matches("\\d.*")) { // starts with number return "_" + enumName; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index 91ea06e1a8..445cfd7bcd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -214,9 +214,9 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { CodegenConstants.ENUM_NAME_SUFFIX_DESC, enumNameSuffix); - addOption(CodegenConstants.ENUM_VALUE_NAME_SUFFIX, - CodegenConstants.ENUM_VALUE_NAME_SUFFIX_DESC, - enumValueNameSuffix); + addOption(CodegenConstants.ENUM_VALUE_SUFFIX, + "Suffix that will be appended to all enum values.", + enumValueSuffix); classModifier.addEnum("", "Keep class default with no modifier"); classModifier.addEnum("abstract", "Make class abstract"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java index 675b1d1bc5..ab611177a1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java @@ -16,6 +16,7 @@ */ package org.openapitools.codegen.csharp; + import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; @@ -30,7 +31,6 @@ import org.testng.annotations.Test; import java.util.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; public class CsharpModelEnumTest { @@ -93,6 +93,25 @@ public class CsharpModelEnumTest { */ } + @Test(description = "use custom suffixes for enums") + public void useCustomEnumSuffixes() { + final AspNetCoreServerCodegen codegen = new AspNetCoreServerCodegen(); + codegen.setEnumNameSuffix("EnumName"); + codegen.setEnumValueSuffix("EnumValue"); + + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/petstore.yaml"); + codegen.setOpenAPI(openAPI); + + final Schema petSchema = openAPI.getComponents().getSchemas().get("Pet"); + final CodegenModel cm = codegen.fromModel("Pet", petSchema); + final CodegenProperty statusProperty = cm.vars.get(5); + Assert.assertEquals(statusProperty.name, "Status"); + Assert.assertTrue(statusProperty.isEnum); + Assert.assertEquals(statusProperty.datatypeWithEnum, "StatusEnumName"); + + Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "AaaaEnumValue"); + } + @Test(description = "use default suffixes for enums") public void useDefaultEnumSuffixes() { final AspNetCoreServerCodegen codegen = new AspNetCoreServerCodegen(); @@ -110,11 +129,11 @@ public class CsharpModelEnumTest { Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "AaaaEnum"); } - @Test(description = "use custom suffixes for enums") - public void useCustomEnumSuffixes() { + @Test(description = "support empty suffixes for enums") + public void useEmptyEnumSuffixes() { final AspNetCoreServerCodegen codegen = new AspNetCoreServerCodegen(); - codegen.setEnumNameSuffix("EnumName"); - codegen.setEnumValueNameSuffix("EnumValue"); + codegen.setEnumNameSuffix(""); + codegen.setEnumValueSuffix(""); OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/petstore.yaml"); codegen.setOpenAPI(openAPI); @@ -124,8 +143,9 @@ public class CsharpModelEnumTest { final CodegenProperty statusProperty = cm.vars.get(5); Assert.assertEquals(statusProperty.name, "Status"); Assert.assertTrue(statusProperty.isEnum); - Assert.assertEquals(statusProperty.datatypeWithEnum, "StatusEnumName"); + Assert.assertEquals(statusProperty.datatypeWithEnum, "Status"); - Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "AaaaEnumValue"); + Assert.assertEquals(codegen.toEnumVarName("Aaaa", ""), "Aaaa"); } + } diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION index c3a2c7076f..58592f031f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md index 7bd9201f88..5f55053b6f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md @@ -159,6 +159,8 @@ Class | Method | HTTP request | Description - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Model.ArrayTest](docs/ArrayTest.md) + - [Model.BigCat](docs/BigCat.md) + - [Model.BigCatAllOf](docs/BigCatAllOf.md) - [Model.Capitalization](docs/Capitalization.md) - [Model.Cat](docs/Cat.md) - [Model.CatAllOf](docs/CatAllOf.md) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCat.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCat.md new file mode 100644 index 0000000000..6247107ab3 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCat.md @@ -0,0 +1,14 @@ + +# Org.OpenAPITools.Model.BigCat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Declawed** | **bool** | | [optional] +**Kind** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCatAllOf.md new file mode 100644 index 0000000000..864c2298e0 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCatAllOf.md @@ -0,0 +1,13 @@ + +# Org.OpenAPITools.Model.BigCatAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs new file mode 100644 index 0000000000..4cbdb4b8a5 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs @@ -0,0 +1,79 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test +{ + /// + /// Class for testing BigCatAllOf + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BigCatAllOfTests + { + // TODO uncomment below to declare an instance variable for BigCatAllOf + //private BigCatAllOf instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of BigCatAllOf + //instance = new BigCatAllOf(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of BigCatAllOf + /// + [Test] + public void BigCatAllOfInstanceTest() + { + // TODO uncomment below to test "IsInstanceOf" BigCatAllOf + //Assert.IsInstanceOf(typeof(BigCatAllOf), instance); + } + + + /// + /// Test the property 'Kind' + /// + [Test] + public void KindTest() + { + // TODO unit test for the property 'Kind' + } + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatTests.cs new file mode 100644 index 0000000000..1d78ea9f1e --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatTests.cs @@ -0,0 +1,79 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test +{ + /// + /// Class for testing BigCat + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BigCatTests + { + // TODO uncomment below to declare an instance variable for BigCat + //private BigCat instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of BigCat + //instance = new BigCat(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of BigCat + /// + [Test] + public void BigCatInstanceTest() + { + // TODO uncomment below to test "IsInstanceOf" BigCat + //Assert.IsInstanceOf(typeof(BigCat), instance); + } + + + /// + /// Test the property 'Kind' + /// + [Test] + public void KindTest() + { + // TODO unit test for the property 'Kind' + } + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs index 5068caf52d..464ee255eb 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs @@ -32,6 +32,7 @@ namespace Org.OpenAPITools.Model [JsonConverter(typeof(JsonSubtypes), "ClassName")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] + [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] public partial class Animal : IEquatable { /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCat.cs new file mode 100644 index 0000000000..7d09fc34c5 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCat.cs @@ -0,0 +1,153 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; + +namespace Org.OpenAPITools.Model +{ + /// + /// BigCat + /// + [DataContract] + public partial class BigCat : Cat, IEquatable + { + /// + /// Defines Kind + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KindEnum + { + /// + /// Enum Lions for value: lions + /// + [EnumMember(Value = "lions")] + Lions = 1, + + /// + /// Enum Tigers for value: tigers + /// + [EnumMember(Value = "tigers")] + Tigers = 2, + + /// + /// Enum Leopards for value: leopards + /// + [EnumMember(Value = "leopards")] + Leopards = 3, + + /// + /// Enum Jaguars for value: jaguars + /// + [EnumMember(Value = "jaguars")] + Jaguars = 4 + + } + + /// + /// Gets or Sets Kind + /// + [DataMember(Name="kind", EmitDefaultValue=false)] + public KindEnum? Kind { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BigCat() { } + /// + /// Initializes a new instance of the class. + /// + /// kind. + public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed) + { + this.Kind = kind; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BigCat {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Kind: ").Append(Kind).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BigCat); + } + + /// + /// Returns true if BigCat instances are equal + /// + /// Instance of BigCat to be compared + /// Boolean + public bool Equals(BigCat input) + { + if (input == null) + return false; + + return base.Equals(input) && + ( + this.Kind == input.Kind || + (this.Kind != null && + this.Kind.Equals(input.Kind)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Kind != null) + hashCode = hashCode * 59 + this.Kind.GetHashCode(); + return hashCode; + } + } + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCatAllOf.cs new file mode 100644 index 0000000000..0438df1a7a --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCatAllOf.cs @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; + +namespace Org.OpenAPITools.Model +{ + /// + /// BigCatAllOf + /// + [DataContract] + public partial class BigCatAllOf : IEquatable + { + /// + /// Defines Kind + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KindEnum + { + /// + /// Enum Lions for value: lions + /// + [EnumMember(Value = "lions")] + Lions = 1, + + /// + /// Enum Tigers for value: tigers + /// + [EnumMember(Value = "tigers")] + Tigers = 2, + + /// + /// Enum Leopards for value: leopards + /// + [EnumMember(Value = "leopards")] + Leopards = 3, + + /// + /// Enum Jaguars for value: jaguars + /// + [EnumMember(Value = "jaguars")] + Jaguars = 4 + + } + + /// + /// Gets or Sets Kind + /// + [DataMember(Name="kind", EmitDefaultValue=false)] + public KindEnum? Kind { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// kind. + public BigCatAllOf(KindEnum? kind = default(KindEnum?)) + { + this.Kind = kind; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BigCatAllOf {\n"); + sb.Append(" Kind: ").Append(Kind).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BigCatAllOf); + } + + /// + /// Returns true if BigCatAllOf instances are equal + /// + /// Instance of BigCatAllOf to be compared + /// Boolean + public bool Equals(BigCatAllOf input) + { + if (input == null) + return false; + + return + ( + this.Kind == input.Kind || + (this.Kind != null && + this.Kind.Equals(input.Kind)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Kind != null) + hashCode = hashCode * 59 + this.Kind.GetHashCode(); + return hashCode; + } + } + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION index c3a2c7076f..58592f031f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md index 7bd9201f88..5f55053b6f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md @@ -159,6 +159,8 @@ Class | Method | HTTP request | Description - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Model.ArrayTest](docs/ArrayTest.md) + - [Model.BigCat](docs/BigCat.md) + - [Model.BigCatAllOf](docs/BigCatAllOf.md) - [Model.Capitalization](docs/Capitalization.md) - [Model.Cat](docs/Cat.md) - [Model.CatAllOf](docs/CatAllOf.md) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCat.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCat.md new file mode 100644 index 0000000000..6247107ab3 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCat.md @@ -0,0 +1,14 @@ + +# Org.OpenAPITools.Model.BigCat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Declawed** | **bool** | | [optional] +**Kind** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCatAllOf.md new file mode 100644 index 0000000000..864c2298e0 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCatAllOf.md @@ -0,0 +1,13 @@ + +# Org.OpenAPITools.Model.BigCatAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs new file mode 100644 index 0000000000..4cbdb4b8a5 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs @@ -0,0 +1,79 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test +{ + /// + /// Class for testing BigCatAllOf + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BigCatAllOfTests + { + // TODO uncomment below to declare an instance variable for BigCatAllOf + //private BigCatAllOf instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of BigCatAllOf + //instance = new BigCatAllOf(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of BigCatAllOf + /// + [Test] + public void BigCatAllOfInstanceTest() + { + // TODO uncomment below to test "IsInstanceOf" BigCatAllOf + //Assert.IsInstanceOf(typeof(BigCatAllOf), instance); + } + + + /// + /// Test the property 'Kind' + /// + [Test] + public void KindTest() + { + // TODO unit test for the property 'Kind' + } + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatTests.cs new file mode 100644 index 0000000000..1d78ea9f1e --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatTests.cs @@ -0,0 +1,79 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test +{ + /// + /// Class for testing BigCat + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BigCatTests + { + // TODO uncomment below to declare an instance variable for BigCat + //private BigCat instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of BigCat + //instance = new BigCat(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of BigCat + /// + [Test] + public void BigCatInstanceTest() + { + // TODO uncomment below to test "IsInstanceOf" BigCat + //Assert.IsInstanceOf(typeof(BigCat), instance); + } + + + /// + /// Test the property 'Kind' + /// + [Test] + public void KindTest() + { + // TODO unit test for the property 'Kind' + } + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs index d158ed573a..eb9b58f207 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs @@ -32,6 +32,7 @@ namespace Org.OpenAPITools.Model [JsonConverter(typeof(JsonSubtypes), "ClassName")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] + [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] public partial class Animal : IEquatable, IValidatableObject { /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCat.cs new file mode 100644 index 0000000000..ffdab926c3 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCat.cs @@ -0,0 +1,163 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; + +namespace Org.OpenAPITools.Model +{ + /// + /// BigCat + /// + [DataContract] + public partial class BigCat : Cat, IEquatable, IValidatableObject + { + /// + /// Defines Kind + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KindEnum + { + /// + /// Enum Lions for value: lions + /// + [EnumMember(Value = "lions")] + Lions = 1, + + /// + /// Enum Tigers for value: tigers + /// + [EnumMember(Value = "tigers")] + Tigers = 2, + + /// + /// Enum Leopards for value: leopards + /// + [EnumMember(Value = "leopards")] + Leopards = 3, + + /// + /// Enum Jaguars for value: jaguars + /// + [EnumMember(Value = "jaguars")] + Jaguars = 4 + + } + + /// + /// Gets or Sets Kind + /// + [DataMember(Name="kind", EmitDefaultValue=false)] + public KindEnum? Kind { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BigCat() { } + /// + /// Initializes a new instance of the class. + /// + /// kind. + public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed) + { + this.Kind = kind; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BigCat {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Kind: ").Append(Kind).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BigCat); + } + + /// + /// Returns true if BigCat instances are equal + /// + /// Instance of BigCat to be compared + /// Boolean + public bool Equals(BigCat input) + { + if (input == null) + return false; + + return base.Equals(input) && + ( + this.Kind == input.Kind || + (this.Kind != null && + this.Kind.Equals(input.Kind)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Kind != null) + hashCode = hashCode * 59 + this.Kind.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCatAllOf.cs new file mode 100644 index 0000000000..79871b557b --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCatAllOf.cs @@ -0,0 +1,156 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; + +namespace Org.OpenAPITools.Model +{ + /// + /// BigCatAllOf + /// + [DataContract] + public partial class BigCatAllOf : IEquatable, IValidatableObject + { + /// + /// Defines Kind + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KindEnum + { + /// + /// Enum Lions for value: lions + /// + [EnumMember(Value = "lions")] + Lions = 1, + + /// + /// Enum Tigers for value: tigers + /// + [EnumMember(Value = "tigers")] + Tigers = 2, + + /// + /// Enum Leopards for value: leopards + /// + [EnumMember(Value = "leopards")] + Leopards = 3, + + /// + /// Enum Jaguars for value: jaguars + /// + [EnumMember(Value = "jaguars")] + Jaguars = 4 + + } + + /// + /// Gets or Sets Kind + /// + [DataMember(Name="kind", EmitDefaultValue=false)] + public KindEnum? Kind { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// kind. + public BigCatAllOf(KindEnum? kind = default(KindEnum?)) + { + this.Kind = kind; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BigCatAllOf {\n"); + sb.Append(" Kind: ").Append(Kind).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BigCatAllOf); + } + + /// + /// Returns true if BigCatAllOf instances are equal + /// + /// Instance of BigCatAllOf to be compared + /// Boolean + public bool Equals(BigCatAllOf input) + { + if (input == null) + return false; + + return + ( + this.Kind == input.Kind || + (this.Kind != null && + this.Kind.Equals(input.Kind)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Kind != null) + hashCode = hashCode * 59 + this.Kind.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Cat.cs index 1c28fb2755..42674c5ffc 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Cat.cs @@ -122,6 +122,16 @@ namespace Org.OpenAPITools.Model /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach(var x in base.BaseValidate(validationContext)) yield return x; yield break; diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION index c3a2c7076f..58592f031f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md index a5bb974627..87280d665a 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md @@ -135,6 +135,8 @@ Class | Method | HTTP request | Description - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Model.ArrayTest](docs/ArrayTest.md) + - [Model.BigCat](docs/BigCat.md) + - [Model.BigCatAllOf](docs/BigCatAllOf.md) - [Model.Capitalization](docs/Capitalization.md) - [Model.Cat](docs/Cat.md) - [Model.CatAllOf](docs/CatAllOf.md) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCat.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCat.md new file mode 100644 index 0000000000..6247107ab3 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCat.md @@ -0,0 +1,14 @@ + +# Org.OpenAPITools.Model.BigCat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Declawed** | **bool** | | [optional] +**Kind** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCatAllOf.md new file mode 100644 index 0000000000..864c2298e0 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCatAllOf.md @@ -0,0 +1,13 @@ + +# Org.OpenAPITools.Model.BigCatAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs index 7f63524790..1f209ecbc1 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs @@ -30,6 +30,7 @@ namespace Org.OpenAPITools.Model [JsonConverter(typeof(JsonSubtypes), "ClassName")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] + [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] public partial class Animal : IEquatable { /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCat.cs new file mode 100644 index 0000000000..0b09a9d1a3 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCat.cs @@ -0,0 +1,150 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; + +namespace Org.OpenAPITools.Model +{ + /// + /// BigCat + /// + [DataContract] + public partial class BigCat : Cat, IEquatable + { + /// + /// Defines Kind + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KindEnum + { + /// + /// Enum Lions for value: lions + /// + [EnumMember(Value = "lions")] + Lions = 1, + + /// + /// Enum Tigers for value: tigers + /// + [EnumMember(Value = "tigers")] + Tigers = 2, + + /// + /// Enum Leopards for value: leopards + /// + [EnumMember(Value = "leopards")] + Leopards = 3, + + /// + /// Enum Jaguars for value: jaguars + /// + [EnumMember(Value = "jaguars")] + Jaguars = 4 + + } + + /// + /// Gets or Sets Kind + /// + [DataMember(Name="kind", EmitDefaultValue=false)] + public KindEnum? Kind { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BigCat() { } + /// + /// Initializes a new instance of the class. + /// + /// kind. + public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed) + { + this.Kind = kind; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BigCat {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Kind: ").Append(Kind).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BigCat); + } + + /// + /// Returns true if BigCat instances are equal + /// + /// Instance of BigCat to be compared + /// Boolean + public bool Equals(BigCat input) + { + if (input == null) + return false; + + return base.Equals(input) && + ( + this.Kind == input.Kind || + (this.Kind != null && + this.Kind.Equals(input.Kind)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Kind != null) + hashCode = hashCode * 59 + this.Kind.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCatAllOf.cs new file mode 100644 index 0000000000..f0b9775277 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCatAllOf.cs @@ -0,0 +1,144 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; + +namespace Org.OpenAPITools.Model +{ + /// + /// BigCatAllOf + /// + [DataContract] + public partial class BigCatAllOf : IEquatable + { + /// + /// Defines Kind + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KindEnum + { + /// + /// Enum Lions for value: lions + /// + [EnumMember(Value = "lions")] + Lions = 1, + + /// + /// Enum Tigers for value: tigers + /// + [EnumMember(Value = "tigers")] + Tigers = 2, + + /// + /// Enum Leopards for value: leopards + /// + [EnumMember(Value = "leopards")] + Leopards = 3, + + /// + /// Enum Jaguars for value: jaguars + /// + [EnumMember(Value = "jaguars")] + Jaguars = 4 + + } + + /// + /// Gets or Sets Kind + /// + [DataMember(Name="kind", EmitDefaultValue=false)] + public KindEnum? Kind { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// kind. + public BigCatAllOf(KindEnum? kind = default(KindEnum?)) + { + this.Kind = kind; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BigCatAllOf {\n"); + sb.Append(" Kind: ").Append(Kind).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BigCatAllOf); + } + + /// + /// Returns true if BigCatAllOf instances are equal + /// + /// Instance of BigCatAllOf to be compared + /// Boolean + public bool Equals(BigCatAllOf input) + { + if (input == null) + return false; + + return + ( + this.Kind == input.Kind || + (this.Kind != null && + this.Kind.Equals(input.Kind)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Kind != null) + hashCode = hashCode * 59 + this.Kind.GetHashCode(); + return hashCode; + } + } + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION index c3a2c7076f..58592f031f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION @@ -1 +1 @@ -4.2.0-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md index 7bd9201f88..5f55053b6f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md @@ -159,6 +159,8 @@ Class | Method | HTTP request | Description - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [Model.ArrayTest](docs/ArrayTest.md) + - [Model.BigCat](docs/BigCat.md) + - [Model.BigCatAllOf](docs/BigCatAllOf.md) - [Model.Capitalization](docs/Capitalization.md) - [Model.Cat](docs/Cat.md) - [Model.CatAllOf](docs/CatAllOf.md) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCat.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCat.md new file mode 100644 index 0000000000..6247107ab3 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCat.md @@ -0,0 +1,14 @@ + +# Org.OpenAPITools.Model.BigCat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Declawed** | **bool** | | [optional] +**Kind** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCatAllOf.md new file mode 100644 index 0000000000..864c2298e0 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCatAllOf.md @@ -0,0 +1,13 @@ + +# Org.OpenAPITools.Model.BigCatAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs new file mode 100644 index 0000000000..4cbdb4b8a5 --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs @@ -0,0 +1,79 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test +{ + /// + /// Class for testing BigCatAllOf + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BigCatAllOfTests + { + // TODO uncomment below to declare an instance variable for BigCatAllOf + //private BigCatAllOf instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of BigCatAllOf + //instance = new BigCatAllOf(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of BigCatAllOf + /// + [Test] + public void BigCatAllOfInstanceTest() + { + // TODO uncomment below to test "IsInstanceOf" BigCatAllOf + //Assert.IsInstanceOf(typeof(BigCatAllOf), instance); + } + + + /// + /// Test the property 'Kind' + /// + [Test] + public void KindTest() + { + // TODO unit test for the property 'Kind' + } + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatTests.cs new file mode 100644 index 0000000000..1d78ea9f1e --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatTests.cs @@ -0,0 +1,79 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Model; +using Org.OpenAPITools.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Test +{ + /// + /// Class for testing BigCat + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class BigCatTests + { + // TODO uncomment below to declare an instance variable for BigCat + //private BigCat instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of BigCat + //instance = new BigCat(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of BigCat + /// + [Test] + public void BigCatInstanceTest() + { + // TODO uncomment below to test "IsInstanceOf" BigCat + //Assert.IsInstanceOf(typeof(BigCat), instance); + } + + + /// + /// Test the property 'Kind' + /// + [Test] + public void KindTest() + { + // TODO unit test for the property 'Kind' + } + + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs index f89e68c527..2180878c9c 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs @@ -34,6 +34,7 @@ namespace Org.OpenAPITools.Model [JsonConverter(typeof(JsonSubtypes), "ClassName")] [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] + [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] [ImplementPropertyChanged] public partial class Animal : IEquatable, IValidatableObject { diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCat.cs new file mode 100644 index 0000000000..af701bbc6f --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCat.cs @@ -0,0 +1,186 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using PropertyChanged; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; + +namespace Org.OpenAPITools.Model +{ + /// + /// BigCat + /// + [DataContract] + [ImplementPropertyChanged] + public partial class BigCat : Cat, IEquatable, IValidatableObject + { + /// + /// Defines Kind + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KindEnum + { + /// + /// Enum Lions for value: lions + /// + [EnumMember(Value = "lions")] + Lions = 1, + + /// + /// Enum Tigers for value: tigers + /// + [EnumMember(Value = "tigers")] + Tigers = 2, + + /// + /// Enum Leopards for value: leopards + /// + [EnumMember(Value = "leopards")] + Leopards = 3, + + /// + /// Enum Jaguars for value: jaguars + /// + [EnumMember(Value = "jaguars")] + Jaguars = 4 + + } + + /// + /// Gets or Sets Kind + /// + [DataMember(Name="kind", EmitDefaultValue=true)] + public KindEnum? Kind { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected BigCat() { } + /// + /// Initializes a new instance of the class. + /// + /// kind. + public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed) + { + this.Kind = kind; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BigCat {\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" Kind: ").Append(Kind).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BigCat); + } + + /// + /// Returns true if BigCat instances are equal + /// + /// Instance of BigCat to be compared + /// Boolean + public bool Equals(BigCat input) + { + if (input == null) + return false; + + return base.Equals(input) && + ( + this.Kind == input.Kind || + (this.Kind != null && + this.Kind.Equals(input.Kind)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = base.GetHashCode(); + if (this.Kind != null) + hashCode = hashCode * 59 + this.Kind.GetHashCode(); + return hashCode; + } + } + + /// + /// Property changed event handler + /// + public event PropertyChangedEventHandler PropertyChanged; + + /// + /// Trigger when a property changed + /// + /// Property Name + public virtual void OnPropertyChanged(string propertyName) + { + // NOTE: property changed is handled via "code weaving" using Fody. + // Properties with setters are modified at compile time to notify of changes. + var propertyChanged = PropertyChanged; + if (propertyChanged != null) + { + propertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + foreach(var x in base.BaseValidate(validationContext)) yield return x; + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCatAllOf.cs new file mode 100644 index 0000000000..f99b5aceba --- /dev/null +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCatAllOf.cs @@ -0,0 +1,179 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using PropertyChanged; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; + +namespace Org.OpenAPITools.Model +{ + /// + /// BigCatAllOf + /// + [DataContract] + [ImplementPropertyChanged] + public partial class BigCatAllOf : IEquatable, IValidatableObject + { + /// + /// Defines Kind + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum KindEnum + { + /// + /// Enum Lions for value: lions + /// + [EnumMember(Value = "lions")] + Lions = 1, + + /// + /// Enum Tigers for value: tigers + /// + [EnumMember(Value = "tigers")] + Tigers = 2, + + /// + /// Enum Leopards for value: leopards + /// + [EnumMember(Value = "leopards")] + Leopards = 3, + + /// + /// Enum Jaguars for value: jaguars + /// + [EnumMember(Value = "jaguars")] + Jaguars = 4 + + } + + /// + /// Gets or Sets Kind + /// + [DataMember(Name="kind", EmitDefaultValue=true)] + public KindEnum? Kind { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// kind. + public BigCatAllOf(KindEnum? kind = default(KindEnum?)) + { + this.Kind = kind; + } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class BigCatAllOf {\n"); + sb.Append(" Kind: ").Append(Kind).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as BigCatAllOf); + } + + /// + /// Returns true if BigCatAllOf instances are equal + /// + /// Instance of BigCatAllOf to be compared + /// Boolean + public bool Equals(BigCatAllOf input) + { + if (input == null) + return false; + + return + ( + this.Kind == input.Kind || + (this.Kind != null && + this.Kind.Equals(input.Kind)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Kind != null) + hashCode = hashCode * 59 + this.Kind.GetHashCode(); + return hashCode; + } + } + + /// + /// Property changed event handler + /// + public event PropertyChangedEventHandler PropertyChanged; + + /// + /// Trigger when a property changed + /// + /// Property Name + public virtual void OnPropertyChanged(string propertyName) + { + // NOTE: property changed is handled via "code weaving" using Fody. + // Properties with setters are modified at compile time to notify of changes. + var propertyChanged = PropertyChanged; + if (propertyChanged != null) + { + propertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs index 0a3fe2a67f..364ef5df0d 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs @@ -145,6 +145,16 @@ namespace Org.OpenAPITools.Model /// Validation context /// Validation Result IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { foreach(var x in base.BaseValidate(validationContext)) yield return x; yield break; diff --git a/samples/client/petstore/dart2/openapi/README.md b/samples/client/petstore/dart2/openapi/README.md index a32c667b4e..1cf4ca28f0 100644 --- a/samples/client/petstore/dart2/openapi/README.md +++ b/samples/client/petstore/dart2/openapi/README.md @@ -59,36 +59,36 @@ All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*PetApi* | [**addPet**](docs//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](docs//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](docs//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](docs//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](docs//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](docs//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](docs//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](docs//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](docs//StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID -*StoreApi* | [**getInventory**](docs//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](docs//StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID -*StoreApi* | [**placeOrder**](docs//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**createUser**](docs//UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](docs//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](docs//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](docs//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**getUserByName**](docs//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](docs//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](docs//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](docs//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user +*PetApi* | [**addPet**](doc//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](doc//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](doc//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](doc//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](doc//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](doc//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](doc//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](doc//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](doc//StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](doc//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](doc//StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](doc//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](doc//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](doc//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](doc//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](doc//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](doc//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user ## Documentation For Models - - [ApiResponse](docs//ApiResponse.md) - - [Category](docs//Category.md) - - [Order](docs//Order.md) - - [Pet](docs//Pet.md) - - [Tag](docs//Tag.md) - - [User](docs//User.md) + - [ApiResponse](doc//ApiResponse.md) + - [Category](doc//Category.md) + - [Order](doc//Order.md) + - [Pet](doc//Pet.md) + - [Tag](doc//Tag.md) + - [User](doc//User.md) ## Documentation For Authorization diff --git a/samples/client/petstore/dart2/openapi/pubspec.yaml b/samples/client/petstore/dart2/openapi/pubspec.yaml index be7bf663b8..58c44ac9eb 100644 --- a/samples/client/petstore/dart2/openapi/pubspec.yaml +++ b/samples/client/petstore/dart2/openapi/pubspec.yaml @@ -1,6 +1,9 @@ name: openapi version: 1.0.0 description: OpenAPI API client +authors: + - Author +homepage: homepage environment: sdk: '>=2.0.0 <3.0.0' dependencies: diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION index 0e97bd19ef..58592f031f 100644 --- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION +++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.3-SNAPSHOT \ No newline at end of file +4.2.3-SNAPSHOT \ No newline at end of file From d51354783f8bac382d5e8f3f1c4ed38f5ad73af4 Mon Sep 17 00:00:00 2001 From: Ryan N Johnson Date: Mon, 6 Jan 2020 09:09:56 +0000 Subject: [PATCH 30/82] Add RequestFile to typescript-node model template (#4903) RequestFile is defined in the [api-all.mustache template](https://github.com/OpenAPITools/openapi-generator/blob/ac4ead9e7805d4dc89d791376539496a57c49df7/modules/openapi-generator/src/main/resources/typescript-node/api-all.mustache#L29), and it gets used [as a special case](https://github.com/OpenAPITools/openapi-generator/blob/ac4ead9e7805d4dc89d791376539496a57c49df7/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java#L92) [in the model.mustache template](https://github.com/OpenAPITools/openapi-generator/blob/ac4ead9e7805d4dc89d791376539496a57c49df7/modules/openapi-generator/src/main/resources/typescript-node/model.mustache#L21). When this special case is triggered and `RequestFile` is used in a model file, Typescript complains that the type is not found. ``` TSError: Unable to compile TypeScript: path/to/model.ts:15:16 - error TS2304: Cannot find name 'RequestFile'. 15 'myFile'?: RequestFile; ~~~~~~~~~~~ ``` This solution is to import `RequestFile` by adding it to the model template. Here is an openapi schema that would trigger this use-case: ```yaml openapi: 3.0.0 components: schemas: IUploadMyFileBody: type: object properties: myFile: type: string format: binary ``` --- .../src/main/resources/typescript-node/model.mustache | 1 + .../client/petstore/typescript-node/default/model/apiResponse.ts | 1 + .../client/petstore/typescript-node/default/model/category.ts | 1 + samples/client/petstore/typescript-node/default/model/order.ts | 1 + samples/client/petstore/typescript-node/default/model/pet.ts | 1 + samples/client/petstore/typescript-node/default/model/tag.ts | 1 + samples/client/petstore/typescript-node/default/model/user.ts | 1 + samples/client/petstore/typescript-node/npm/model/apiResponse.ts | 1 + samples/client/petstore/typescript-node/npm/model/category.ts | 1 + samples/client/petstore/typescript-node/npm/model/order.ts | 1 + samples/client/petstore/typescript-node/npm/model/pet.ts | 1 + samples/client/petstore/typescript-node/npm/model/tag.ts | 1 + samples/client/petstore/typescript-node/npm/model/user.ts | 1 + 13 files changed, 13 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/typescript-node/model.mustache b/modules/openapi-generator/src/main/resources/typescript-node/model.mustache index c3b8119ec6..521bce34d7 100644 --- a/modules/openapi-generator/src/main/resources/typescript-node/model.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-node/model.mustache @@ -1,6 +1,7 @@ {{>licenseInfo}} {{#models}} {{#model}} +import { RequestFile } from '../api'; {{#tsImports}} import { {{classname}} } from '{{filename}}'; {{/tsImports}} diff --git a/samples/client/petstore/typescript-node/default/model/apiResponse.ts b/samples/client/petstore/typescript-node/default/model/apiResponse.ts index 6db6f9b977..ae84669a84 100644 --- a/samples/client/petstore/typescript-node/default/model/apiResponse.ts +++ b/samples/client/petstore/typescript-node/default/model/apiResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; /** * Describes the result of uploading an image resource diff --git a/samples/client/petstore/typescript-node/default/model/category.ts b/samples/client/petstore/typescript-node/default/model/category.ts index 0669499c9f..1babd0fd22 100644 --- a/samples/client/petstore/typescript-node/default/model/category.ts +++ b/samples/client/petstore/typescript-node/default/model/category.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; /** * A category for a pet diff --git a/samples/client/petstore/typescript-node/default/model/order.ts b/samples/client/petstore/typescript-node/default/model/order.ts index 04d5cd5596..1ee3ea280c 100644 --- a/samples/client/petstore/typescript-node/default/model/order.ts +++ b/samples/client/petstore/typescript-node/default/model/order.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; /** * An order for a pets from the pet store diff --git a/samples/client/petstore/typescript-node/default/model/pet.ts b/samples/client/petstore/typescript-node/default/model/pet.ts index e886df8d45..141c4ebc17 100644 --- a/samples/client/petstore/typescript-node/default/model/pet.ts +++ b/samples/client/petstore/typescript-node/default/model/pet.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; import { Category } from './category'; import { Tag } from './tag'; diff --git a/samples/client/petstore/typescript-node/default/model/tag.ts b/samples/client/petstore/typescript-node/default/model/tag.ts index 5c828c76b5..96e644974e 100644 --- a/samples/client/petstore/typescript-node/default/model/tag.ts +++ b/samples/client/petstore/typescript-node/default/model/tag.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; /** * A tag for a pet diff --git a/samples/client/petstore/typescript-node/default/model/user.ts b/samples/client/petstore/typescript-node/default/model/user.ts index 88d15c25f8..62b0b64368 100644 --- a/samples/client/petstore/typescript-node/default/model/user.ts +++ b/samples/client/petstore/typescript-node/default/model/user.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; /** * A User who is purchasing from the pet store diff --git a/samples/client/petstore/typescript-node/npm/model/apiResponse.ts b/samples/client/petstore/typescript-node/npm/model/apiResponse.ts index 6db6f9b977..ae84669a84 100644 --- a/samples/client/petstore/typescript-node/npm/model/apiResponse.ts +++ b/samples/client/petstore/typescript-node/npm/model/apiResponse.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; /** * Describes the result of uploading an image resource diff --git a/samples/client/petstore/typescript-node/npm/model/category.ts b/samples/client/petstore/typescript-node/npm/model/category.ts index 0669499c9f..1babd0fd22 100644 --- a/samples/client/petstore/typescript-node/npm/model/category.ts +++ b/samples/client/petstore/typescript-node/npm/model/category.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; /** * A category for a pet diff --git a/samples/client/petstore/typescript-node/npm/model/order.ts b/samples/client/petstore/typescript-node/npm/model/order.ts index 04d5cd5596..1ee3ea280c 100644 --- a/samples/client/petstore/typescript-node/npm/model/order.ts +++ b/samples/client/petstore/typescript-node/npm/model/order.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; /** * An order for a pets from the pet store diff --git a/samples/client/petstore/typescript-node/npm/model/pet.ts b/samples/client/petstore/typescript-node/npm/model/pet.ts index e886df8d45..141c4ebc17 100644 --- a/samples/client/petstore/typescript-node/npm/model/pet.ts +++ b/samples/client/petstore/typescript-node/npm/model/pet.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; import { Category } from './category'; import { Tag } from './tag'; diff --git a/samples/client/petstore/typescript-node/npm/model/tag.ts b/samples/client/petstore/typescript-node/npm/model/tag.ts index 5c828c76b5..96e644974e 100644 --- a/samples/client/petstore/typescript-node/npm/model/tag.ts +++ b/samples/client/petstore/typescript-node/npm/model/tag.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; /** * A tag for a pet diff --git a/samples/client/petstore/typescript-node/npm/model/user.ts b/samples/client/petstore/typescript-node/npm/model/user.ts index 88d15c25f8..62b0b64368 100644 --- a/samples/client/petstore/typescript-node/npm/model/user.ts +++ b/samples/client/petstore/typescript-node/npm/model/user.ts @@ -10,6 +10,7 @@ * Do not edit the class manually. */ +import { RequestFile } from '../api'; /** * A User who is purchasing from the pet store From e23f2aa6aa8fa7914eb3598372b588690fb557f4 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Tue, 7 Jan 2020 13:33:58 -0500 Subject: [PATCH 31/82] [cli] Full config help details (#4928) * [cli] Dump additional generator info via config-help (plain text) * [cli] Dump additional generator info via config-help (markdown) --- .../openapitools/codegen/cmd/ConfigHelp.java | 252 +++++++++++++++--- 1 file changed, 216 insertions(+), 36 deletions(-) diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java index dfd9296eef..3033560fca 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java @@ -30,19 +30,21 @@ import org.slf4j.LoggerFactory; import java.io.*; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; +import java.util.Locale; import java.util.Map; import static org.apache.commons.lang3.StringEscapeUtils.escapeHtml4; import static org.apache.commons.lang3.StringUtils.isEmpty; +@SuppressWarnings("unused") @Command(name = "config-help", description = "Config help for chosen lang") public class ConfigHelp implements Runnable { private static final Logger LOGGER = LoggerFactory.getLogger(Generate.class); - public static final String FORMAT_TEXT = "text"; - public static final String FORMAT_MARKDOWN = "markdown"; - public static final String FORMAT_YAMLSAMPLE = "yamlsample"; + private static final String FORMAT_TEXT = "text"; + private static final String FORMAT_MARKDOWN = "markdown"; + private static final String FORMAT_YAMLSAMPLE = "yamlsample"; @Option(name = {"-g", "--generator-name"}, title = "generator name", description = "generator to get config help for") @@ -61,18 +63,41 @@ public class ConfigHelp implements Runnable { FORMAT_TEXT, FORMAT_MARKDOWN, FORMAT_YAMLSAMPLE}) private String format; + @Option(name = {"--import-mappings"}, title = "import mappings", description = "displays the default import mappings (types and aliases, and what imports they will pull into the template)") + private Boolean importMappings; + + @Option(name = {"--language-specific-primitive"}, title = "language specific primitives", description = "displays the language specific primitives (types which require no additional imports, or which may conflict with user defined model names)") + private Boolean languageSpecificPrimitives; + + @Option(name = {"--reserved-words"}, title = "language specific reserved words", description = "displays the reserved words which may result in renamed model or property names") + private Boolean reservedWords; + + @Option(name = {"--instantiation-types"}, title = "instantiation types", description = "displays types used to instantiate simple type/alias names") + private Boolean instantiationTypes; + @Option(name = { "--markdown-header"}, title = "markdown header", description = "When format=markdown, include this option to write out markdown headers (e.g. for docusaurus).") private Boolean markdownHeader; + @Option(name = {"--full-details"}, title = "full generator details", description = "displays CLI options as well as other configs/mappings (implies --instantiation-types, --reserved-words, --language-specific-primitives, --import-mappings, --supporting-files)") + private Boolean fullDetails; + private String newline = System.lineSeparator(); - @Override public void run() { + @Override + public void run() { if (isEmpty(generatorName)) { LOGGER.error("[error] A generator name (--generator-name / -g) is required."); System.exit(1); } + if (Boolean.TRUE.equals(fullDetails)) { + instantiationTypes = Boolean.TRUE; + reservedWords = Boolean.TRUE; + languageSpecificPrimitives = Boolean.TRUE; + importMappings = Boolean.TRUE; + } + try { StringBuilder sb = new StringBuilder(); CodegenConfig config = CodegenConfigLoader.forName(generatorName); @@ -97,9 +122,9 @@ public class ConfigHelp implements Runnable { if (!isEmpty(outputFile)) { File out = Paths.get(outputFile).toFile(); - //noinspection ResultOfMethodCallIgnored File parentFolder = out.getParentFile(); if (parentFolder != null && parentFolder.isDirectory()) { + //noinspection ResultOfMethodCallIgnored parentFolder.mkdirs(); } @@ -119,34 +144,6 @@ public class ConfigHelp implements Runnable { } } - private void generateYamlSample(StringBuilder sb, CodegenConfig config) { - - for (CliOption langCliOption : config.cliOptions()) { - - sb.append("# Description: ").append(langCliOption.getDescription()).append(newline); - - Map enums = langCliOption.getEnum(); - if (enums != null) { - sb.append("# Available Values:").append(newline); - - for (Map.Entry entry : enums.entrySet()) { - sb.append("# ").append(entry.getKey()).append(newline); - sb.append("# ").append(entry.getValue()).append(newline); - } - } - - String defaultValue = langCliOption.getDefault(); - - if (defaultValue != null) { - sb.append(langCliOption.getOpt()).append(": ").append(defaultValue).append(newline); - } else { - sb.append("# ").append(langCliOption.getOpt()).append(": ").append(newline); - } - - sb.append(newline); - } - } - private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) { if (Boolean.TRUE.equals(markdownHeader)) { sb.append("---").append(newline); @@ -197,6 +194,91 @@ public class ConfigHelp implements Runnable { sb.append(newline); } + + + if (Boolean.TRUE.equals(importMappings)) { + sb.append(newline); + sb.append("## IMPORT MAPPING"); + sb.append(newline); + sb.append(newline); + + sb.append("| Type/Alias | Imports |").append(newline); + sb.append("| ---------- | ------- |").append(newline); + + config.importMapping().forEach((key, value)-> { + sb.append("|").append(escapeHtml4(key)).append("|").append(escapeHtml4(value)).append("|"); + sb.append(newline); + }); + + sb.append(newline); + } + + if (Boolean.TRUE.equals(instantiationTypes)) { + sb.append(newline); + sb.append("## INSTANTIATION TYPES"); + sb.append(newline); + sb.append(newline); + + sb.append("| Type/Alias | Instantiated By |").append(newline); + sb.append("| ---------- | --------------- |").append(newline); + + config.instantiationTypes().forEach((key, value)-> { + sb.append("|").append(escapeHtml4(key)).append("|").append(escapeHtml4(value)).append("|"); + sb.append(newline); + }); + + sb.append(newline); + } + + if (Boolean.TRUE.equals(languageSpecificPrimitives)) { + sb.append(newline); + sb.append("## LANGUAGE PRIMITIVES"); + sb.append(newline); + sb.append(newline); + sb.append("
    "); + config.languageSpecificPrimitives().forEach(s -> sb.append("
  • ").append(escapeHtml4(s)).append("
  • ").append(newline)); + sb.append("
"); + sb.append(newline); + } + + if (Boolean.TRUE.equals(reservedWords)) { + sb.append(newline); + sb.append("## RESERVED WORDS"); + sb.append(newline); + sb.append(newline); + sb.append("
    "); + config.reservedWords().forEach(s -> sb.append("
  • ").append(escapeHtml4(s)).append("
  • ").append(newline)); + sb.append("
"); + sb.append(newline); + } + } + + private void generateYamlSample(StringBuilder sb, CodegenConfig config) { + + for (CliOption langCliOption : config.cliOptions()) { + + sb.append("# Description: ").append(langCliOption.getDescription()).append(newline); + + Map enums = langCliOption.getEnum(); + if (enums != null) { + sb.append("# Available Values:").append(newline); + + for (Map.Entry entry : enums.entrySet()) { + sb.append("# ").append(entry.getKey()).append(newline); + sb.append("# ").append(entry.getValue()).append(newline); + } + } + + String defaultValue = langCliOption.getDefault(); + + if (defaultValue != null) { + sb.append(langCliOption.getOpt()).append(": ").append(defaultValue).append(newline); + } else { + sb.append("# ").append(langCliOption.getOpt()).append(": ").append(newline); + } + + sb.append(newline); + } } private void generatePlainTextHelp(StringBuilder sb, CodegenConfig config) { @@ -207,14 +289,112 @@ public class ConfigHelp implements Runnable { } sb.append(newline); + sb.append(newline); + + String optIndent = "\t"; + String optNestedIndent = "\t "; for (CliOption langCliOption : config.cliOptions()) { - sb.append("\t").append(langCliOption.getOpt()); + sb.append(optIndent).append(langCliOption.getOpt()); sb.append(newline); - sb.append("\t ").append(langCliOption.getOptionHelp() - .replaceAll("\n", System.lineSeparator() + "\t ")); + sb.append(optNestedIndent).append(langCliOption.getOptionHelp() + .replaceAll("\n", System.lineSeparator() + optNestedIndent)); sb.append(newline); sb.append(newline); } + + if (Boolean.TRUE.equals(importMappings)) { + sb.append(newline); + sb.append("IMPORT MAPPING"); + sb.append(newline); + sb.append(newline); + Map map = config.importMapping(); + writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "Type/Alias", "Imports"); + sb.append(newline); + } + + if (Boolean.TRUE.equals(instantiationTypes)) { + sb.append(newline); + sb.append("INSTANTIATION TYPES"); + sb.append(newline); + sb.append(newline); + Map map = config.instantiationTypes(); + writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "Type/Alias", "Instantiated By"); + sb.append(newline); + } + + if (Boolean.TRUE.equals(languageSpecificPrimitives)) { + sb.append(newline); + sb.append("LANGUAGE PRIMITIVES"); + sb.append(newline); + sb.append(newline); + String[] arr = config.languageSpecificPrimitives().stream().sorted().toArray(String[]::new); + writePlainTextFromArray(sb, arr, optIndent); + sb.append(newline); + } + + if (Boolean.TRUE.equals(reservedWords)) { + sb.append(newline); + sb.append("RESERVED WORDS"); + sb.append(newline); + sb.append(newline); + String[] arr = config.reservedWords().stream().sorted().toArray(String[]::new); + writePlainTextFromArray(sb, arr, optIndent); + sb.append(newline); + } + } + + private void writePlainTextFromMap( + StringBuilder sb, + Map map, + String optIndent, + String optNestedIndent, + @SuppressWarnings("SameParameterValue") String keyHeader, + String valueHeader) { + if (map != null && map.size() > 0) { + int maxKey = keyHeader.length(); + int maxValue = valueHeader.length(); + + for (Map.Entry entry : map.entrySet()) { + String k = entry.getKey(); + String v = entry.getValue(); + maxKey = Math.max(maxKey, k.length()); + maxValue = Math.max(maxValue, v.length()); + } + + String format = "%-" + maxKey + "s\t%-" + maxValue + "s"; + sb.append(optIndent).append(String.format(Locale.ROOT, format, keyHeader, valueHeader)); + sb.append(newline); + sb.append(optIndent).append(String.format(Locale.ROOT, format, StringUtils.repeat("-", maxKey), StringUtils.repeat("-", maxValue))); + map.forEach((key, value) -> { + sb.append(newline); + sb.append(optIndent).append(String.format(Locale.ROOT, format, key, value)); + }); + } else { + sb.append(optIndent).append("None"); + } + } + + private void writePlainTextFromArray(StringBuilder sb, String[] arr, String optIndent) { + if (arr.length > 0) { + // target a width of 20, then take the max up to 40. + int width = 20; + for (String s : arr) { + width = Math.max(width, Math.min(40, s.length())); + } + + // do three columns if possible (assume terminal width ~90), otherwise do two columns. + int columns = width < 30 ? 3 : 2; + String format = "%-" + (90 / columns) + "s"; + for (int i = 0; i < arr.length; i++) { + String current = arr[i]; + sb.append(optIndent).append(String.format(Locale.ROOT, format, current)); + if (i % columns == 0) { + sb.append(newline); + } + } + } else { + sb.append(optIndent).append("None"); + } } } From c27a6ed2bf29169e70e2ea01d7463906a0aac1df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Wed, 8 Jan 2020 14:30:36 +0100 Subject: [PATCH 32/82] [jaxrs-spec][quarkus] update to version 1.1.1.Final (#4935) * [java][quarkus] update to version 1.1.0.Final * [java][quarkus] update to version 1.1.1.Final --- .../spec/libraries/quarkus/Dockerfile.jvm.mustache | 13 ++++++++----- .../quarkus/application.properties.mustache | 1 + .../JavaJaxRS/spec/libraries/quarkus/pom.mustache | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache index 08c75ecbaa..5c0779580f 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/Dockerfile.jvm.mustache @@ -14,18 +14,21 @@ # docker run -i --rm -p 8080:8080 quarkus/{{artifactId}}-jvm # ### -FROM fabric8/java-alpine-openjdk8-jre +FROM fabric8/java-alpine-openjdk8-jre:1.6.5 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter -COPY target/lib/* /deployments/lib/ -COPY target/*-runner.jar /deployments/app.jar -EXPOSE 8080 -# run with user 1001 and be prepared for be running in OpenShift too +# Be prepared for running in OpenShift too RUN adduser -G root --no-create-home --disabled-password 1001 \ && chown -R 1001 /deployments \ && chmod -R "g+rwX" /deployments \ && chown -R 1001:root /deployments + +COPY target/lib/* /deployments/lib/ +COPY target/*-runner.jar /deployments/app.jar +EXPOSE 8080 + +# run with user 1001 USER 1001 ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache index cef6b51761..959a92cb4b 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache @@ -1,3 +1,4 @@ # Configuration file +# key = value mp.openapi.scan.disable=true \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache index df616018ae..e741d85fe9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/pom.mustache @@ -13,10 +13,10 @@ 1.8 UTF-8 UTF-8 - 1.0.1.Final + 1.1.1.Final quarkus-universe-bom io.quarkus - 1.0.1.Final + 1.1.1.Final 2.22.1 From 5ec34b9b5931c31206d23a389c0f29a0b0cfe0ae Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 8 Jan 2020 21:59:18 +0800 Subject: [PATCH 33/82] comment out python flask 2 test (#4949) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a7e0101d63..b370f12d3d 100644 --- a/pom.xml +++ b/pom.xml @@ -1079,7 +1079,7 @@ samples/client/petstore/typescript-angular-v7-provided-in-root samples/server/petstore/rust-server samples/server/petstore/python-flask - samples/server/petstore/python-flask-python2 + From a2532cc3c5f665124c9ad36feca962b55c5d3d64 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Wed, 8 Jan 2020 21:54:05 -0500 Subject: [PATCH 34/82] [doc] full generator details (#4941) --- bin/utils/export_generator.sh | 2 +- docs/generators/ada-server.md | 100 ++++++ docs/generators/ada.md | 100 ++++++ docs/generators/android.md | 111 +++++++ docs/generators/apache2.md | 36 +++ docs/generators/apex.md | 170 ++++++++++ docs/generators/asciidoc.md | 20 ++ docs/generators/aspnetcore.md | 153 +++++++++ docs/generators/avro-schema.md | 37 +++ docs/generators/bash.md | 59 ++++ docs/generators/c.md | 75 +++++ docs/generators/clojure.md | 36 +++ docs/generators/cpp-pistache-server.md | 32 ++ docs/generators/cpp-qt5-client.md | 117 +++++++ docs/generators/cpp-qt5-qhttpengine-server.md | 117 +++++++ docs/generators/cpp-restbed-server.md | 120 +++++++ docs/generators/cpp-restsdk.md | 122 +++++++ docs/generators/cpp-tizen.md | 118 +++++++ docs/generators/csharp-dotnet2.md | 148 +++++++++ docs/generators/csharp-nancyfx.md | 63 ++++ docs/generators/csharp-netcore.md | 148 +++++++++ docs/generators/csharp.md | 148 +++++++++ docs/generators/cwiki.md | 20 ++ docs/generators/dart-dio.md | 100 ++++++ docs/generators/dart-jaguar.md | 96 ++++++ docs/generators/dart.md | 96 ++++++ docs/generators/dynamic-html.md | 22 ++ docs/generators/eiffel.md | 110 +++++++ docs/generators/elixir.md | 54 ++++ docs/generators/elm.md | 42 +++ docs/generators/erlang-client.md | 63 ++++ docs/generators/erlang-proper.md | 63 ++++ docs/generators/erlang-server.md | 63 ++++ docs/generators/flash.md | 58 ++++ docs/generators/fsharp-functions.md | 166 ++++++++++ docs/generators/fsharp-giraffe-server.md | 166 ++++++++++ docs/generators/go-experimental.md | 80 +++++ docs/generators/go-gin-server.md | 80 +++++ docs/generators/go-server.md | 80 +++++ docs/generators/go.md | 80 +++++ .../graphql-nodejs-express-server.md | 53 +++ docs/generators/graphql-schema.md | 53 +++ docs/generators/groovy.md | 121 +++++++ docs/generators/haskell-http-client.md | 64 ++++ docs/generators/haskell.md | 60 ++++ docs/generators/html.md | 20 ++ docs/generators/html2.md | 20 ++ docs/generators/java-inflector.md | 117 +++++++ docs/generators/java-msf4j.md | 117 +++++++ docs/generators/java-pkmst.md | 117 +++++++ docs/generators/java-play-framework.md | 117 +++++++ docs/generators/java-undertow-server.md | 117 +++++++ docs/generators/java-vertx-web.md | 117 +++++++ docs/generators/java-vertx.md | 117 +++++++ docs/generators/java.md | 117 +++++++ docs/generators/javascript-closure-angular.md | 71 ++++ docs/generators/javascript-flowtyped.md | 117 +++++++ docs/generators/javascript.md | 110 +++++++ docs/generators/jaxrs-cxf-cdi.md | 117 +++++++ docs/generators/jaxrs-cxf-client.md | 117 +++++++ docs/generators/jaxrs-cxf-extended.md | 117 +++++++ docs/generators/jaxrs-cxf.md | 117 +++++++ docs/generators/jaxrs-jersey.md | 117 +++++++ docs/generators/jaxrs-resteasy-eap.md | 117 +++++++ docs/generators/jaxrs-resteasy.md | 117 +++++++ docs/generators/jaxrs-spec.md | 117 +++++++ docs/generators/jmeter.md | 38 +++ docs/generators/kotlin-server.md | 75 +++++ docs/generators/kotlin-spring.md | 78 +++++ docs/generators/kotlin-vertx.md | 75 +++++ docs/generators/kotlin.md | 75 +++++ docs/generators/lua.md | 54 ++++ docs/generators/markdown.md | 36 +++ docs/generators/mysql-schema.md | 306 ++++++++++++++++++ docs/generators/nim.md | 120 +++++++ docs/generators/nodejs-express-server.md | 70 ++++ docs/generators/nodejs-server-deprecated.md | 70 ++++ docs/generators/objc.md | 91 ++++++ docs/generators/ocaml.md | 102 ++++++ docs/generators/openapi-yaml.md | 36 +++ docs/generators/openapi.md | 36 +++ docs/generators/perl.md | 68 ++++ docs/generators/php-laravel.md | 123 +++++++ docs/generators/php-lumen.md | 123 +++++++ docs/generators/php-silex.md | 113 +++++++ docs/generators/php-slim-deprecated.md | 107 ++++++ docs/generators/php-slim4.md | 107 ++++++ docs/generators/php-symfony.md | 105 ++++++ docs/generators/php-ze-ph.md | 123 +++++++ docs/generators/php.md | 107 ++++++ docs/generators/powershell.md | 90 ++++++ docs/generators/protobuf-schema.md | 38 +++ docs/generators/python-aiohttp.md | 85 +++++ docs/generators/python-blueplanet.md | 85 +++++ docs/generators/python-experimental.md | 81 +++++ docs/generators/python-flask.md | 85 +++++ docs/generators/python.md | 78 +++++ docs/generators/r.md | 45 +++ docs/generators/ruby-on-rails.md | 84 +++++ docs/generators/ruby-sinatra.md | 84 +++++ docs/generators/ruby.md | 82 +++++ docs/generators/rust-server.md | 89 +++++ docs/generators/rust.md | 102 ++++++ docs/generators/scala-akka.md | 90 ++++++ docs/generators/scala-finch.md | 114 +++++++ docs/generators/scala-gatling.md | 101 ++++++ .../generators/scala-httpclient-deprecated.md | 101 ++++++ docs/generators/scala-lagom-server.md | 101 ++++++ docs/generators/scala-play-server.md | 95 ++++++ docs/generators/scalatra.md | 103 ++++++ docs/generators/scalaz.md | 101 ++++++ docs/generators/spring.md | 117 +++++++ docs/generators/swift2-deprecated.md | 126 ++++++++ docs/generators/swift3-deprecated.md | 118 +++++++ docs/generators/swift4.md | 175 ++++++++++ docs/generators/swift5.md | 175 ++++++++++ docs/generators/typescript-angular.md | 107 ++++++ docs/generators/typescript-angularjs.md | 106 ++++++ docs/generators/typescript-aurelia.md | 106 ++++++ docs/generators/typescript-axios.md | 106 ++++++ docs/generators/typescript-fetch.md | 131 ++++++++ docs/generators/typescript-inversify.md | 108 +++++++ docs/generators/typescript-jquery.md | 106 ++++++ docs/generators/typescript-node.md | 110 +++++++ docs/generators/typescript-redux-query.md | 129 ++++++++ docs/generators/typescript-rxjs.md | 125 +++++++ 126 files changed, 11948 insertions(+), 1 deletion(-) diff --git a/bin/utils/export_generator.sh b/bin/utils/export_generator.sh index 6ec536aa28..a566522a90 100755 --- a/bin/utils/export_generator.sh +++ b/bin/utils/export_generator.sh @@ -14,4 +14,4 @@ fi executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" -java -jar ${executable} config-help -g "${NAME}" --named-header --format markdown --markdown-header -o "docs/generators/${NAME}.md" +java -jar ${executable} config-help -g "${NAME}" --full-details --named-header --format markdown --markdown-header -o "docs/generators/${NAME}.md" diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index 479a9a54bc..174e3fca5f 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -11,3 +11,103 @@ sidebar_label: ada-server |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|GNAT project name| |defaultProject| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
  • Integer
  • +
  • boolean
  • +
  • Character
  • +
  • double
  • +
  • integer
  • +
  • Boolean
  • +
  • float
  • +
  • long
  • +
+ +## RESERVED WORDS + +
  • exception
  • +
  • synchronized
  • +
  • constant
  • +
  • mod
  • +
  • select
  • +
  • declare
  • +
  • separate
  • +
  • use
  • +
  • do
  • +
  • elsif
  • +
  • body
  • +
  • type
  • +
  • while
  • +
  • when
  • +
  • aliased
  • +
  • protected
  • +
  • tagged
  • +
  • else
  • +
  • loop
  • +
  • function
  • +
  • record
  • +
  • raise
  • +
  • rem
  • +
  • if
  • +
  • case
  • +
  • others
  • +
  • all
  • +
  • new
  • +
  • package
  • +
  • in
  • +
  • is
  • +
  • then
  • +
  • pragma
  • +
  • accept
  • +
  • entry
  • +
  • exit
  • +
  • at
  • +
  • delay
  • +
  • task
  • +
  • null
  • +
  • abort
  • +
  • overriding
  • +
  • terminate
  • +
  • begin
  • +
  • some
  • +
  • private
  • +
  • access
  • +
  • for
  • +
  • range
  • +
  • interface
  • +
  • out
  • +
  • not
  • +
  • goto
  • +
  • array
  • +
  • subtype
  • +
  • and
  • +
  • of
  • +
  • end
  • +
  • xor
  • +
  • or
  • +
  • limited
  • +
  • abstract
  • +
  • procedure
  • +
  • reverse
  • +
  • generic
  • +
  • renames
  • +
  • requeue
  • +
  • with
  • +
  • abs
  • +
  • digits
  • +
  • until
  • +
  • return
  • +
diff --git a/docs/generators/ada.md b/docs/generators/ada.md index 3341e16373..4e11f7b5aa 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -11,3 +11,103 @@ sidebar_label: ada |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|GNAT project name| |defaultProject| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
  • Integer
  • +
  • boolean
  • +
  • Character
  • +
  • double
  • +
  • integer
  • +
  • Boolean
  • +
  • float
  • +
  • long
  • +
+ +## RESERVED WORDS + +
  • exception
  • +
  • synchronized
  • +
  • constant
  • +
  • mod
  • +
  • select
  • +
  • declare
  • +
  • separate
  • +
  • use
  • +
  • do
  • +
  • elsif
  • +
  • body
  • +
  • type
  • +
  • while
  • +
  • when
  • +
  • aliased
  • +
  • protected
  • +
  • tagged
  • +
  • else
  • +
  • loop
  • +
  • function
  • +
  • record
  • +
  • raise
  • +
  • rem
  • +
  • if
  • +
  • case
  • +
  • others
  • +
  • all
  • +
  • new
  • +
  • package
  • +
  • in
  • +
  • is
  • +
  • then
  • +
  • pragma
  • +
  • accept
  • +
  • entry
  • +
  • exit
  • +
  • at
  • +
  • delay
  • +
  • task
  • +
  • null
  • +
  • abort
  • +
  • overriding
  • +
  • terminate
  • +
  • begin
  • +
  • some
  • +
  • private
  • +
  • access
  • +
  • for
  • +
  • range
  • +
  • interface
  • +
  • out
  • +
  • not
  • +
  • goto
  • +
  • array
  • +
  • subtype
  • +
  • and
  • +
  • of
  • +
  • end
  • +
  • xor
  • +
  • or
  • +
  • limited
  • +
  • abstract
  • +
  • procedure
  • +
  • reverse
  • +
  • generic
  • +
  • renames
  • +
  • requeue
  • +
  • with
  • +
  • abs
  • +
  • digits
  • +
  • until
  • +
  • return
  • +
diff --git a/docs/generators/android.md b/docs/generators/android.md index 96c4695f43..5af5bd0269 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -23,3 +23,114 @@ sidebar_label: android |androidBuildToolsVersion|buildToolsVersion version for use in the generated build.gradle| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |library|library template (sub-template) to use|
**volley**
HTTP client: Volley 1.0.19 (default)
**httpclient**
HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be depecreated in the next major release.
|null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
  • Integer
  • +
  • byte[]
  • +
  • Float
  • +
  • boolean
  • +
  • Long
  • +
  • Object
  • +
  • String
  • +
  • Boolean
  • +
  • Double
  • +
+ +## RESERVED WORDS + +
  • synchronized
  • +
  • basepath
  • +
  • do
  • +
  • float
  • +
  • while
  • +
  • localvarpath
  • +
  • protected
  • +
  • continue
  • +
  • else
  • +
  • localvarqueryparams
  • +
  • catch
  • +
  • if
  • +
  • case
  • +
  • new
  • +
  • package
  • +
  • static
  • +
  • void
  • +
  • double
  • +
  • byte
  • +
  • finally
  • +
  • this
  • +
  • strictfp
  • +
  • throws
  • +
  • enum
  • +
  • extends
  • +
  • null
  • +
  • transient
  • +
  • final
  • +
  • try
  • +
  • localvarbuilder
  • +
  • object
  • +
  • localvarcontenttypes
  • +
  • implements
  • +
  • private
  • +
  • import
  • +
  • const
  • +
  • for
  • +
  • interface
  • +
  • long
  • +
  • switch
  • +
  • default
  • +
  • goto
  • +
  • public
  • +
  • localvarheaderparams
  • +
  • native
  • +
  • localvarcontenttype
  • +
  • apiinvoker
  • +
  • assert
  • +
  • class
  • +
  • localvarformparams
  • +
  • break
  • +
  • localvarresponse
  • +
  • volatile
  • +
  • abstract
  • +
  • int
  • +
  • instanceof
  • +
  • super
  • +
  • boolean
  • +
  • throw
  • +
  • localvarpostbody
  • +
  • char
  • +
  • short
  • +
  • authnames
  • +
  • return
  • +
diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index bb7e852bfd..1c431f4e36 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -11,3 +11,39 @@ sidebar_label: apache2 |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |userInfoPath|Path to the user and group files| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
    + +## RESERVED WORDS + +
      diff --git a/docs/generators/apex.md b/docs/generators/apex.md index bf9606d33a..414f2b1188 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -14,3 +14,173 @@ sidebar_label: apex |apiVersion|The Metadata API version number to use for components in this package.| |null| |buildMethod|The build method for this package.| |null| |namedCredential|The named credential name for the HTTP callouts| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
      • Blob
      • +
      • Time
      • +
      • String
      • +
      • Double
      • +
      • Date
      • +
      • Integer
      • +
      • Decimal
      • +
      • Long
      • +
      • Object
      • +
      • ID
      • +
      • Boolean
      • +
      • Datetime
      • +
      + +## RESERVED WORDS + +
      • exception
      • +
      • select
      • +
      • commit
      • +
      • type
      • +
      • when
      • +
      • cast
      • +
      • number
      • +
      • protected
      • +
      • else
      • +
      • merge
      • +
      • next_90_days
      • +
      • catch
      • +
      • join
      • +
      • if
      • +
      • case
      • +
      • using
      • +
      • having
      • +
      • last_month
      • +
      • in
      • +
      • byte
      • +
      • outer
      • +
      • tomorrow
      • +
      • upsert
      • +
      • then
      • +
      • enum
      • +
      • exit
      • +
      • as
      • +
      • system
      • +
      • bulk
      • +
      • begin
      • +
      • object
      • +
      • global
      • +
      • long
      • +
      • next_week
      • +
      • into
      • +
      • default
      • +
      • search
      • +
      • goto
      • +
      • by
      • +
      • currency
      • +
      • where
      • +
      • override
      • +
      • map
      • +
      • rollback
      • +
      • stat
      • +
      • set
      • +
      • break
      • +
      • last_90_days
      • +
      • abstract
      • +
      • trigger
      • +
      • this_week
      • +
      • asc
      • +
      • testmethod
      • +
      • throw
      • +
      • future
      • +
      • returning
      • +
      • char
      • +
      • webservice
      • +
      • return
      • +
      • transaction
      • +
      • date
      • +
      • synchronized
      • +
      • tolabel
      • +
      • nulls
      • +
      • next_month
      • +
      • autonomous
      • +
      • do
      • +
      • float
      • +
      • while
      • +
      • datetime
      • +
      • continue
      • +
      • loop
      • +
      • limit
      • +
      • from
      • +
      • export
      • +
      • group
      • +
      • new
      • +
      • package
      • +
      • static
      • +
      • like
      • +
      • finally
      • +
      • this
      • +
      • sort
      • +
      • list
      • +
      • inner
      • +
      • pragma
      • +
      • blob
      • +
      • this_month
      • +
      • convertcurrency
      • +
      • extends
      • +
      • null
      • +
      • hint
      • +
      • activate
      • +
      • final
      • +
      • true
      • +
      • retrieve
      • +
      • undelete
      • +
      • try
      • +
      • decimal
      • +
      • collect
      • +
      • next_n_days
      • +
      • desc
      • +
      • implements
      • +
      • private
      • +
      • virtual
      • +
      • const
      • +
      • import
      • +
      • for
      • +
      • insert
      • +
      • update
      • +
      • interface
      • +
      • delete
      • +
      • switch
      • +
      • yesterday
      • +
      • not
      • +
      • public
      • +
      • array
      • +
      • parallel
      • +
      • savepoint
      • +
      • and
      • +
      • of
      • +
      • today
      • +
      • end
      • +
      • class
      • +
      • on
      • +
      • or
      • +
      • bigdecimal
      • +
      • false
      • +
      • any
      • +
      • int
      • +
      • instanceof
      • +
      • super
      • +
      • last_n_days
      • +
      • short
      • +
      • time
      • +
      • last_week
      • +
      diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index d69dbacdb7..fc7a99c182 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -23,3 +23,23 @@ sidebar_label: asciidoc |snippetDir|path with includable markup snippets (e.g. test output generated by restdoc, default: .)| |.| |specDir|path with includable markup spec files (e.g. handwritten additional docs, default: ..)| |..| |headerAttributes|generation of asciidoc header meta data attributes (set to false to suppress, default: true)| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
        + +## RESERVED WORDS + +
          diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index dc3db6878b..25d5b2ad5c 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -36,3 +36,156 @@ sidebar_label: aspnetcore |operationIsAsync|Set methods to async or sync (default).| |false| |operationResultTask|Set methods result to Task<>.| |false| |modelClassModifier|Model Class Modifier can be nothing or partial| |partial| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|list|List| +|map|Dictionary| + + +## LANGUAGE PRIMITIVES + +
          • int?
          • +
          • Dictionary
          • +
          • string
          • +
          • bool
          • +
          • DateTimeOffset?
          • +
          • String
          • +
          • Guid
          • +
          • System.IO.Stream
          • +
          • bool?
          • +
          • float
          • +
          • long
          • +
          • DateTime
          • +
          • Int32
          • +
          • float?
          • +
          • DateTime?
          • +
          • List
          • +
          • Boolean
          • +
          • long?
          • +
          • double
          • +
          • Guid?
          • +
          • DateTimeOffset
          • +
          • Double
          • +
          • int
          • +
          • byte[]
          • +
          • Float
          • +
          • Int64
          • +
          • double?
          • +
          • ICollection
          • +
          • Collection
          • +
          • Object
          • +
          • decimal?
          • +
          • decimal
          • +
          + +## RESERVED WORDS + +
          • struct
          • +
          • ushort
          • +
          • localVarQueryParams
          • +
          • protected
          • +
          • readonly
          • +
          • else
          • +
          • lock
          • +
          • localVarPathParams
          • +
          • catch
          • +
          • if
          • +
          • case
          • +
          • localVarHttpHeaderAccepts
          • +
          • using
          • +
          • localVarPostBody
          • +
          • in
          • +
          • byte
          • +
          • double
          • +
          • var
          • +
          • is
          • +
          • params
          • +
          • enum
          • +
          • explicit
          • +
          • as
          • +
          • object
          • +
          • implicit
          • +
          • internal
          • +
          • localVarHttpHeaderAccept
          • +
          • unsafe
          • +
          • long
          • +
          • out
          • +
          • delegate
          • +
          • default
          • +
          • goto
          • +
          • localVarHttpContentTypes
          • +
          • localVarHttpContentType
          • +
          • yield
          • +
          • override
          • +
          • event
          • +
          • typeof
          • +
          • break
          • +
          • abstract
          • +
          • uint
          • +
          • throw
          • +
          • char
          • +
          • sbyte
          • +
          • localVarFileParams
          • +
          • return
          • +
          • extern
          • +
          • do
          • +
          • float
          • +
          • while
          • +
          • operator
          • +
          • ref
          • +
          • continue
          • +
          • checked
          • +
          • dynamic
          • +
          • Client
          • +
          • new
          • +
          • static
          • +
          • void
          • +
          • sizeof
          • +
          • localVarResponse
          • +
          • sealed
          • +
          • finally
          • +
          • this
          • +
          • unchecked
          • +
          • null
          • +
          • localVarPath
          • +
          • true
          • +
          • fixed
          • +
          • try
          • +
          • decimal
          • +
          • private
          • +
          • virtual
          • +
          • bool
          • +
          • const
          • +
          • string
          • +
          • for
          • +
          • interface
          • +
          • switch
          • +
          • foreach
          • +
          • ulong
          • +
          • public
          • +
          • localVarStatusCode
          • +
          • stackalloc
          • +
          • parameter
          • +
          • await
          • +
          • client
          • +
          • class
          • +
          • localVarFormParams
          • +
          • false
          • +
          • volatile
          • +
          • int
          • +
          • async
          • +
          • localVarHeaderParams
          • +
          • namespace
          • +
          • short
          • +
          • base
          • +
          diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index 97e3c9ec50..480f11bd1b 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -11,3 +11,40 @@ sidebar_label: avro-schema |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |packageName|package for generated classes (where supported)| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| +|list|Array| +|map|Object| + + +## LANGUAGE PRIMITIVES + +
          • date
          • +
          • string
          • +
          • double
          • +
          • integer
          • +
          • float
          • +
          • int
          • +
          • long
          • +
          • BigDecimal
          • +
          • DateTime
          • +
          • number
          • +
          • boolean
          • +
          • null
          • +
          • bytes
          • +
          • UUID
          • +
          + +## RESERVED WORDS + +
            diff --git a/docs/generators/bash.md b/docs/generators/bash.md index d35e805585..daee782196 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -18,3 +18,62 @@ sidebar_label: bash |hostEnvironmentVariable|Name of environment variable where host can be defined (e.g. PETSTORE_HOST='http://api.openapitools.org:8080')| |null| |basicAuthEnvironmentVariable|Name of environment variable where username and password can be defined (e.g. PETSTORE_CREDS='username:password')| |null| |apiKeyAuthEnvironmentVariable|Name of environment variable where API key can be defined (e.g. PETSTORE_APIKEY='kjhasdGASDa5asdASD')| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
            • boolean
            • +
            • string
            • +
            • array
            • +
            • binary
            • +
            • integer
            • +
            • float
            • +
            • map
            • +
            + +## RESERVED WORDS + +
            • fi
            • +
            • select
            • +
            • in
            • +
            • for
            • +
            • do
            • +
            • elif
            • +
            • then
            • +
            • while
            • +
            • done
            • +
            • else
            • +
            • function
            • +
            • until
            • +
            • time
            • +
            • if
            • +
            • case
            • +
            • esac
            • +
            diff --git a/docs/generators/c.md b/docs/generators/c.md index b60a7fbd49..41c7e123c5 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -11,3 +11,78 @@ sidebar_label: c |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
            • binary_t*
            • +
            • double
            • +
            • char
            • +
            • short
            • +
            • Object
            • +
            • float
            • +
            • list
            • +
            • int
            • +
            • long
            • +
            • list_t*
            • +
            + +## RESERVED WORDS + +
            • struct
            • +
            • auto
            • +
            • const
            • +
            • _static_assert
            • +
            • _atomic
            • +
            • _complex
            • +
            • for
            • +
            • extern
            • +
            • do
            • +
            • float
            • +
            • restrict
            • +
            • while
            • +
            • long
            • +
            • remove
            • +
            • switch
            • +
            • _generic
            • +
            • default
            • +
            • _alignof
            • +
            • goto
            • +
            • continue
            • +
            • else
            • +
            • _noreturn
            • +
            • if
            • +
            • case
            • +
            • _bool
            • +
            • static
            • +
            • void
            • +
            • break
            • +
            • sizeof
            • +
            • double
            • +
            • signed
            • +
            • volatile
            • +
            • union
            • +
            • _thread_local
            • +
            • typedef
            • +
            • enum
            • +
            • int
            • +
            • inline
            • +
            • _alignas
            • +
            • _imaginary
            • +
            • char
            • +
            • short
            • +
            • unsigned
            • +
            • return
            • +
            • register
            • +
            diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 2c49f189b2..3c0d64a47d 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -17,3 +17,39 @@ sidebar_label: clojure |projectLicenseName|name of the license the project uses (Default: using info.license.name or not included in project.clj)| |null| |projectLicenseUrl|URL of the license the project uses (Default: using info.license.url or not included in project.clj)| |null| |baseNamespace|the base/top namespace (Default: generated from projectName)| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
              + +## RESERVED WORDS + +
                diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index b925ffc175..f74eafd5b2 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -8,3 +8,35 @@ sidebar_label: cpp-pistache-server |addExternalLibs|Add the Possibility to fetch and compile external Libraries needed by this Framework.| |true| |helpersPackage|Specify the package name to be used for the helpers (e.g. org.openapitools.server.helpers).| |org.openapitools.server.helpers| |useStructModel|Use struct-based model template instead of get/set-based model template| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|std::vector|#include <vector>| +|std::map|#include <map>| +|std::string|#include <string>| +|Object|#include "Object.h"| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                • bool
                • +
                • double
                • +
                • char
                • +
                • float
                • +
                • int64_t
                • +
                • int
                • +
                • long
                • +
                • int32_t
                • +
                + +## RESERVED WORDS + +
                  diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index 582f762740..31f3f31b77 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -13,3 +13,120 @@ sidebar_label: cpp-qt5-client |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| |optionalProjectFile|Generate client.pri.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|OAIHttpFileElement|#include "OAIHttpFileElement.h"| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                  • QDateTime
                  • +
                  • QString
                  • +
                  • qint64
                  • +
                  • qint32
                  • +
                  • bool
                  • +
                  • QByteArray
                  • +
                  • double
                  • +
                  • QDate
                  • +
                  • float
                  • +
                  + +## RESERVED WORDS + +
                  • struct
                  • +
                  • auto
                  • +
                  • xor_eq
                  • +
                  • const_cast
                  • +
                  • decltype
                  • +
                  • alignas
                  • +
                  • extern
                  • +
                  • do
                  • +
                  • float
                  • +
                  • while
                  • +
                  • constexpr
                  • +
                  • operator
                  • +
                  • bitand
                  • +
                  • protected
                  • +
                  • continue
                  • +
                  • else
                  • +
                  • friend
                  • +
                  • mutable
                  • +
                  • compl
                  • +
                  • typeid
                  • +
                  • catch
                  • +
                  • export
                  • +
                  • if
                  • +
                  • case
                  • +
                  • dynamic_cast
                  • +
                  • not_eq
                  • +
                  • new
                  • +
                  • using
                  • +
                  • static
                  • +
                  • void
                  • +
                  • sizeof
                  • +
                  • bitor
                  • +
                  • double
                  • +
                  • this
                  • +
                  • signed
                  • +
                  • noexcept
                  • +
                  • typedef
                  • +
                  • enum
                  • +
                  • char16_t
                  • +
                  • explicit
                  • +
                  • static_cast
                  • +
                  • true
                  • +
                  • try
                  • +
                  • reinterpret_cast
                  • +
                  • nullptr
                  • +
                  • requires
                  • +
                  • template
                  • +
                  • private
                  • +
                  • virtual
                  • +
                  • bool
                  • +
                  • const
                  • +
                  • concept
                  • +
                  • static_assert
                  • +
                  • for
                  • +
                  • delete
                  • +
                  • long
                  • +
                  • switch
                  • +
                  • default
                  • +
                  • not
                  • +
                  • goto
                  • +
                  • public
                  • +
                  • and
                  • +
                  • and_eq
                  • +
                  • linux
                  • +
                  • or_eq
                  • +
                  • xor
                  • +
                  • class
                  • +
                  • wchar_t
                  • +
                  • alignof
                  • +
                  • or
                  • +
                  • break
                  • +
                  • false
                  • +
                  • thread_local
                  • +
                  • char32_t
                  • +
                  • volatile
                  • +
                  • union
                  • +
                  • int
                  • +
                  • inline
                  • +
                  • throw
                  • +
                  • char
                  • +
                  • namespace
                  • +
                  • short
                  • +
                  • unsigned
                  • +
                  • asm
                  • +
                  • return
                  • +
                  • typename
                  • +
                  • register
                  • +
                  diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md index 2531287fac..b2fd9b3538 100644 --- a/docs/generators/cpp-qt5-qhttpengine-server.md +++ b/docs/generators/cpp-qt5-qhttpengine-server.md @@ -12,3 +12,120 @@ sidebar_label: cpp-qt5-qhttpengine-server |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|OAIHttpFileElement|#include "OAIHttpFileElement.h"| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                  • QDateTime
                  • +
                  • QString
                  • +
                  • qint64
                  • +
                  • qint32
                  • +
                  • bool
                  • +
                  • QByteArray
                  • +
                  • double
                  • +
                  • QDate
                  • +
                  • float
                  • +
                  + +## RESERVED WORDS + +
                  • struct
                  • +
                  • auto
                  • +
                  • xor_eq
                  • +
                  • const_cast
                  • +
                  • decltype
                  • +
                  • alignas
                  • +
                  • extern
                  • +
                  • do
                  • +
                  • float
                  • +
                  • while
                  • +
                  • constexpr
                  • +
                  • operator
                  • +
                  • bitand
                  • +
                  • protected
                  • +
                  • continue
                  • +
                  • else
                  • +
                  • friend
                  • +
                  • mutable
                  • +
                  • compl
                  • +
                  • typeid
                  • +
                  • catch
                  • +
                  • export
                  • +
                  • if
                  • +
                  • case
                  • +
                  • dynamic_cast
                  • +
                  • not_eq
                  • +
                  • new
                  • +
                  • using
                  • +
                  • static
                  • +
                  • void
                  • +
                  • sizeof
                  • +
                  • bitor
                  • +
                  • double
                  • +
                  • this
                  • +
                  • signed
                  • +
                  • noexcept
                  • +
                  • typedef
                  • +
                  • enum
                  • +
                  • char16_t
                  • +
                  • explicit
                  • +
                  • static_cast
                  • +
                  • true
                  • +
                  • try
                  • +
                  • reinterpret_cast
                  • +
                  • nullptr
                  • +
                  • requires
                  • +
                  • template
                  • +
                  • private
                  • +
                  • virtual
                  • +
                  • bool
                  • +
                  • const
                  • +
                  • concept
                  • +
                  • static_assert
                  • +
                  • for
                  • +
                  • delete
                  • +
                  • long
                  • +
                  • switch
                  • +
                  • default
                  • +
                  • not
                  • +
                  • goto
                  • +
                  • public
                  • +
                  • and
                  • +
                  • and_eq
                  • +
                  • linux
                  • +
                  • or_eq
                  • +
                  • xor
                  • +
                  • class
                  • +
                  • wchar_t
                  • +
                  • alignof
                  • +
                  • or
                  • +
                  • break
                  • +
                  • false
                  • +
                  • thread_local
                  • +
                  • char32_t
                  • +
                  • volatile
                  • +
                  • union
                  • +
                  • int
                  • +
                  • inline
                  • +
                  • throw
                  • +
                  • char
                  • +
                  • namespace
                  • +
                  • short
                  • +
                  • unsigned
                  • +
                  • asm
                  • +
                  • return
                  • +
                  • typename
                  • +
                  • register
                  • +
                  diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index 1dde370533..cab905d9b5 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -10,3 +10,123 @@ sidebar_label: cpp-restbed-server |packageVersion|C++ package version.| |1.0.0| |declspec|C++ preprocessor to place before the class name for handling dllexport/dllimport.| || |defaultInclude|The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" | || + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|std::vector|#include <vector>| +|std::map|#include <map>| +|std::string|#include <string>| +|Object|#include "Object.h"| +|restbed::Bytes|#include <corvusoft/restbed/byte.hpp>| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                  • bool
                  • +
                  • double
                  • +
                  • char
                  • +
                  • float
                  • +
                  • int64_t
                  • +
                  • int
                  • +
                  • long
                  • +
                  • int32_t
                  • +
                  + +## RESERVED WORDS + +
                  • struct
                  • +
                  • auto
                  • +
                  • xor_eq
                  • +
                  • const_cast
                  • +
                  • decltype
                  • +
                  • alignas
                  • +
                  • extern
                  • +
                  • do
                  • +
                  • float
                  • +
                  • while
                  • +
                  • constexpr
                  • +
                  • operator
                  • +
                  • bitand
                  • +
                  • protected
                  • +
                  • continue
                  • +
                  • else
                  • +
                  • friend
                  • +
                  • mutable
                  • +
                  • compl
                  • +
                  • typeid
                  • +
                  • catch
                  • +
                  • export
                  • +
                  • if
                  • +
                  • case
                  • +
                  • dynamic_cast
                  • +
                  • not_eq
                  • +
                  • new
                  • +
                  • using
                  • +
                  • static
                  • +
                  • void
                  • +
                  • sizeof
                  • +
                  • bitor
                  • +
                  • double
                  • +
                  • this
                  • +
                  • signed
                  • +
                  • noexcept
                  • +
                  • typedef
                  • +
                  • enum
                  • +
                  • char16_t
                  • +
                  • explicit
                  • +
                  • static_cast
                  • +
                  • true
                  • +
                  • try
                  • +
                  • reinterpret_cast
                  • +
                  • nullptr
                  • +
                  • requires
                  • +
                  • template
                  • +
                  • private
                  • +
                  • virtual
                  • +
                  • bool
                  • +
                  • const
                  • +
                  • concept
                  • +
                  • static_assert
                  • +
                  • for
                  • +
                  • delete
                  • +
                  • long
                  • +
                  • switch
                  • +
                  • default
                  • +
                  • not
                  • +
                  • goto
                  • +
                  • public
                  • +
                  • and
                  • +
                  • and_eq
                  • +
                  • linux
                  • +
                  • or_eq
                  • +
                  • xor
                  • +
                  • class
                  • +
                  • wchar_t
                  • +
                  • alignof
                  • +
                  • or
                  • +
                  • break
                  • +
                  • false
                  • +
                  • thread_local
                  • +
                  • char32_t
                  • +
                  • volatile
                  • +
                  • union
                  • +
                  • int
                  • +
                  • inline
                  • +
                  • throw
                  • +
                  • char
                  • +
                  • namespace
                  • +
                  • short
                  • +
                  • unsigned
                  • +
                  • asm
                  • +
                  • return
                  • +
                  • typename
                  • +
                  • register
                  • +
                  diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 0518392adf..289a67fa7e 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -11,3 +11,125 @@ sidebar_label: cpp-restsdk |declspec|C++ preprocessor to place before the class name for handling dllexport/dllimport.| || |defaultInclude|The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" | || |generateGMocksForApis|Generate Google Mock classes for APIs.| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|std::vector|#include <vector>| +|utility::string_t|#include <cpprest/details/basic_types.h>| +|std::map|#include <map>| +|std::string|#include <string>| +|utility::datetime|#include <cpprest/details/basic_types.h>| +|Object|#include "Object.h"| +|HttpContent|#include "HttpContent.h"| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                  • bool
                  • +
                  • double
                  • +
                  • char
                  • +
                  • float
                  • +
                  • int64_t
                  • +
                  • int
                  • +
                  • long
                  • +
                  • int32_t
                  • +
                  + +## RESERVED WORDS + +
                  • struct
                  • +
                  • auto
                  • +
                  • xor_eq
                  • +
                  • const_cast
                  • +
                  • decltype
                  • +
                  • alignas
                  • +
                  • extern
                  • +
                  • do
                  • +
                  • float
                  • +
                  • while
                  • +
                  • constexpr
                  • +
                  • operator
                  • +
                  • bitand
                  • +
                  • protected
                  • +
                  • continue
                  • +
                  • else
                  • +
                  • friend
                  • +
                  • mutable
                  • +
                  • compl
                  • +
                  • typeid
                  • +
                  • catch
                  • +
                  • export
                  • +
                  • if
                  • +
                  • case
                  • +
                  • dynamic_cast
                  • +
                  • not_eq
                  • +
                  • new
                  • +
                  • using
                  • +
                  • static
                  • +
                  • void
                  • +
                  • sizeof
                  • +
                  • bitor
                  • +
                  • double
                  • +
                  • this
                  • +
                  • signed
                  • +
                  • noexcept
                  • +
                  • typedef
                  • +
                  • enum
                  • +
                  • char16_t
                  • +
                  • explicit
                  • +
                  • static_cast
                  • +
                  • true
                  • +
                  • try
                  • +
                  • reinterpret_cast
                  • +
                  • nullptr
                  • +
                  • requires
                  • +
                  • template
                  • +
                  • private
                  • +
                  • virtual
                  • +
                  • bool
                  • +
                  • const
                  • +
                  • concept
                  • +
                  • static_assert
                  • +
                  • for
                  • +
                  • delete
                  • +
                  • long
                  • +
                  • switch
                  • +
                  • default
                  • +
                  • not
                  • +
                  • goto
                  • +
                  • public
                  • +
                  • and
                  • +
                  • and_eq
                  • +
                  • linux
                  • +
                  • or_eq
                  • +
                  • xor
                  • +
                  • class
                  • +
                  • wchar_t
                  • +
                  • alignof
                  • +
                  • or
                  • +
                  • break
                  • +
                  • false
                  • +
                  • thread_local
                  • +
                  • char32_t
                  • +
                  • volatile
                  • +
                  • union
                  • +
                  • int
                  • +
                  • inline
                  • +
                  • throw
                  • +
                  • char
                  • +
                  • namespace
                  • +
                  • short
                  • +
                  • unsigned
                  • +
                  • asm
                  • +
                  • return
                  • +
                  • typename
                  • +
                  • register
                  • +
                  diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index babc5bd014..c9d3d3b80a 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -10,3 +10,121 @@ sidebar_label: cpp-tizen |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                  • bool
                  • +
                  • std::string
                  • +
                  • double
                  • +
                  • long long
                  • +
                  • float
                  • +
                  • int
                  • +
                  + +## RESERVED WORDS + +
                  • struct
                  • +
                  • synchronized
                  • +
                  • auto
                  • +
                  • xor_eq
                  • +
                  • const_cast
                  • +
                  • decltype
                  • +
                  • alignas
                  • +
                  • extern
                  • +
                  • do
                  • +
                  • float
                  • +
                  • while
                  • +
                  • constexpr
                  • +
                  • operator
                  • +
                  • bitand
                  • +
                  • protected
                  • +
                  • continue
                  • +
                  • else
                  • +
                  • friend
                  • +
                  • mutable
                  • +
                  • compl
                  • +
                  • typeid
                  • +
                  • catch
                  • +
                  • export
                  • +
                  • if
                  • +
                  • case
                  • +
                  • dynamic_cast
                  • +
                  • not_eq
                  • +
                  • new
                  • +
                  • using
                  • +
                  • atomic_commit
                  • +
                  • static
                  • +
                  • void
                  • +
                  • sizeof
                  • +
                  • bitor
                  • +
                  • double
                  • +
                  • module
                  • +
                  • this
                  • +
                  • signed
                  • +
                  • atomic_cancel
                  • +
                  • noexcept
                  • +
                  • typedef
                  • +
                  • enum
                  • +
                  • char16_t
                  • +
                  • explicit
                  • +
                  • static_cast
                  • +
                  • true
                  • +
                  • try
                  • +
                  • reinterpret_cast
                  • +
                  • nullptr
                  • +
                  • requires
                  • +
                  • template
                  • +
                  • private
                  • +
                  • virtual
                  • +
                  • bool
                  • +
                  • const
                  • +
                  • import
                  • +
                  • concept
                  • +
                  • static_assert
                  • +
                  • for
                  • +
                  • atomic_noexcept
                  • +
                  • delete
                  • +
                  • long
                  • +
                  • switch
                  • +
                  • default
                  • +
                  • not
                  • +
                  • goto
                  • +
                  • public
                  • +
                  • and
                  • +
                  • and_eq
                  • +
                  • or_eq
                  • +
                  • xor
                  • +
                  • class
                  • +
                  • wchar_t
                  • +
                  • alignof
                  • +
                  • or
                  • +
                  • break
                  • +
                  • false
                  • +
                  • thread_local
                  • +
                  • char32_t
                  • +
                  • volatile
                  • +
                  • union
                  • +
                  • int
                  • +
                  • inline
                  • +
                  • throw
                  • +
                  • char
                  • +
                  • namespace
                  • +
                  • short
                  • +
                  • unsigned
                  • +
                  • asm
                  • +
                  • return
                  • +
                  • typename
                  • +
                  • register
                  • +
                  diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index b4d4ffccf9..864b3a8476 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -8,3 +8,151 @@ sidebar_label: csharp-dotnet2 |packageName|C# package name (convention: Camel.Case).| |Org.OpenAPITools| |packageVersion|C# package version.| |1.0.0| |clientPackage|C# client package name (convention: Camel.Case).| |Org.OpenAPITools.Client| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|list|List| +|map|Dictionary| + + +## LANGUAGE PRIMITIVES + +
                  • int?
                  • +
                  • Dictionary
                  • +
                  • string
                  • +
                  • bool
                  • +
                  • DateTimeOffset?
                  • +
                  • String
                  • +
                  • Guid
                  • +
                  • System.IO.Stream
                  • +
                  • bool?
                  • +
                  • float
                  • +
                  • long
                  • +
                  • DateTime
                  • +
                  • Int32
                  • +
                  • float?
                  • +
                  • DateTime?
                  • +
                  • List
                  • +
                  • Boolean
                  • +
                  • long?
                  • +
                  • double
                  • +
                  • Guid?
                  • +
                  • DateTimeOffset
                  • +
                  • Double
                  • +
                  • int
                  • +
                  • byte[]
                  • +
                  • Float
                  • +
                  • Int64
                  • +
                  • double?
                  • +
                  • ICollection
                  • +
                  • Collection
                  • +
                  • Object
                  • +
                  • decimal?
                  • +
                  • decimal
                  • +
                  + +## RESERVED WORDS + +
                  • struct
                  • +
                  • extern
                  • +
                  • do
                  • +
                  • ushort
                  • +
                  • float
                  • +
                  • while
                  • +
                  • operator
                  • +
                  • localVarQueryParams
                  • +
                  • ref
                  • +
                  • protected
                  • +
                  • readonly
                  • +
                  • continue
                  • +
                  • else
                  • +
                  • checked
                  • +
                  • lock
                  • +
                  • localVarPathParams
                  • +
                  • catch
                  • +
                  • Client
                  • +
                  • if
                  • +
                  • case
                  • +
                  • localVarHttpHeaderAccepts
                  • +
                  • new
                  • +
                  • using
                  • +
                  • static
                  • +
                  • void
                  • +
                  • localVarPostBody
                  • +
                  • in
                  • +
                  • sizeof
                  • +
                  • localVarResponse
                  • +
                  • byte
                  • +
                  • double
                  • +
                  • sealed
                  • +
                  • finally
                  • +
                  • this
                  • +
                  • unchecked
                  • +
                  • is
                  • +
                  • params
                  • +
                  • enum
                  • +
                  • explicit
                  • +
                  • as
                  • +
                  • null
                  • +
                  • localVarPath
                  • +
                  • true
                  • +
                  • fixed
                  • +
                  • try
                  • +
                  • decimal
                  • +
                  • object
                  • +
                  • implicit
                  • +
                  • internal
                  • +
                  • private
                  • +
                  • virtual
                  • +
                  • bool
                  • +
                  • const
                  • +
                  • string
                  • +
                  • for
                  • +
                  • localVarHttpHeaderAccept
                  • +
                  • interface
                  • +
                  • unsafe
                  • +
                  • long
                  • +
                  • out
                  • +
                  • switch
                  • +
                  • delegate
                  • +
                  • foreach
                  • +
                  • default
                  • +
                  • ulong
                  • +
                  • goto
                  • +
                  • localVarHttpContentTypes
                  • +
                  • localVarHttpContentType
                  • +
                  • public
                  • +
                  • localVarStatusCode
                  • +
                  • stackalloc
                  • +
                  • parameter
                  • +
                  • client
                  • +
                  • override
                  • +
                  • event
                  • +
                  • class
                  • +
                  • typeof
                  • +
                  • localVarFormParams
                  • +
                  • break
                  • +
                  • false
                  • +
                  • volatile
                  • +
                  • abstract
                  • +
                  • uint
                  • +
                  • int
                  • +
                  • localVarHeaderParams
                  • +
                  • throw
                  • +
                  • char
                  • +
                  • namespace
                  • +
                  • sbyte
                  • +
                  • short
                  • +
                  • localVarFileParams
                  • +
                  • return
                  • +
                  • base
                  • +
                  diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index b436a6b4b2..20d46765b4 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -19,3 +19,66 @@ sidebar_label: csharp-nancyfx |immutable|Enabled by default. If disabled generates model classes with setters| |true| |writeModulePath|Enabled by default. If disabled, module paths will not mirror api base path| |true| |asyncServer|Set to true to enable the generation of async routes/endpoints.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|list|List| +|map|Dictionary| + + +## LANGUAGE PRIMITIVES + +
                  • int?
                  • +
                  • Dictionary
                  • +
                  • string
                  • +
                  • bool
                  • +
                  • LocalDate?
                  • +
                  • DateTimeOffset?
                  • +
                  • ZonedDateTime?
                  • +
                  • String
                  • +
                  • Guid
                  • +
                  • System.IO.Stream
                  • +
                  • bool?
                  • +
                  • float
                  • +
                  • long
                  • +
                  • DateTime
                  • +
                  • Int32
                  • +
                  • float?
                  • +
                  • DateTime?
                  • +
                  • List
                  • +
                  • Boolean
                  • +
                  • LocalTime?
                  • +
                  • long?
                  • +
                  • double
                  • +
                  • Guid?
                  • +
                  • DateTimeOffset
                  • +
                  • Double
                  • +
                  • int
                  • +
                  • byte[]
                  • +
                  • Float
                  • +
                  • Int64
                  • +
                  • double?
                  • +
                  • ICollection
                  • +
                  • Collection
                  • +
                  • Object
                  • +
                  • decimal?
                  • +
                  • decimal
                  • +
                  + +## RESERVED WORDS + +
                  • async
                  • +
                  • var
                  • +
                  • yield
                  • +
                  • await
                  • +
                  • dynamic
                  • +
                  diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 346932bc6e..167c200650 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -26,3 +26,151 @@ sidebar_label: csharp-netcore |netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| |validatable|Generates self-validatable models.| |true| |caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|list|List| +|map|Dictionary| + + +## LANGUAGE PRIMITIVES + +
                  • int?
                  • +
                  • Dictionary
                  • +
                  • string
                  • +
                  • bool
                  • +
                  • DateTimeOffset?
                  • +
                  • String
                  • +
                  • Guid
                  • +
                  • System.IO.Stream
                  • +
                  • bool?
                  • +
                  • float
                  • +
                  • long
                  • +
                  • DateTime
                  • +
                  • Int32
                  • +
                  • float?
                  • +
                  • DateTime?
                  • +
                  • List
                  • +
                  • Boolean
                  • +
                  • long?
                  • +
                  • double
                  • +
                  • Guid?
                  • +
                  • DateTimeOffset
                  • +
                  • Double
                  • +
                  • int
                  • +
                  • byte[]
                  • +
                  • Float
                  • +
                  • Int64
                  • +
                  • double?
                  • +
                  • ICollection
                  • +
                  • Collection
                  • +
                  • Object
                  • +
                  • decimal?
                  • +
                  • decimal
                  • +
                  + +## RESERVED WORDS + +
                  • struct
                  • +
                  • extern
                  • +
                  • do
                  • +
                  • ushort
                  • +
                  • float
                  • +
                  • while
                  • +
                  • operator
                  • +
                  • localVarQueryParams
                  • +
                  • ref
                  • +
                  • protected
                  • +
                  • readonly
                  • +
                  • continue
                  • +
                  • else
                  • +
                  • checked
                  • +
                  • lock
                  • +
                  • localVarPathParams
                  • +
                  • catch
                  • +
                  • Client
                  • +
                  • if
                  • +
                  • case
                  • +
                  • localVarHttpHeaderAccepts
                  • +
                  • new
                  • +
                  • using
                  • +
                  • static
                  • +
                  • void
                  • +
                  • localVarPostBody
                  • +
                  • in
                  • +
                  • sizeof
                  • +
                  • localVarResponse
                  • +
                  • byte
                  • +
                  • double
                  • +
                  • sealed
                  • +
                  • finally
                  • +
                  • this
                  • +
                  • unchecked
                  • +
                  • is
                  • +
                  • params
                  • +
                  • enum
                  • +
                  • explicit
                  • +
                  • as
                  • +
                  • null
                  • +
                  • localVarPath
                  • +
                  • true
                  • +
                  • fixed
                  • +
                  • try
                  • +
                  • decimal
                  • +
                  • object
                  • +
                  • implicit
                  • +
                  • internal
                  • +
                  • private
                  • +
                  • virtual
                  • +
                  • bool
                  • +
                  • const
                  • +
                  • string
                  • +
                  • for
                  • +
                  • localVarHttpHeaderAccept
                  • +
                  • interface
                  • +
                  • unsafe
                  • +
                  • long
                  • +
                  • out
                  • +
                  • switch
                  • +
                  • delegate
                  • +
                  • foreach
                  • +
                  • default
                  • +
                  • ulong
                  • +
                  • goto
                  • +
                  • localVarHttpContentTypes
                  • +
                  • localVarHttpContentType
                  • +
                  • public
                  • +
                  • localVarStatusCode
                  • +
                  • stackalloc
                  • +
                  • parameter
                  • +
                  • client
                  • +
                  • override
                  • +
                  • event
                  • +
                  • class
                  • +
                  • typeof
                  • +
                  • localVarFormParams
                  • +
                  • break
                  • +
                  • false
                  • +
                  • volatile
                  • +
                  • abstract
                  • +
                  • uint
                  • +
                  • int
                  • +
                  • localVarHeaderParams
                  • +
                  • throw
                  • +
                  • char
                  • +
                  • namespace
                  • +
                  • sbyte
                  • +
                  • short
                  • +
                  • localVarFileParams
                  • +
                  • return
                  • +
                  • base
                  • +
                  diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 802eaae3ee..731c734923 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -28,3 +28,151 @@ sidebar_label: csharp |validatable|Generates self-validatable models.| |true| |useCompareNetObjects|Use KellermanSoftware.CompareNetObjects for deep recursive object comparison. WARNING: this option incurs potential performance impact.| |false| |caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|list|List| +|map|Dictionary| + + +## LANGUAGE PRIMITIVES + +
                  • int?
                  • +
                  • Dictionary
                  • +
                  • string
                  • +
                  • bool
                  • +
                  • DateTimeOffset?
                  • +
                  • String
                  • +
                  • Guid
                  • +
                  • System.IO.Stream
                  • +
                  • bool?
                  • +
                  • float
                  • +
                  • long
                  • +
                  • DateTime
                  • +
                  • Int32
                  • +
                  • float?
                  • +
                  • DateTime?
                  • +
                  • List
                  • +
                  • Boolean
                  • +
                  • long?
                  • +
                  • double
                  • +
                  • Guid?
                  • +
                  • DateTimeOffset
                  • +
                  • Double
                  • +
                  • int
                  • +
                  • byte[]
                  • +
                  • Float
                  • +
                  • Int64
                  • +
                  • double?
                  • +
                  • ICollection
                  • +
                  • Collection
                  • +
                  • Object
                  • +
                  • decimal?
                  • +
                  • decimal
                  • +
                  + +## RESERVED WORDS + +
                  • struct
                  • +
                  • extern
                  • +
                  • do
                  • +
                  • ushort
                  • +
                  • float
                  • +
                  • while
                  • +
                  • operator
                  • +
                  • localVarQueryParams
                  • +
                  • ref
                  • +
                  • protected
                  • +
                  • readonly
                  • +
                  • continue
                  • +
                  • else
                  • +
                  • checked
                  • +
                  • lock
                  • +
                  • localVarPathParams
                  • +
                  • catch
                  • +
                  • Client
                  • +
                  • if
                  • +
                  • case
                  • +
                  • localVarHttpHeaderAccepts
                  • +
                  • new
                  • +
                  • using
                  • +
                  • static
                  • +
                  • void
                  • +
                  • localVarPostBody
                  • +
                  • in
                  • +
                  • sizeof
                  • +
                  • localVarResponse
                  • +
                  • byte
                  • +
                  • double
                  • +
                  • sealed
                  • +
                  • finally
                  • +
                  • this
                  • +
                  • unchecked
                  • +
                  • is
                  • +
                  • params
                  • +
                  • enum
                  • +
                  • explicit
                  • +
                  • as
                  • +
                  • null
                  • +
                  • localVarPath
                  • +
                  • true
                  • +
                  • fixed
                  • +
                  • try
                  • +
                  • decimal
                  • +
                  • object
                  • +
                  • implicit
                  • +
                  • internal
                  • +
                  • private
                  • +
                  • virtual
                  • +
                  • bool
                  • +
                  • const
                  • +
                  • string
                  • +
                  • for
                  • +
                  • localVarHttpHeaderAccept
                  • +
                  • interface
                  • +
                  • unsafe
                  • +
                  • long
                  • +
                  • out
                  • +
                  • switch
                  • +
                  • delegate
                  • +
                  • foreach
                  • +
                  • default
                  • +
                  • ulong
                  • +
                  • goto
                  • +
                  • localVarHttpContentTypes
                  • +
                  • localVarHttpContentType
                  • +
                  • public
                  • +
                  • localVarStatusCode
                  • +
                  • stackalloc
                  • +
                  • parameter
                  • +
                  • client
                  • +
                  • override
                  • +
                  • event
                  • +
                  • class
                  • +
                  • typeof
                  • +
                  • localVarFormParams
                  • +
                  • break
                  • +
                  • false
                  • +
                  • volatile
                  • +
                  • abstract
                  • +
                  • uint
                  • +
                  • int
                  • +
                  • localVarHeaderParams
                  • +
                  • throw
                  • +
                  • char
                  • +
                  • namespace
                  • +
                  • sbyte
                  • +
                  • short
                  • +
                  • localVarFileParams
                  • +
                  • return
                  • +
                  • base
                  • +
                  diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index 767d30b1b2..7f3a29158b 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -20,3 +20,23 @@ sidebar_label: cwiki |groupId|groupId in generated pom.xml| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                    + +## RESERVED WORDS + +
                      diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 045175c038..bf00311720 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -22,3 +22,103 @@ sidebar_label: dart-dio |supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| |nullableFields|Is the null fields should be in the JSON payload| |null| |dateLibrary|Option. Date library to use|
                      **core**
                      Dart core library (DateTime)
                      **timemachine**
                      Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
                      |core| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|BuiltMap|package:built_collection/built_collection.dart| +|JsonObject|package:built_value/json_object.dart| +|Uint8List|dart:typed_data| +|BuiltList|package:built_collection/built_collection.dart| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
                      • bool
                      • +
                      • double
                      • +
                      • num
                      • +
                      • String
                      • +
                      • int
                      • +
                      + +## RESERVED WORDS + +
                      • do
                      • +
                      • source
                      • +
                      • while
                      • +
                      • operator
                      • +
                      • required
                      • +
                      • patch
                      • +
                      • late
                      • +
                      • continue
                      • +
                      • else
                      • +
                      • function
                      • +
                      • dynamic
                      • +
                      • catch
                      • +
                      • export
                      • +
                      • if
                      • +
                      • case
                      • +
                      • new
                      • +
                      • static
                      • +
                      • void
                      • +
                      • in
                      • +
                      • var
                      • +
                      • finally
                      • +
                      • this
                      • +
                      • is
                      • +
                      • sync
                      • +
                      • typedef
                      • +
                      • enum
                      • +
                      • covariant
                      • +
                      • mixin
                      • +
                      • as
                      • +
                      • external
                      • +
                      • extends
                      • +
                      • null
                      • +
                      • final
                      • +
                      • true
                      • +
                      • try
                      • +
                      • implements
                      • +
                      • deferred
                      • +
                      • extension
                      • +
                      • const
                      • +
                      • import
                      • +
                      • part
                      • +
                      • for
                      • +
                      • show
                      • +
                      • interface
                      • +
                      • out
                      • +
                      • switch
                      • +
                      • default
                      • +
                      • library
                      • +
                      • native
                      • +
                      • assert
                      • +
                      • get
                      • +
                      • of
                      • +
                      • yield
                      • +
                      • await
                      • +
                      • class
                      • +
                      • on
                      • +
                      • rethrow
                      • +
                      • factory
                      • +
                      • set
                      • +
                      • break
                      • +
                      • false
                      • +
                      • abstract
                      • +
                      • super
                      • +
                      • async
                      • +
                      • with
                      • +
                      • hide
                      • +
                      • inout
                      • +
                      • throw
                      • +
                      • return
                      • +
                      diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index 5a06755bf2..631c13c3b6 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -22,3 +22,99 @@ sidebar_label: dart-jaguar |supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| |nullableFields|Is the null fields should be in the JSON payload| |null| |serialization|Choose serialization format JSON or PROTO is supported| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
                      • bool
                      • +
                      • double
                      • +
                      • num
                      • +
                      • String
                      • +
                      • int
                      • +
                      + +## RESERVED WORDS + +
                      • do
                      • +
                      • source
                      • +
                      • while
                      • +
                      • operator
                      • +
                      • required
                      • +
                      • patch
                      • +
                      • late
                      • +
                      • continue
                      • +
                      • else
                      • +
                      • function
                      • +
                      • dynamic
                      • +
                      • catch
                      • +
                      • export
                      • +
                      • if
                      • +
                      • case
                      • +
                      • new
                      • +
                      • static
                      • +
                      • void
                      • +
                      • in
                      • +
                      • var
                      • +
                      • finally
                      • +
                      • this
                      • +
                      • is
                      • +
                      • sync
                      • +
                      • typedef
                      • +
                      • enum
                      • +
                      • covariant
                      • +
                      • mixin
                      • +
                      • as
                      • +
                      • external
                      • +
                      • extends
                      • +
                      • null
                      • +
                      • final
                      • +
                      • true
                      • +
                      • try
                      • +
                      • implements
                      • +
                      • deferred
                      • +
                      • extension
                      • +
                      • const
                      • +
                      • import
                      • +
                      • part
                      • +
                      • for
                      • +
                      • show
                      • +
                      • interface
                      • +
                      • out
                      • +
                      • switch
                      • +
                      • default
                      • +
                      • library
                      • +
                      • native
                      • +
                      • assert
                      • +
                      • get
                      • +
                      • of
                      • +
                      • yield
                      • +
                      • await
                      • +
                      • class
                      • +
                      • on
                      • +
                      • rethrow
                      • +
                      • factory
                      • +
                      • set
                      • +
                      • break
                      • +
                      • false
                      • +
                      • abstract
                      • +
                      • super
                      • +
                      • async
                      • +
                      • with
                      • +
                      • hide
                      • +
                      • inout
                      • +
                      • throw
                      • +
                      • return
                      • +
                      diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 12c6550b1c..779ddf7c18 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -20,3 +20,99 @@ sidebar_label: dart |useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| |sourceFolder|Source folder for generated code| |null| |supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
                      • bool
                      • +
                      • double
                      • +
                      • num
                      • +
                      • String
                      • +
                      • int
                      • +
                      + +## RESERVED WORDS + +
                      • do
                      • +
                      • source
                      • +
                      • while
                      • +
                      • operator
                      • +
                      • required
                      • +
                      • patch
                      • +
                      • late
                      • +
                      • continue
                      • +
                      • else
                      • +
                      • function
                      • +
                      • dynamic
                      • +
                      • catch
                      • +
                      • export
                      • +
                      • if
                      • +
                      • case
                      • +
                      • new
                      • +
                      • static
                      • +
                      • void
                      • +
                      • in
                      • +
                      • var
                      • +
                      • finally
                      • +
                      • this
                      • +
                      • is
                      • +
                      • sync
                      • +
                      • typedef
                      • +
                      • enum
                      • +
                      • covariant
                      • +
                      • mixin
                      • +
                      • as
                      • +
                      • external
                      • +
                      • extends
                      • +
                      • null
                      • +
                      • final
                      • +
                      • true
                      • +
                      • try
                      • +
                      • implements
                      • +
                      • deferred
                      • +
                      • extension
                      • +
                      • const
                      • +
                      • import
                      • +
                      • part
                      • +
                      • for
                      • +
                      • show
                      • +
                      • interface
                      • +
                      • out
                      • +
                      • switch
                      • +
                      • default
                      • +
                      • library
                      • +
                      • native
                      • +
                      • assert
                      • +
                      • get
                      • +
                      • of
                      • +
                      • yield
                      • +
                      • await
                      • +
                      • class
                      • +
                      • on
                      • +
                      • rethrow
                      • +
                      • factory
                      • +
                      • set
                      • +
                      • break
                      • +
                      • false
                      • +
                      • abstract
                      • +
                      • super
                      • +
                      • async
                      • +
                      • with
                      • +
                      • hide
                      • +
                      • inout
                      • +
                      • throw
                      • +
                      • return
                      • +
                      diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index 50752f564c..7527655ca3 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -14,3 +14,25 @@ sidebar_label: dynamic-html |groupId|groupId in generated pom.xml| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                        + +## RESERVED WORDS + +
                          diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index fb6b8d9cb9..9b853a32d8 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -8,3 +8,113 @@ sidebar_label: eiffel |packageName|Eiffel Cluster name (convention: lowercase).| |openapi| |packageVersion|Eiffel package version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ARRAYED_LIST| +|list|ARRAYED_LIST| +|map|STRING_TABLE| + + +## LANGUAGE PRIMITIVES + +
                          • INTEGER_16
                          • +
                          • NATURAL_16
                          • +
                          • INTEGER_8
                          • +
                          • REAL_32
                          • +
                          • INTEGER_32
                          • +
                          • INTEGER_64
                          • +
                          • REAL_64
                          • +
                          • NATURAL_8
                          • +
                          • BOOLEAN
                          • +
                          • NATURAL_64
                          • +
                          • NATURAL_32
                          • +
                          + +## RESERVED WORDS + +
                          • agent
                          • +
                          • select
                          • +
                          • separate
                          • +
                          • convert
                          • +
                          • do
                          • +
                          • when
                          • +
                          • else
                          • +
                          • loop
                          • +
                          • elseif
                          • +
                          • only
                          • +
                          • precursor
                          • +
                          • variant
                          • +
                          • create
                          • +
                          • from
                          • +
                          • export
                          • +
                          • if
                          • +
                          • all
                          • +
                          • ensure
                          • +
                          • void
                          • +
                          • like
                          • +
                          • old
                          • +
                          • frozen
                          • +
                          • require
                          • +
                          • check
                          • +
                          • then
                          • +
                          • undefine
                          • +
                          • invariant
                          • +
                          • as
                          • +
                          • external
                          • +
                          • once
                          • +
                          • inspect
                          • +
                          • true
                          • +
                          • deferred
                          • +
                          • note
                          • +
                          • obsolete
                          • +
                          • local
                          • +
                          • result
                          • +
                          • across
                          • +
                          • redefine
                          • +
                          • tuple
                          • +
                          • current
                          • +
                          • expanded
                          • +
                          • not
                          • +
                          • feature
                          • +
                          • and
                          • +
                          • alias
                          • +
                          • end
                          • +
                          • xor
                          • +
                          • attribute
                          • +
                          • class
                          • +
                          • rescue
                          • +
                          • retry
                          • +
                          • debug
                          • +
                          • or
                          • +
                          • false
                          • +
                          • rename
                          • +
                          • inherit
                          • +
                          • until
                          • +
                          • implies
                          • +
                          • assign
                          • +
                          diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index 2fb1cf776b..47c9405e6f 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -13,3 +13,57 @@ sidebar_label: elixir |invokerPackage|The main namespace to use for all classes. e.g. Yay.Pets| |null| |licenseHeader|The license header to prepend to the top of all source files.| |null| |packageName|Elixir package name (convention: lowercase).| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                          • Integer
                          • +
                          • Float
                          • +
                          • List
                          • +
                          • PID
                          • +
                          • String
                          • +
                          • Boolean
                          • +
                          • Map
                          • +
                          • Atom
                          • +
                          • Tuple
                          • +
                          • DateTime
                          • +
                          + +## RESERVED WORDS + +
                          • nil
                          • +
                          • __DIR__
                          • +
                          • __ENV__
                          • +
                          • __CALLER__
                          • +
                          • __FILE__
                          • +
                          • true
                          • +
                          • false
                          • +
                          • __MODULE__
                          • +
                          diff --git a/docs/generators/elm.md b/docs/generators/elm.md index 922560cd6d..3c1fabd660 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -9,3 +9,45 @@ sidebar_label: elm |elmPrefixCustomTypeVariants|Prefix custom type variants| |false| |elmEnableCustomBasePaths|Enable setting the base path for each request| |false| |elmEnableHttpRequestTrackers|Enable adding a tracker to each http request| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|List| +|map|Dict| + + +## LANGUAGE PRIMITIVES + +
                          • Float
                          • +
                          • Bool
                          • +
                          • Dict
                          • +
                          • List
                          • +
                          • String
                          • +
                          • Int
                          • +
                          + +## RESERVED WORDS + +
                          • import
                          • +
                          • in
                          • +
                          • module
                          • +
                          • then
                          • +
                          • type
                          • +
                          • exposing
                          • +
                          • as
                          • +
                          • port
                          • +
                          • else
                          • +
                          • of
                          • +
                          • let
                          • +
                          • where
                          • +
                          • if
                          • +
                          • case
                          • +
                          diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index 675e15f80f..cc4454bcd4 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -7,3 +7,66 @@ sidebar_label: erlang-client | ------ | ----------- | ------ | ------- | |packageName|Erlang application name (convention: lowercase).| |openapi| |packageName|Erlang application version| |1.0.0| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                            + +## RESERVED WORDS + +
                            • bsr
                            • +
                            • orelse
                            • +
                            • bor
                            • +
                            • cond
                            • +
                            • when
                            • +
                            • div
                            • +
                            • not
                            • +
                            • and
                            • +
                            • bxor
                            • +
                            • of
                            • +
                            • end
                            • +
                            • let
                            • +
                            • xor
                            • +
                            • after
                            • +
                            • band
                            • +
                            • catch
                            • +
                            • rem
                            • +
                            • if
                            • +
                            • case
                            • +
                            • bnot
                            • +
                            • receive
                            • +
                            • or
                            • +
                            • bsl
                            • +
                            • try
                            • +
                            • begin
                            • +
                            • andalso
                            • +
                            • fun
                            • +
                            diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 57187fdf49..9aa6ce7834 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -7,3 +7,66 @@ sidebar_label: erlang-proper | ------ | ----------- | ------ | ------- | |packageName|Erlang application name (convention: lowercase).| |openapi| |packageName|Erlang application version| |1.0.0| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                              + +## RESERVED WORDS + +
                              • bsr
                              • +
                              • orelse
                              • +
                              • bor
                              • +
                              • cond
                              • +
                              • when
                              • +
                              • div
                              • +
                              • not
                              • +
                              • and
                              • +
                              • bxor
                              • +
                              • of
                              • +
                              • end
                              • +
                              • let
                              • +
                              • xor
                              • +
                              • after
                              • +
                              • band
                              • +
                              • catch
                              • +
                              • rem
                              • +
                              • if
                              • +
                              • case
                              • +
                              • bnot
                              • +
                              • receive
                              • +
                              • or
                              • +
                              • bsl
                              • +
                              • try
                              • +
                              • begin
                              • +
                              • andalso
                              • +
                              • fun
                              • +
                              diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index 8e109cd37d..b63b6f2a50 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -7,3 +7,66 @@ sidebar_label: erlang-server | ------ | ----------- | ------ | ------- | |packageName|Erlang package name (convention: lowercase).| |openapi| |openAPISpecName|Openapi Spec Name.| |openapi| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                + +## RESERVED WORDS + +
                                • bsr
                                • +
                                • orelse
                                • +
                                • bor
                                • +
                                • cond
                                • +
                                • when
                                • +
                                • div
                                • +
                                • not
                                • +
                                • and
                                • +
                                • bxor
                                • +
                                • of
                                • +
                                • end
                                • +
                                • let
                                • +
                                • xor
                                • +
                                • after
                                • +
                                • band
                                • +
                                • catch
                                • +
                                • rem
                                • +
                                • if
                                • +
                                • case
                                • +
                                • bnot
                                • +
                                • receive
                                • +
                                • or
                                • +
                                • bsl
                                • +
                                • try
                                • +
                                • begin
                                • +
                                • andalso
                                • +
                                • fun
                                • +
                                diff --git a/docs/generators/flash.md b/docs/generators/flash.md index 53312f0fb4..aeedd28652 100644 --- a/docs/generators/flash.md +++ b/docs/generators/flash.md @@ -9,3 +9,61 @@ sidebar_label: flash |packageVersion|flash package version| |1.0.0| |invokerPackage|root package for generated code| |null| |sourceFolder|source folder for generated code. e.g. flash| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|File|flash.filesystem.File| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                • Array
                                • +
                                • Dictionary
                                • +
                                • Number
                                • +
                                • String
                                • +
                                • Boolean
                                • +
                                • Date
                                • +
                                + +## RESERVED WORDS + +
                                • for
                                • +
                                • lt
                                • +
                                • onclipevent
                                • +
                                • do
                                • +
                                • while
                                • +
                                • delete
                                • +
                                • not
                                • +
                                • and
                                • +
                                • continue
                                • +
                                • else
                                • +
                                • function
                                • +
                                • if
                                • +
                                • ge
                                • +
                                • typeof
                                • +
                                • on
                                • +
                                • add
                                • +
                                • new
                                • +
                                • void
                                • +
                                • or
                                • +
                                • ifframeloaded
                                • +
                                • break
                                • +
                                • in
                                • +
                                • var
                                • +
                                • telltarget
                                • +
                                • this
                                • +
                                • eq
                                • +
                                • gt
                                • +
                                • with
                                • +
                                • ne
                                • +
                                • le
                                • +
                                • return
                                • +
                                diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index 145573d67d..c233d81760 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -19,3 +19,169 @@ sidebar_label: fsharp-functions |packageVersion|F# package version.| |1.0.0| |packageGuid|The GUID that will be associated with the C# project| |null| |sourceFolder|source folder for generated code| |OpenAPI/src| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|IDictionary|System.Collections.Generic| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|list| +|list|list| +|map|IDictionary| + + +## LANGUAGE PRIMITIVES + +
                                • Dictionary
                                • +
                                • string
                                • +
                                • bool
                                • +
                                • String
                                • +
                                • System.IO.Stream
                                • +
                                • float
                                • +
                                • DateTime
                                • +
                                • int64
                                • +
                                • Int32
                                • +
                                • DataTimeOffset
                                • +
                                • dict
                                • +
                                • List
                                • +
                                • unativeint
                                • +
                                • uint32
                                • +
                                • uint16
                                • +
                                • seq
                                • +
                                • nativeint
                                • +
                                • double
                                • +
                                • float32
                                • +
                                • list
                                • +
                                • Double
                                • +
                                • int
                                • +
                                • int16
                                • +
                                • byte[]
                                • +
                                • single
                                • +
                                • Int64
                                • +
                                • obj
                                • +
                                • char
                                • +
                                • ICollection
                                • +
                                • Collection
                                • +
                                • uint64
                                • +
                                • decimal
                                • +
                                + +## RESERVED WORDS + +
                                • exception
                                • +
                                • struct
                                • +
                                • select
                                • +
                                • type
                                • +
                                • when
                                • +
                                • localVarQueryParams
                                • +
                                • else
                                • +
                                • mutable
                                • +
                                • lock
                                • +
                                • let
                                • +
                                • localVarPathParams
                                • +
                                • catch
                                • +
                                • if
                                • +
                                • case
                                • +
                                • val
                                • +
                                • localVarHttpHeaderAccepts
                                • +
                                • localVarPostBody
                                • +
                                • in
                                • +
                                • byte
                                • +
                                • double
                                • +
                                • module
                                • +
                                • is
                                • +
                                • elif
                                • +
                                • then
                                • +
                                • params
                                • +
                                • enum
                                • +
                                • explicit
                                • +
                                • as
                                • +
                                • begin
                                • +
                                • internal
                                • +
                                • yield!
                                • +
                                • lazy
                                • +
                                • localVarHttpHeaderAccept
                                • +
                                • use!
                                • +
                                • delegate
                                • +
                                • default
                                • +
                                • localVarHttpContentTypes
                                • +
                                • localVarHttpContentType
                                • +
                                • let!
                                • +
                                • assert
                                • +
                                • yield
                                • +
                                • member
                                • +
                                • override
                                • +
                                • event
                                • +
                                • break
                                • +
                                • downto
                                • +
                                • abstract
                                • +
                                • match!
                                • +
                                • char
                                • +
                                • localVarFileParams
                                • +
                                • to
                                • +
                                • fun
                                • +
                                • open
                                • +
                                • return
                                • +
                                • use
                                • +
                                • return!
                                • +
                                • extern
                                • +
                                • do
                                • +
                                • float
                                • +
                                • while
                                • +
                                • rec
                                • +
                                • continue
                                • +
                                • function
                                • +
                                • raise
                                • +
                                • checked
                                • +
                                • dynamic
                                • +
                                • new
                                • +
                                • static
                                • +
                                • void
                                • +
                                • upcast
                                • +
                                • localVarResponse
                                • +
                                • sealed
                                • +
                                • finally
                                • +
                                • done
                                • +
                                • null
                                • +
                                • localVarPath
                                • +
                                • true
                                • +
                                • fixed
                                • +
                                • try
                                • +
                                • decimal
                                • +
                                • option
                                • +
                                • private
                                • +
                                • bool
                                • +
                                • const
                                • +
                                • string
                                • +
                                • for
                                • +
                                • interface
                                • +
                                • foreach
                                • +
                                • not
                                • +
                                • public
                                • +
                                • localVarStatusCode
                                • +
                                • and
                                • +
                                • of
                                • +
                                • await
                                • +
                                • end
                                • +
                                • class
                                • +
                                • localVarFormParams
                                • +
                                • or
                                • +
                                • false
                                • +
                                • match
                                • +
                                • volatile
                                • +
                                • int
                                • +
                                • async
                                • +
                                • with
                                • +
                                • localVarHeaderParams
                                • +
                                • inline
                                • +
                                • downcast
                                • +
                                • inherit
                                • +
                                • namespace
                                • +
                                • base
                                • +
                                diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index bec1994334..f042e6b9ef 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -21,3 +21,169 @@ sidebar_label: fsharp-giraffe-server |useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false| |generateBody|Generates method body.| |true| |buildTarget|Target the build for a program or library.| |program| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|IDictionary|System.Collections.Generic| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|list| +|list|list| +|map|IDictionary| + + +## LANGUAGE PRIMITIVES + +
                                • Dictionary
                                • +
                                • string
                                • +
                                • bool
                                • +
                                • String
                                • +
                                • System.IO.Stream
                                • +
                                • float
                                • +
                                • DateTime
                                • +
                                • int64
                                • +
                                • Int32
                                • +
                                • DataTimeOffset
                                • +
                                • dict
                                • +
                                • List
                                • +
                                • unativeint
                                • +
                                • uint32
                                • +
                                • uint16
                                • +
                                • seq
                                • +
                                • nativeint
                                • +
                                • double
                                • +
                                • float32
                                • +
                                • list
                                • +
                                • Double
                                • +
                                • int
                                • +
                                • int16
                                • +
                                • byte[]
                                • +
                                • single
                                • +
                                • Int64
                                • +
                                • obj
                                • +
                                • char
                                • +
                                • ICollection
                                • +
                                • Collection
                                • +
                                • uint64
                                • +
                                • decimal
                                • +
                                + +## RESERVED WORDS + +
                                • exception
                                • +
                                • struct
                                • +
                                • select
                                • +
                                • type
                                • +
                                • when
                                • +
                                • localVarQueryParams
                                • +
                                • else
                                • +
                                • mutable
                                • +
                                • lock
                                • +
                                • let
                                • +
                                • localVarPathParams
                                • +
                                • catch
                                • +
                                • if
                                • +
                                • case
                                • +
                                • val
                                • +
                                • localVarHttpHeaderAccepts
                                • +
                                • localVarPostBody
                                • +
                                • in
                                • +
                                • byte
                                • +
                                • double
                                • +
                                • module
                                • +
                                • is
                                • +
                                • elif
                                • +
                                • then
                                • +
                                • params
                                • +
                                • enum
                                • +
                                • explicit
                                • +
                                • as
                                • +
                                • begin
                                • +
                                • internal
                                • +
                                • yield!
                                • +
                                • lazy
                                • +
                                • localVarHttpHeaderAccept
                                • +
                                • use!
                                • +
                                • delegate
                                • +
                                • default
                                • +
                                • localVarHttpContentTypes
                                • +
                                • localVarHttpContentType
                                • +
                                • let!
                                • +
                                • assert
                                • +
                                • yield
                                • +
                                • member
                                • +
                                • override
                                • +
                                • event
                                • +
                                • break
                                • +
                                • downto
                                • +
                                • abstract
                                • +
                                • match!
                                • +
                                • char
                                • +
                                • localVarFileParams
                                • +
                                • to
                                • +
                                • fun
                                • +
                                • open
                                • +
                                • return
                                • +
                                • use
                                • +
                                • return!
                                • +
                                • extern
                                • +
                                • do
                                • +
                                • float
                                • +
                                • while
                                • +
                                • rec
                                • +
                                • continue
                                • +
                                • function
                                • +
                                • raise
                                • +
                                • checked
                                • +
                                • dynamic
                                • +
                                • new
                                • +
                                • static
                                • +
                                • void
                                • +
                                • upcast
                                • +
                                • localVarResponse
                                • +
                                • sealed
                                • +
                                • finally
                                • +
                                • done
                                • +
                                • null
                                • +
                                • localVarPath
                                • +
                                • true
                                • +
                                • fixed
                                • +
                                • try
                                • +
                                • decimal
                                • +
                                • option
                                • +
                                • private
                                • +
                                • bool
                                • +
                                • const
                                • +
                                • string
                                • +
                                • for
                                • +
                                • interface
                                • +
                                • foreach
                                • +
                                • not
                                • +
                                • public
                                • +
                                • localVarStatusCode
                                • +
                                • and
                                • +
                                • of
                                • +
                                • await
                                • +
                                • end
                                • +
                                • class
                                • +
                                • localVarFormParams
                                • +
                                • or
                                • +
                                • false
                                • +
                                • match
                                • +
                                • volatile
                                • +
                                • int
                                • +
                                • async
                                • +
                                • with
                                • +
                                • localVarHeaderParams
                                • +
                                • inline
                                • +
                                • downcast
                                • +
                                • inherit
                                • +
                                • namespace
                                • +
                                • base
                                • +
                                diff --git a/docs/generators/go-experimental.md b/docs/generators/go-experimental.md index 00cec6310b..15d74272f0 100644 --- a/docs/generators/go-experimental.md +++ b/docs/generators/go-experimental.md @@ -15,3 +15,83 @@ sidebar_label: go-experimental |structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts| |false| |withAWSV4Signature|whether to include AWS v4 signature support| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                • string
                                • +
                                • bool
                                • +
                                • byte
                                • +
                                • float32
                                • +
                                • float64
                                • +
                                • uint
                                • +
                                • int
                                • +
                                • complex64
                                • +
                                • rune
                                • +
                                • int32
                                • +
                                • int64
                                • +
                                • complex128
                                • +
                                • uint64
                                • +
                                • uint32
                                • +
                                + +## RESERVED WORDS + +
                                • struct
                                • +
                                • defer
                                • +
                                • select
                                • +
                                • string
                                • +
                                • bool
                                • +
                                • const
                                • +
                                • import
                                • +
                                • for
                                • +
                                • range
                                • +
                                • float64
                                • +
                                • interface
                                • +
                                • type
                                • +
                                • error
                                • +
                                • complex64
                                • +
                                • rune
                                • +
                                • switch
                                • +
                                • nil
                                • +
                                • default
                                • +
                                • goto
                                • +
                                • int64
                                • +
                                • else
                                • +
                                • continue
                                • +
                                • int8
                                • +
                                • uint32
                                • +
                                • uint16
                                • +
                                • map
                                • +
                                • if
                                • +
                                • case
                                • +
                                • package
                                • +
                                • break
                                • +
                                • byte
                                • +
                                • var
                                • +
                                • go
                                • +
                                • float32
                                • +
                                • uint
                                • +
                                • int
                                • +
                                • int16
                                • +
                                • func
                                • +
                                • int32
                                • +
                                • complex128
                                • +
                                • uint64
                                • +
                                • uint8
                                • +
                                • chan
                                • +
                                • fallthrough
                                • +
                                • uintptr
                                • +
                                • return
                                • +
                                diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index 445f3c2d16..fabf59d855 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -8,3 +8,83 @@ sidebar_label: go-gin-server |packageName|Go package name (convention: lowercase).| |openapi| |packageVersion|Go package version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                • string
                                • +
                                • bool
                                • +
                                • byte
                                • +
                                • float32
                                • +
                                • float64
                                • +
                                • uint
                                • +
                                • int
                                • +
                                • complex64
                                • +
                                • rune
                                • +
                                • int32
                                • +
                                • int64
                                • +
                                • complex128
                                • +
                                • uint64
                                • +
                                • uint32
                                • +
                                + +## RESERVED WORDS + +
                                • struct
                                • +
                                • defer
                                • +
                                • select
                                • +
                                • string
                                • +
                                • bool
                                • +
                                • const
                                • +
                                • import
                                • +
                                • for
                                • +
                                • range
                                • +
                                • float64
                                • +
                                • interface
                                • +
                                • type
                                • +
                                • error
                                • +
                                • complex64
                                • +
                                • rune
                                • +
                                • switch
                                • +
                                • nil
                                • +
                                • default
                                • +
                                • goto
                                • +
                                • int64
                                • +
                                • else
                                • +
                                • continue
                                • +
                                • int8
                                • +
                                • uint32
                                • +
                                • uint16
                                • +
                                • map
                                • +
                                • if
                                • +
                                • case
                                • +
                                • package
                                • +
                                • break
                                • +
                                • byte
                                • +
                                • var
                                • +
                                • go
                                • +
                                • float32
                                • +
                                • uint
                                • +
                                • int
                                • +
                                • int16
                                • +
                                • func
                                • +
                                • int32
                                • +
                                • complex128
                                • +
                                • uint64
                                • +
                                • uint8
                                • +
                                • chan
                                • +
                                • fallthrough
                                • +
                                • uintptr
                                • +
                                • return
                                • +
                                diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index a602a39c42..c1bc80844f 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -11,3 +11,83 @@ sidebar_label: go-server |sourceFolder|source folder for generated code| |go| |serverPort|The network port the generated server binds to| |8080| |featureCORS|Enable Cross-Origin Resource Sharing middleware| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                • string
                                • +
                                • bool
                                • +
                                • byte
                                • +
                                • float32
                                • +
                                • float64
                                • +
                                • uint
                                • +
                                • int
                                • +
                                • complex64
                                • +
                                • rune
                                • +
                                • int32
                                • +
                                • int64
                                • +
                                • complex128
                                • +
                                • uint64
                                • +
                                • uint32
                                • +
                                + +## RESERVED WORDS + +
                                • struct
                                • +
                                • defer
                                • +
                                • select
                                • +
                                • string
                                • +
                                • bool
                                • +
                                • const
                                • +
                                • import
                                • +
                                • for
                                • +
                                • range
                                • +
                                • float64
                                • +
                                • interface
                                • +
                                • type
                                • +
                                • error
                                • +
                                • complex64
                                • +
                                • rune
                                • +
                                • switch
                                • +
                                • nil
                                • +
                                • default
                                • +
                                • goto
                                • +
                                • int64
                                • +
                                • else
                                • +
                                • continue
                                • +
                                • int8
                                • +
                                • uint32
                                • +
                                • uint16
                                • +
                                • map
                                • +
                                • if
                                • +
                                • case
                                • +
                                • package
                                • +
                                • break
                                • +
                                • byte
                                • +
                                • var
                                • +
                                • go
                                • +
                                • float32
                                • +
                                • uint
                                • +
                                • int
                                • +
                                • int16
                                • +
                                • func
                                • +
                                • int32
                                • +
                                • complex128
                                • +
                                • uint64
                                • +
                                • uint8
                                • +
                                • chan
                                • +
                                • fallthrough
                                • +
                                • uintptr
                                • +
                                • return
                                • +
                                diff --git a/docs/generators/go.md b/docs/generators/go.md index 0801d2108f..c26fb88d2e 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -15,3 +15,83 @@ sidebar_label: go |structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts| |false| |withAWSV4Signature|whether to include AWS v4 signature support| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                • string
                                • +
                                • bool
                                • +
                                • byte
                                • +
                                • float32
                                • +
                                • float64
                                • +
                                • uint
                                • +
                                • int
                                • +
                                • complex64
                                • +
                                • rune
                                • +
                                • int32
                                • +
                                • int64
                                • +
                                • complex128
                                • +
                                • uint64
                                • +
                                • uint32
                                • +
                                + +## RESERVED WORDS + +
                                • struct
                                • +
                                • defer
                                • +
                                • select
                                • +
                                • string
                                • +
                                • bool
                                • +
                                • const
                                • +
                                • import
                                • +
                                • for
                                • +
                                • range
                                • +
                                • float64
                                • +
                                • interface
                                • +
                                • type
                                • +
                                • error
                                • +
                                • complex64
                                • +
                                • rune
                                • +
                                • switch
                                • +
                                • nil
                                • +
                                • default
                                • +
                                • goto
                                • +
                                • int64
                                • +
                                • else
                                • +
                                • continue
                                • +
                                • int8
                                • +
                                • uint32
                                • +
                                • uint16
                                • +
                                • map
                                • +
                                • if
                                • +
                                • case
                                • +
                                • package
                                • +
                                • break
                                • +
                                • byte
                                • +
                                • var
                                • +
                                • go
                                • +
                                • float32
                                • +
                                • uint
                                • +
                                • int
                                • +
                                • int16
                                • +
                                • func
                                • +
                                • int32
                                • +
                                • complex128
                                • +
                                • uint64
                                • +
                                • uint8
                                • +
                                • chan
                                • +
                                • fallthrough
                                • +
                                • uintptr
                                • +
                                • return
                                • +
                                diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index 3ab10107cf..ff521e8015 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -8,3 +8,56 @@ sidebar_label: graphql-nodejs-express-server |packageName|GraphQL Node.js Express server package name (convention: lowercase).| |openapi3graphql-server| |packageVersion|GraphQL Node.js Express server package version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                • Float
                                • +
                                • null
                                • +
                                • ID
                                • +
                                • String
                                • +
                                • Boolean
                                • +
                                • Int
                                • +
                                + +## RESERVED WORDS + +
                                • implements
                                • +
                                • boolean
                                • +
                                • null
                                • +
                                • string
                                • +
                                • query
                                • +
                                • id
                                • +
                                • union
                                • +
                                • float
                                • +
                                • type
                                • +
                                • interface
                                • +
                                • int
                                • +
                                diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index 83b90af0be..f87416a2fb 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -8,3 +8,56 @@ sidebar_label: graphql-schema |packageName|GraphQL package name (convention: lowercase).| |openapi2graphql| |packageVersion|GraphQL package version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                • Float
                                • +
                                • null
                                • +
                                • ID
                                • +
                                • String
                                • +
                                • Boolean
                                • +
                                • Int
                                • +
                                + +## RESERVED WORDS + +
                                • implements
                                • +
                                • boolean
                                • +
                                • null
                                • +
                                • string
                                • +
                                • query
                                • +
                                • id
                                • +
                                • union
                                • +
                                • float
                                • +
                                • type
                                • +
                                • interface
                                • +
                                • int
                                • +
                                diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index a3a5463a3b..e1ec15d3b5 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -40,3 +40,124 @@ sidebar_label: groovy |parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                **true**
                                Use a SnapShot Version
                                **false**
                                Use a Release Version
                                |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                • ArrayList
                                • +
                                • String
                                • +
                                • Double
                                • +
                                • Date
                                • +
                                • Integer
                                • +
                                • byte[]
                                • +
                                • Float
                                • +
                                • boolean
                                • +
                                • Long
                                • +
                                • Object
                                • +
                                • Boolean
                                • +
                                • File
                                • +
                                • Map
                                • +
                                + +## RESERVED WORDS + +
                                • localvaraccepts
                                • +
                                • synchronized
                                • +
                                • do
                                • +
                                • float
                                • +
                                • while
                                • +
                                • localvarpath
                                • +
                                • protected
                                • +
                                • continue
                                • +
                                • else
                                • +
                                • apiclient
                                • +
                                • localvarqueryparams
                                • +
                                • catch
                                • +
                                • if
                                • +
                                • case
                                • +
                                • new
                                • +
                                • package
                                • +
                                • static
                                • +
                                • void
                                • +
                                • localvaraccept
                                • +
                                • double
                                • +
                                • byte
                                • +
                                • finally
                                • +
                                • this
                                • +
                                • strictfp
                                • +
                                • throws
                                • +
                                • enum
                                • +
                                • extends
                                • +
                                • null
                                • +
                                • transient
                                • +
                                • apiexception
                                • +
                                • final
                                • +
                                • try
                                • +
                                • object
                                • +
                                • localvarcontenttypes
                                • +
                                • implements
                                • +
                                • private
                                • +
                                • import
                                • +
                                • const
                                • +
                                • configuration
                                • +
                                • for
                                • +
                                • apiresponse
                                • +
                                • interface
                                • +
                                • long
                                • +
                                • switch
                                • +
                                • default
                                • +
                                • goto
                                • +
                                • public
                                • +
                                • localvarheaderparams
                                • +
                                • native
                                • +
                                • localvarcontenttype
                                • +
                                • assert
                                • +
                                • stringutil
                                • +
                                • class
                                • +
                                • localvarcollectionqueryparams
                                • +
                                • localvarcookieparams
                                • +
                                • localreturntype
                                • +
                                • localvarformparams
                                • +
                                • break
                                • +
                                • volatile
                                • +
                                • localvarauthnames
                                • +
                                • abstract
                                • +
                                • int
                                • +
                                • instanceof
                                • +
                                • super
                                • +
                                • boolean
                                • +
                                • throw
                                • +
                                • localvarpostbody
                                • +
                                • char
                                • +
                                • short
                                • +
                                • return
                                • +
                                diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index f79606c6db..b0abf7faa1 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -31,3 +31,67 @@ sidebar_label: haskell-http-client |dateFormat|format string used to parse/render a date| |%Y-%m-%d| |customTestInstanceModule|test module used to provide typeclass instances for types not known by the generator| |null| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                • Integer
                                • +
                                • FilePath
                                • +
                                • Float
                                • +
                                • Bool
                                • +
                                • Char
                                • +
                                • List
                                • +
                                • Text
                                • +
                                • String
                                • +
                                • Double
                                • +
                                • Int
                                • +
                                + +## RESERVED WORDS + +
                                • qualified
                                • +
                                • instance
                                • +
                                • data
                                • +
                                • import
                                • +
                                • infixr
                                • +
                                • do
                                • +
                                • type
                                • +
                                • pure
                                • +
                                • foreign
                                • +
                                • newtype
                                • +
                                • hiding
                                • +
                                • rec
                                • +
                                • default
                                • +
                                • else
                                • +
                                • of
                                • +
                                • let
                                • +
                                • where
                                • +
                                • class
                                • +
                                • if
                                • +
                                • case
                                • +
                                • proc
                                • +
                                • in
                                • +
                                • forall
                                • +
                                • module
                                • +
                                • then
                                • +
                                • infix
                                • +
                                • accept
                                • +
                                • contenttype
                                • +
                                • as
                                • +
                                • deriving
                                • +
                                • infixl
                                • +
                                • mdo
                                • +
                                • family
                                • +
                                • return
                                • +
                                diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 89cd90586d..650ba8a604 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -13,3 +13,63 @@ sidebar_label: haskell |modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| |serveStatic|serve will serve files from the directory 'static'.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|Map|qualified Data.Map as Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                • Integer
                                • +
                                • FilePath
                                • +
                                • Float
                                • +
                                • Bool
                                • +
                                • Char
                                • +
                                • List
                                • +
                                • String
                                • +
                                • Double
                                • +
                                • Int
                                • +
                                + +## RESERVED WORDS + +
                                • qualified
                                • +
                                • instance
                                • +
                                • data
                                • +
                                • import
                                • +
                                • infixr
                                • +
                                • do
                                • +
                                • type
                                • +
                                • foreign
                                • +
                                • newtype
                                • +
                                • hiding
                                • +
                                • rec
                                • +
                                • default
                                • +
                                • else
                                • +
                                • of
                                • +
                                • let
                                • +
                                • where
                                • +
                                • class
                                • +
                                • if
                                • +
                                • case
                                • +
                                • proc
                                • +
                                • in
                                • +
                                • forall
                                • +
                                • module
                                • +
                                • then
                                • +
                                • infix
                                • +
                                • as
                                • +
                                • deriving
                                • +
                                • infixl
                                • +
                                • mdo
                                • +
                                • family
                                • +
                                diff --git a/docs/generators/html.md b/docs/generators/html.md index 0c75b44dd0..f0e0d3fe22 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -20,3 +20,23 @@ sidebar_label: html |groupId|groupId in generated pom.xml| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                  + +## RESERVED WORDS + +
                                    diff --git a/docs/generators/html2.md b/docs/generators/html2.md index 3b7775d5fc..cc4f542562 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -24,3 +24,23 @@ sidebar_label: html2 |groupId|groupId in generated pom.xml| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                      + +## RESERVED WORDS + +
                                        diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index f50718a448..fd9ecfa521 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -42,3 +42,120 @@ sidebar_label: java-inflector |parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                        **true**
                                        Use a SnapShot Version
                                        **false**
                                        Use a Release Version
                                        |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index d6f8235503..30f52f7ded 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -47,3 +47,120 @@ sidebar_label: java-msf4j |useBeanValidation|Use BeanValidation API annotations| |true| |serverPort|The port on which the server should be started| |8080| |library|library template (sub-template)|
                                        **jersey1**
                                        Jersey core 1.x
                                        **jersey2**
                                        Jersey core 2.x
                                        |jersey2| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index a9ef34390f..bb16e088e0 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -49,3 +49,120 @@ sidebar_label: java-pkmst |zipkinUri|Zipkin URI| |null| |springBootAdminUri|Spring-Boot URI| |null| |pkmstInterceptor|PKMST Interceptor| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index bb4fb690a2..0cf0804b36 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -51,3 +51,120 @@ sidebar_label: java-play-framework |handleExceptions|Add a 'throw exception' to each controller function. Add also a custom error handler where you can put your custom logic| |true| |wrapCalls|Add a wrapper to each controller function to handle things like metrics, response modification, etc..| |true| |useSwaggerUI|Add a route to /api which show your documentation in swagger-ui. Will also import needed dependencies| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index dd4bac2ca0..1325b002fe 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -42,3 +42,120 @@ sidebar_label: java-undertow-server |parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                        **true**
                                        Use a SnapShot Version
                                        **false**
                                        Use a Release Version
                                        |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 2cc47cad07..4c40dfc2a8 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -42,3 +42,120 @@ sidebar_label: java-vertx-web |parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                        **true**
                                        Use a SnapShot Version
                                        **false**
                                        Use a Release Version
                                        |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 1ad7527103..4ad79ef3cf 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -45,3 +45,120 @@ sidebar_label: java-vertx |rxInterface|When specified, API interfaces are generated with RX and methods return Single<> and Comparable.| |false| |rxVersion2|When specified in combination with rxInterface, API interfaces are generated with RxJava2.| |false| |vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/java.md b/docs/generators/java.md index 9c267d17fb..9f8e768824 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -57,3 +57,120 @@ sidebar_label: java |caseInsensitiveResponseHeaders|Make API response's headers case-insensitive. Available on okhttp-gson, jersey2 libraries| |false| |library|library template (sub-template) to use|
                                        **jersey1**
                                        HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
                                        **jersey2**
                                        HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
                                        **feign**
                                        HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.9.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'
                                        **okhttp-gson**
                                        [DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
                                        **retrofit**
                                        HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
                                        **retrofit2**
                                        HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
                                        **resttemplate**
                                        HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
                                        **webclient**
                                        HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
                                        **resteasy**
                                        HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
                                        **vertx**
                                        HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
                                        **google-api-client**
                                        HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
                                        **rest-assured**
                                        HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.9.x. Only for Java8
                                        **native**
                                        HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
                                        **microprofile**
                                        HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x
                                        |okhttp-gson| |serializationLibrary|Serialization library, default depends from the library|
                                        **jackson**
                                        Use Jackson as serialization library
                                        **gson**
                                        Use Gson as serialization library
                                        |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index 20c4048fec..33cb0cde47 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -12,3 +12,74 @@ sidebar_label: javascript-closure-angular |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |useEs6|use ES6 templates| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                        • number
                                        • +
                                        • Blob
                                        • +
                                        • boolean
                                        • +
                                        • string
                                        • +
                                        • Object
                                        • +
                                        • Date
                                        • +
                                        + +## RESERVED WORDS + +
                                        • implements
                                        • +
                                        • synchronized
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • for
                                        • +
                                        • do
                                        • +
                                        • interface
                                        • +
                                        • while
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • protected
                                        • +
                                        • public
                                        • +
                                        • continue
                                        • +
                                        • assert
                                        • +
                                        • else
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • class
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • break
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • abstract
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • extends
                                        • +
                                        • throw
                                        • +
                                        • transient
                                        • +
                                        • char
                                        • +
                                        • final
                                        • +
                                        • short
                                        • +
                                        • try
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index f5fb5207f4..653f03e948 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -16,3 +16,120 @@ sidebar_label: javascript-flowtyped |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| |snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| +|list|Array| +|map|Object| + + +## LANGUAGE PRIMITIVES + +
                                        • Array
                                        • +
                                        • number
                                        • +
                                        • Blob
                                        • +
                                        • boolean
                                        • +
                                        • string
                                        • +
                                        • Object
                                        • +
                                        • File
                                        • +
                                        • Date
                                        • +
                                        + +## RESERVED WORDS + +
                                        • date
                                        • +
                                        • synchronized
                                        • +
                                        • requestoptions
                                        • +
                                        • debugger
                                        • +
                                        • isfinite
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • hasownproperty
                                        • +
                                        • number
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • function
                                        • +
                                        • let
                                        • +
                                        • nan
                                        • +
                                        • catch
                                        • +
                                        • export
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • in
                                        • +
                                        • byte
                                        • +
                                        • double
                                        • +
                                        • var
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • isprototypeof
                                        • +
                                        • throws
                                        • +
                                        • formparams
                                        • +
                                        • enum
                                        • +
                                        • headerparams
                                        • +
                                        • varlocaldeferred
                                        • +
                                        • useformdata
                                        • +
                                        • eval
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • final
                                        • +
                                        • true
                                        • +
                                        • try
                                        • +
                                        • math
                                        • +
                                        • varlocalpath
                                        • +
                                        • object
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • const
                                        • +
                                        • import
                                        • +
                                        • string
                                        • +
                                        • queryparameters
                                        • +
                                        • valueof
                                        • +
                                        • for
                                        • +
                                        • interface
                                        • +
                                        • isnan
                                        • +
                                        • delete
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • undefined
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • native
                                        • +
                                        • array
                                        • +
                                        • yield
                                        • +
                                        • class
                                        • +
                                        • typeof
                                        • +
                                        • break
                                        • +
                                        • false
                                        • +
                                        • volatile
                                        • +
                                        • abstract
                                        • +
                                        • prototype
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • with
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • arguments
                                        • +
                                        • infinity
                                        • +
                                        • tostring
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index 23aa54a57b..acb79669c4 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -26,3 +26,113 @@ sidebar_label: javascript |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |useES6|use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| +|list|Array| +|map|Object| + + +## LANGUAGE PRIMITIVES + +
                                        • Array
                                        • +
                                        • Blob
                                        • +
                                        • Number
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • File
                                        • +
                                        • Date
                                        • +
                                        + +## RESERVED WORDS + +
                                        • date
                                        • +
                                        • synchronized
                                        • +
                                        • debugger
                                        • +
                                        • isfinite
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • hasownproperty
                                        • +
                                        • number
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • function
                                        • +
                                        • let
                                        • +
                                        • nan
                                        • +
                                        • catch
                                        • +
                                        • export
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • in
                                        • +
                                        • byte
                                        • +
                                        • double
                                        • +
                                        • var
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • isprototypeof
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • eval
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • final
                                        • +
                                        • true
                                        • +
                                        • try
                                        • +
                                        • math
                                        • +
                                        • object
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • const
                                        • +
                                        • import
                                        • +
                                        • string
                                        • +
                                        • valueof
                                        • +
                                        • for
                                        • +
                                        • interface
                                        • +
                                        • isnan
                                        • +
                                        • delete
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • undefined
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • native
                                        • +
                                        • array
                                        • +
                                        • yield
                                        • +
                                        • class
                                        • +
                                        • typeof
                                        • +
                                        • break
                                        • +
                                        • false
                                        • +
                                        • volatile
                                        • +
                                        • abstract
                                        • +
                                        • prototype
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • with
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • arguments
                                        • +
                                        • infinity
                                        • +
                                        • tostring
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index ff8be78361..d9cad8eca2 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -53,3 +53,120 @@ sidebar_label: jaxrs-cxf-cdi |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| |openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null| |useBeanValidation|Use BeanValidation API annotations| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 401b13a22c..05d97cd950 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -46,3 +46,120 @@ sidebar_label: jaxrs-cxf-client |useGzipFeatureForTests|Use Gzip Feature for tests| |false| |useLoggingFeatureForTests|Use Logging Feature for tests| |false| |useGenericResponse|Use generic response| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 03dcf52b07..6811098135 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -68,3 +68,120 @@ sidebar_label: jaxrs-cxf-extended |loadTestDataFromFile|Load test data from a generated JSON file| |false| |testDataFile|JSON file to contain generated test data| |null| |testDataControlFile|JSON file to control test data generation| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 5bb65f09b1..515319a26e 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -63,3 +63,120 @@ sidebar_label: jaxrs-cxf |useAnnotatedBasePath|Use @Path annotations for basePath| |false| |generateNonSpringApplication|Generate non-Spring application| |false| |useGenericResponse|Use generic response| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 489987ffc0..d930e4c079 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -49,3 +49,120 @@ sidebar_label: jaxrs-jersey |library|library template (sub-template)|
                                        **jersey1**
                                        Jersey core 1.x
                                        **jersey2**
                                        Jersey core 2.x
                                        |jersey2| |supportJava6|Whether to support Java6 with the Jersey1/2 library.| |false| |useTags|use tags for creating interface and controller classnames| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 3dce1089ae..905c30e52f 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -49,3 +49,120 @@ sidebar_label: jaxrs-resteasy-eap |useBeanValidation|Use BeanValidation API annotations| |true| |generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |true| |useSwaggerFeature|Use dynamic Swagger generator| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index 4712a95cdc..cec7263ce5 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -47,3 +47,120 @@ sidebar_label: jaxrs-resteasy |useBeanValidation|Use BeanValidation API annotations| |true| |serverPort|The port on which the server should be started| |8080| |generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index eac2f0d61b..6804b06c4a 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -52,3 +52,120 @@ sidebar_label: jaxrs-spec |returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| |openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                        • Integer
                                        • +
                                        • byte[]
                                        • +
                                        • Float
                                        • +
                                        • boolean
                                        • +
                                        • Long
                                        • +
                                        • Object
                                        • +
                                        • String
                                        • +
                                        • Boolean
                                        • +
                                        • Double
                                        • +
                                        + +## RESERVED WORDS + +
                                        • localvaraccepts
                                        • +
                                        • synchronized
                                        • +
                                        • do
                                        • +
                                        • float
                                        • +
                                        • while
                                        • +
                                        • localvarpath
                                        • +
                                        • protected
                                        • +
                                        • continue
                                        • +
                                        • else
                                        • +
                                        • apiclient
                                        • +
                                        • localvarqueryparams
                                        • +
                                        • catch
                                        • +
                                        • if
                                        • +
                                        • case
                                        • +
                                        • new
                                        • +
                                        • package
                                        • +
                                        • static
                                        • +
                                        • void
                                        • +
                                        • localvaraccept
                                        • +
                                        • double
                                        • +
                                        • byte
                                        • +
                                        • finally
                                        • +
                                        • this
                                        • +
                                        • strictfp
                                        • +
                                        • throws
                                        • +
                                        • enum
                                        • +
                                        • extends
                                        • +
                                        • null
                                        • +
                                        • transient
                                        • +
                                        • apiexception
                                        • +
                                        • final
                                        • +
                                        • try
                                        • +
                                        • object
                                        • +
                                        • localvarcontenttypes
                                        • +
                                        • implements
                                        • +
                                        • private
                                        • +
                                        • import
                                        • +
                                        • const
                                        • +
                                        • configuration
                                        • +
                                        • for
                                        • +
                                        • apiresponse
                                        • +
                                        • interface
                                        • +
                                        • long
                                        • +
                                        • switch
                                        • +
                                        • default
                                        • +
                                        • goto
                                        • +
                                        • public
                                        • +
                                        • localvarheaderparams
                                        • +
                                        • native
                                        • +
                                        • localvarcontenttype
                                        • +
                                        • assert
                                        • +
                                        • stringutil
                                        • +
                                        • class
                                        • +
                                        • localvarcollectionqueryparams
                                        • +
                                        • localvarcookieparams
                                        • +
                                        • localreturntype
                                        • +
                                        • localvarformparams
                                        • +
                                        • break
                                        • +
                                        • volatile
                                        • +
                                        • localvarauthnames
                                        • +
                                        • abstract
                                        • +
                                        • int
                                        • +
                                        • instanceof
                                        • +
                                        • super
                                        • +
                                        • boolean
                                        • +
                                        • throw
                                        • +
                                        • localvarpostbody
                                        • +
                                        • char
                                        • +
                                        • short
                                        • +
                                        • return
                                        • +
                                        diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 20f3183420..823e0a59a1 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -10,3 +10,41 @@ sidebar_label: jmeter |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                          + +## RESERVED WORDS + +
                                          • sample1
                                          • +
                                          • sample2
                                          • +
                                          diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index 135c570669..f4fdcf2a41 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -24,3 +24,78 @@ sidebar_label: kotlin-server |featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true| |featureCORS|Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org.| |false| |featureCompression|Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|UUID|java.util.UUID| +|URI|java.net.URI| +|File|java.io.File| +|Timestamp|java.sql.Timestamp| +|LocalDate|java.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|java.time.LocalDateTime| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|kotlin.arrayOf| +|list|kotlin.arrayOf| +|map|kotlin.mapOf| + + +## LANGUAGE PRIMITIVES + +
                                          • kotlin.collections.List
                                          • +
                                          • kotlin.Float
                                          • +
                                          • kotlin.Double
                                          • +
                                          • kotlin.String
                                          • +
                                          • kotlin.Array
                                          • +
                                          • kotlin.Byte
                                          • +
                                          • kotlin.collections.Map
                                          • +
                                          • kotlin.Short
                                          • +
                                          • kotlin.Boolean
                                          • +
                                          • kotlin.Long
                                          • +
                                          • kotlin.Char
                                          • +
                                          • kotlin.ByteArray
                                          • +
                                          • kotlin.Int
                                          • +
                                          • kotlin.collections.Set
                                          • +
                                          + +## RESERVED WORDS + +
                                          • for
                                          • +
                                          • do
                                          • +
                                          • interface
                                          • +
                                          • while
                                          • +
                                          • when
                                          • +
                                          • continue
                                          • +
                                          • else
                                          • +
                                          • typealias
                                          • +
                                          • class
                                          • +
                                          • if
                                          • +
                                          • typeof
                                          • +
                                          • val
                                          • +
                                          • package
                                          • +
                                          • break
                                          • +
                                          • in
                                          • +
                                          • var
                                          • +
                                          • false
                                          • +
                                          • this
                                          • +
                                          • is
                                          • +
                                          • super
                                          • +
                                          • as
                                          • +
                                          • null
                                          • +
                                          • throw
                                          • +
                                          • true
                                          • +
                                          • try
                                          • +
                                          • fun
                                          • +
                                          • return
                                          • +
                                          • object
                                          • +
                                          diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index 2ad78b7b90..b89ee519a5 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -33,3 +33,81 @@ sidebar_label: kotlin-spring |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |delegatePattern|Whether to generate the server files using the delegate pattern| |false| |library|library template (sub-template)|
                                          **spring-boot**
                                          Spring-boot Server application.
                                          |spring-boot| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|UUID|java.util.UUID| +|URI|java.net.URI| +|File|java.io.File| +|Timestamp|java.sql.Timestamp| +|LocalDate|java.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.time.LocalDate| +|DateTime|java.time.OffsetDateTime| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|kotlin.arrayOf| +|list|kotlin.arrayOf| +|map|kotlin.mapOf| + + +## LANGUAGE PRIMITIVES + +
                                          • kotlin.collections.List
                                          • +
                                          • kotlin.Float
                                          • +
                                          • kotlin.Double
                                          • +
                                          • kotlin.String
                                          • +
                                          • kotlin.Array
                                          • +
                                          • kotlin.Byte
                                          • +
                                          • kotlin.collections.Map
                                          • +
                                          • kotlin.Short
                                          • +
                                          • kotlin.Boolean
                                          • +
                                          • kotlin.Long
                                          • +
                                          • kotlin.Char
                                          • +
                                          • kotlin.ByteArray
                                          • +
                                          • kotlin.Int
                                          • +
                                          • kotlin.collections.Set
                                          • +
                                          + +## RESERVED WORDS + +
                                          • for
                                          • +
                                          • do
                                          • +
                                          • interface
                                          • +
                                          • while
                                          • +
                                          • when
                                          • +
                                          • ApiResponse
                                          • +
                                          • continue
                                          • +
                                          • else
                                          • +
                                          • typealias
                                          • +
                                          • class
                                          • +
                                          • if
                                          • +
                                          • typeof
                                          • +
                                          • val
                                          • +
                                          • package
                                          • +
                                          • break
                                          • +
                                          • in
                                          • +
                                          • var
                                          • +
                                          • false
                                          • +
                                          • this
                                          • +
                                          • is
                                          • +
                                          • ApiClient
                                          • +
                                          • super
                                          • +
                                          • as
                                          • +
                                          • null
                                          • +
                                          • throw
                                          • +
                                          • true
                                          • +
                                          • try
                                          • +
                                          • fun
                                          • +
                                          • return
                                          • +
                                          • object
                                          • +
                                          • ApiException
                                          • +
                                          diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index fd37a2cc8d..07d1b61ef1 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -18,3 +18,78 @@ sidebar_label: kotlin-vertx |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| |modelMutable|Create mutable models| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|UUID|java.util.UUID| +|URI|java.net.URI| +|File|java.io.File| +|Timestamp|java.sql.Timestamp| +|LocalDate|java.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|java.time.LocalDateTime| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|kotlin.arrayOf| +|list|kotlin.arrayOf| +|map|kotlin.mapOf| + + +## LANGUAGE PRIMITIVES + +
                                          • kotlin.collections.List
                                          • +
                                          • kotlin.Float
                                          • +
                                          • kotlin.Double
                                          • +
                                          • kotlin.String
                                          • +
                                          • kotlin.Array
                                          • +
                                          • kotlin.Byte
                                          • +
                                          • kotlin.collections.Map
                                          • +
                                          • kotlin.Short
                                          • +
                                          • kotlin.Boolean
                                          • +
                                          • kotlin.Long
                                          • +
                                          • kotlin.Char
                                          • +
                                          • kotlin.ByteArray
                                          • +
                                          • kotlin.Int
                                          • +
                                          • kotlin.collections.Set
                                          • +
                                          + +## RESERVED WORDS + +
                                          • for
                                          • +
                                          • do
                                          • +
                                          • interface
                                          • +
                                          • while
                                          • +
                                          • when
                                          • +
                                          • continue
                                          • +
                                          • else
                                          • +
                                          • typealias
                                          • +
                                          • class
                                          • +
                                          • if
                                          • +
                                          • typeof
                                          • +
                                          • val
                                          • +
                                          • package
                                          • +
                                          • break
                                          • +
                                          • in
                                          • +
                                          • var
                                          • +
                                          • false
                                          • +
                                          • this
                                          • +
                                          • is
                                          • +
                                          • super
                                          • +
                                          • as
                                          • +
                                          • null
                                          • +
                                          • throw
                                          • +
                                          • true
                                          • +
                                          • try
                                          • +
                                          • fun
                                          • +
                                          • return
                                          • +
                                          • object
                                          • +
                                          diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 5c8f71e679..27b430a29d 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -22,3 +22,78 @@ sidebar_label: kotlin |collectionType|Option. Collection type to use|
                                          **array**
                                          kotlin.Array
                                          **list**
                                          kotlin.collections.List
                                          |array| |library|Library template (sub-template) to use|
                                          **jvm-okhttp4**
                                          [DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
                                          **jvm-okhttp3**
                                          Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
                                          **jvm-retrofit2**
                                          Platform: Java Virtual Machine. HTTP client: Retrofit 2.6.2.
                                          **multiplatform**
                                          Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.
                                          |jvm-okhttp4| |requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|
                                          **toJson**
                                          Date formater option using a json converter.
                                          **toString**
                                          [DEFAULT] Use the 'toString'-method of the date-time object to retrieve the related string representation.
                                          |toString| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|UUID|java.util.UUID| +|URI|java.net.URI| +|File|java.io.File| +|Timestamp|java.sql.Timestamp| +|LocalDate|java.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|java.time.LocalDateTime| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|kotlin.arrayOf| +|list|kotlin.arrayOf| +|map|kotlin.mapOf| + + +## LANGUAGE PRIMITIVES + +
                                          • kotlin.collections.List
                                          • +
                                          • kotlin.Float
                                          • +
                                          • kotlin.Double
                                          • +
                                          • kotlin.String
                                          • +
                                          • kotlin.Array
                                          • +
                                          • kotlin.Byte
                                          • +
                                          • kotlin.collections.Map
                                          • +
                                          • kotlin.Short
                                          • +
                                          • kotlin.Boolean
                                          • +
                                          • kotlin.Long
                                          • +
                                          • kotlin.Char
                                          • +
                                          • kotlin.ByteArray
                                          • +
                                          • kotlin.Int
                                          • +
                                          • kotlin.collections.Set
                                          • +
                                          + +## RESERVED WORDS + +
                                          • for
                                          • +
                                          • do
                                          • +
                                          • interface
                                          • +
                                          • while
                                          • +
                                          • when
                                          • +
                                          • continue
                                          • +
                                          • else
                                          • +
                                          • typealias
                                          • +
                                          • class
                                          • +
                                          • if
                                          • +
                                          • typeof
                                          • +
                                          • val
                                          • +
                                          • package
                                          • +
                                          • break
                                          • +
                                          • in
                                          • +
                                          • var
                                          • +
                                          • false
                                          • +
                                          • this
                                          • +
                                          • is
                                          • +
                                          • super
                                          • +
                                          • as
                                          • +
                                          • null
                                          • +
                                          • throw
                                          • +
                                          • true
                                          • +
                                          • try
                                          • +
                                          • fun
                                          • +
                                          • return
                                          • +
                                          • object
                                          • +
                                          diff --git a/docs/generators/lua.md b/docs/generators/lua.md index b466a5a70f..a7d814198f 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -8,3 +8,57 @@ sidebar_label: lua |packageName|Lua package name (convention: single word).| |openapiclient| |packageVersion|Lua package version.| |1.0.0-1| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|time.Time|time| +|os|io/ioutil| +|*os.File|os| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                          • nil
                                          • +
                                          • number
                                          • +
                                          • boolean
                                          • +
                                          • string
                                          • +
                                          + +## RESERVED WORDS + +
                                          • string
                                          • +
                                          • for
                                          • +
                                          • do
                                          • +
                                          • while
                                          • +
                                          • local
                                          • +
                                          • nil
                                          • +
                                          • number
                                          • +
                                          • userdata
                                          • +
                                          • not
                                          • +
                                          • and
                                          • +
                                          • else
                                          • +
                                          • elseif
                                          • +
                                          • function
                                          • +
                                          • repeat
                                          • +
                                          • end
                                          • +
                                          • if
                                          • +
                                          • table
                                          • +
                                          • or
                                          • +
                                          • break
                                          • +
                                          • in
                                          • +
                                          • false
                                          • +
                                          • thread
                                          • +
                                          • then
                                          • +
                                          • boolean
                                          • +
                                          • true
                                          • +
                                          • until
                                          • +
                                          • return
                                          • +
                                          diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index 5fe5f9d699..561bfa1cf2 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -10,3 +10,39 @@ sidebar_label: markdown |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                            + +## RESERVED WORDS + +
                                              diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 6b48a721cb..5ed0960101 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -8,3 +8,309 @@ sidebar_label: mysql-schema |defaultDatabaseName|Default database name for all MySQL queries| || |jsonDataTypeEnabled|Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled| |true| |identifierNamingConvention|Naming convention of MySQL identifiers(table names and column names). This is not related to database name which is defined by defaultDatabaseName option|
                                              **original**
                                              Do not transform original names
                                              **snake_case**
                                              Use snake_case names
                                              |original| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                              • date
                                              • +
                                              • void
                                              • +
                                              • bool
                                              • +
                                              • string
                                              • +
                                              • double
                                              • +
                                              • byte
                                              • +
                                              • mixed
                                              • +
                                              • integer
                                              • +
                                              • float
                                              • +
                                              • URI
                                              • +
                                              • int
                                              • +
                                              • Date
                                              • +
                                              • DateTime
                                              • +
                                              • long
                                              • +
                                              • BigDecimal
                                              • +
                                              • number
                                              • +
                                              • boolean
                                              • +
                                              • file
                                              • +
                                              • binary
                                              • +
                                              • char
                                              • +
                                              • short
                                              • +
                                              • ByteArray
                                              • +
                                              • UUID
                                              • +
                                              + +## RESERVED WORDS + +
                                              • dec
                                              • +
                                              • low_priority
                                              • +
                                              • references
                                              • +
                                              • leading
                                              • +
                                              • insensitive
                                              • +
                                              • ssl
                                              • +
                                              • character
                                              • +
                                              • int2
                                              • +
                                              • int1
                                              • +
                                              • io_after_gtids
                                              • +
                                              • trailing
                                              • +
                                              • int4
                                              • +
                                              • int3
                                              • +
                                              • utc_time
                                              • +
                                              • int8
                                              • +
                                              • optimizer_costs
                                              • +
                                              • rank
                                              • +
                                              • cube
                                              • +
                                              • databases
                                              • +
                                              • using
                                              • +
                                              • outer
                                              • +
                                              • require
                                              • +
                                              • then
                                              • +
                                              • each
                                              • +
                                              • as
                                              • +
                                              • left
                                              • +
                                              • unique
                                              • +
                                              • except
                                              • +
                                              • starting
                                              • +
                                              • schema
                                              • +
                                              • accessible
                                              • +
                                              • role
                                              • +
                                              • deterministic
                                              • +
                                              • long
                                              • +
                                              • into
                                              • +
                                              • smallint
                                              • +
                                              • default
                                              • +
                                              • dual
                                              • +
                                              • partition
                                              • +
                                              • varying
                                              • +
                                              • by
                                              • +
                                              • ntile
                                              • +
                                              • where
                                              • +
                                              • xor
                                              • +
                                              • persist
                                              • +
                                              • current_time
                                              • +
                                              • key
                                              • +
                                              • iterate
                                              • +
                                              • set
                                              • +
                                              • column
                                              • +
                                              • minute_microsecond
                                              • +
                                              • procedure
                                              • +
                                              • right
                                              • +
                                              • union
                                              • +
                                              • asc
                                              • +
                                              • call
                                              • +
                                              • varbinary
                                              • +
                                              • longblob
                                              • +
                                              • describe
                                              • +
                                              • to
                                              • +
                                              • localtime
                                              • +
                                              • sql_big_result
                                              • +
                                              • declare
                                              • +
                                              • empty
                                              • +
                                              • enclosed
                                              • +
                                              • div
                                              • +
                                              • generated
                                              • +
                                              • continue
                                              • +
                                              • leave
                                              • +
                                              • loop
                                              • +
                                              • elseif
                                              • +
                                              • hour_second
                                              • +
                                              • row_number
                                              • +
                                              • signal
                                              • +
                                              • add
                                              • +
                                              • percent_rank
                                              • +
                                              • unlock
                                              • +
                                              • last_value
                                              • +
                                              • mediumtext
                                              • +
                                              • check
                                              • +
                                              • escaped
                                              • +
                                              • collate
                                              • +
                                              • schemas
                                              • +
                                              • persist_only
                                              • +
                                              • decimal
                                              • +
                                              • desc
                                              • +
                                              • cursor
                                              • +
                                              • drop
                                              • +
                                              • virtual
                                              • +
                                              • asensitive
                                              • +
                                              • for
                                              • +
                                              • show
                                              • +
                                              • revoke
                                              • +
                                              • update
                                              • +
                                              • purge
                                              • +
                                              • not
                                              • +
                                              • undo
                                              • +
                                              • zerofill
                                              • +
                                              • json_table
                                              • +
                                              • load
                                              • +
                                              • straight_join
                                              • +
                                              • ignore
                                              • +
                                              • lines
                                              • +
                                              • over
                                              • +
                                              • mediumint
                                              • +
                                              • varchar
                                              • +
                                              • false
                                              • +
                                              • dense_rank
                                              • +
                                              • mediumblob
                                              • +
                                              • with
                                              • +
                                              • window
                                              • +
                                              • grant
                                              • +
                                              • day_second
                                              • +
                                              • explain
                                              • +
                                              • maxvalue
                                              • +
                                              • mod
                                              • +
                                              • select
                                              • +
                                              • release
                                              • +
                                              • usage
                                              • +
                                              • optionally
                                              • +
                                              • middleint
                                              • +
                                              • delayed
                                              • +
                                              • convert
                                              • +
                                              • localtimestamp
                                              • +
                                              • sql_small_result
                                              • +
                                              • when
                                              • +
                                              • cume_dist
                                              • +
                                              • else
                                              • +
                                              • lock
                                              • +
                                              • join
                                              • +
                                              • spatial
                                              • +
                                              • if
                                              • +
                                              • write
                                              • +
                                              • between
                                              • +
                                              • case
                                              • +
                                              • sqlstate
                                              • +
                                              • order
                                              • +
                                              • year_month
                                              • +
                                              • read_write
                                              • +
                                              • having
                                              • +
                                              • natural
                                              • +
                                              • in
                                              • +
                                              • double
                                              • +
                                              • tinytext
                                              • +
                                              • index
                                              • +
                                              • tinyint
                                              • +
                                              • is
                                              • +
                                              • sensitive
                                              • +
                                              • grouping
                                              • +
                                              • exit
                                              • +
                                              • current_date
                                              • +
                                              • system
                                              • +
                                              • analyze
                                              • +
                                              • binary
                                              • +
                                              • sqlwarning
                                              • +
                                              • force
                                              • +
                                              • interval
                                              • +
                                              • master_bind
                                              • +
                                              • minute_second
                                              • +
                                              • primary
                                              • +
                                              • regexp
                                              • +
                                              • range
                                              • +
                                              • sqlexception
                                              • +
                                              • infile
                                              • +
                                              • restrict
                                              • +
                                              • recursive
                                              • +
                                              • foreign
                                              • +
                                              • hour_microsecond
                                              • +
                                              • out
                                              • +
                                              • distinctrow
                                              • +
                                              • get
                                              • +
                                              • fulltext
                                              • +
                                              • table
                                              • +
                                              • current_user
                                              • +
                                              • linear
                                              • +
                                              • second_microsecond
                                              • +
                                              • change
                                              • +
                                              • utc_timestamp
                                              • +
                                              • float8
                                              • +
                                              • io_before_gtids
                                              • +
                                              • trigger
                                              • +
                                              • float4
                                              • +
                                              • kill
                                              • +
                                              • lead
                                              • +
                                              • day_minute
                                              • +
                                              • rlike
                                              • +
                                              • rename
                                              • +
                                              • hour_minute
                                              • +
                                              • fetch
                                              • +
                                              • stored
                                              • +
                                              • char
                                              • +
                                              • exists
                                              • +
                                              • constraint
                                              • +
                                              • high_priority
                                              • +
                                              • return
                                              • +
                                              • no_write_to_binlog
                                              • +
                                              • sql_calc_found_rows
                                              • +
                                              • before
                                              • +
                                              • use
                                              • +
                                              • precision
                                              • +
                                              • modifies
                                              • +
                                              • replace
                                              • +
                                              • integer
                                              • +
                                              • float
                                              • +
                                              • while
                                              • +
                                              • lag
                                              • +
                                              • optimize
                                              • +
                                              • nth_value
                                              • +
                                              • function
                                              • +
                                              • limit
                                              • +
                                              • varcharacter
                                              • +
                                              • create
                                              • +
                                              • from
                                              • +
                                              • tinyblob
                                              • +
                                              • alter
                                              • +
                                              • group
                                              • +
                                              • all
                                              • +
                                              • read
                                              • +
                                              • like
                                              • +
                                              • cascade
                                              • +
                                              • real
                                              • +
                                              • inner
                                              • +
                                              • separator
                                              • +
                                              • both
                                              • +
                                              • day_microsecond
                                              • +
                                              • condition
                                              • +
                                              • blob
                                              • +
                                              • null
                                              • +
                                              • true
                                              • +
                                              • day_hour
                                              • +
                                              • option
                                              • +
                                              • longtext
                                              • +
                                              • keys
                                              • +
                                              • outfile
                                              • +
                                              • values
                                              • +
                                              • distinct
                                              • +
                                              • insert
                                              • +
                                              • numeric
                                              • +
                                              • resignal
                                              • +
                                              • delete
                                              • +
                                              • sql
                                              • +
                                              • database
                                              • +
                                              • master_ssl_verify_server_cert
                                              • +
                                              • and
                                              • +
                                              • current_timestamp
                                              • +
                                              • of
                                              • +
                                              • repeat
                                              • +
                                              • first_value
                                              • +
                                              • row
                                              • +
                                              • bigint
                                              • +
                                              • terminated
                                              • +
                                              • on
                                              • +
                                              • or
                                              • +
                                              • cross
                                              • +
                                              • match
                                              • +
                                              • reads
                                              • +
                                              • groups
                                              • +
                                              • rows
                                              • +
                                              • specific
                                              • +
                                              • int
                                              • +
                                              • inout
                                              • +
                                              • unsigned
                                              • +
                                              • utc_date
                                              • +
                                              diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 7368aa1e8b..25ba0b6422 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -10,3 +10,123 @@ sidebar_label: nim |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                              • pointer
                                              • +
                                              • bool
                                              • +
                                              • string
                                              • +
                                              • float32
                                              • +
                                              • cstring
                                              • +
                                              • float64
                                              • +
                                              • uint
                                              • +
                                              • float
                                              • +
                                              • int
                                              • +
                                              • int16
                                              • +
                                              • int32
                                              • +
                                              • int64
                                              • +
                                              • int8
                                              • +
                                              • char
                                              • +
                                              • uint64
                                              • +
                                              • uint32
                                              • +
                                              • uint8
                                              • +
                                              • uint16
                                              • +
                                              + +## RESERVED WORDS + +
                                              • discard
                                              • +
                                              • mod
                                              • +
                                              • converter
                                              • +
                                              • do
                                              • +
                                              • type
                                              • +
                                              • while
                                              • +
                                              • when
                                              • +
                                              • div
                                              • +
                                              • nil
                                              • +
                                              • cast
                                              • +
                                              • iterator
                                              • +
                                              • ref
                                              • +
                                              • bind
                                              • +
                                              • isnot
                                              • +
                                              • continue
                                              • +
                                              • else
                                              • +
                                              • raise
                                              • +
                                              • block
                                              • +
                                              • from
                                              • +
                                              • let
                                              • +
                                              • export
                                              • +
                                              • if
                                              • +
                                              • case
                                              • +
                                              • using
                                              • +
                                              • static
                                              • +
                                              • method
                                              • +
                                              • in
                                              • +
                                              • var
                                              • +
                                              • finally
                                              • +
                                              • is
                                              • +
                                              • elif
                                              • +
                                              • enum
                                              • +
                                              • mixin
                                              • +
                                              • as
                                              • +
                                              • shl
                                              • +
                                              • except
                                              • +
                                              • try
                                              • +
                                              • shr
                                              • +
                                              • object
                                              • +
                                              • template
                                              • +
                                              • defer
                                              • +
                                              • const
                                              • +
                                              • import
                                              • +
                                              • concept
                                              • +
                                              • for
                                              • +
                                              • distinct
                                              • +
                                              • interface
                                              • +
                                              • out
                                              • +
                                              • tuple
                                              • +
                                              • not
                                              • +
                                              • and
                                              • +
                                              • of
                                              • +
                                              • yield
                                              • +
                                              • end
                                              • +
                                              • xor
                                              • +
                                              • addr
                                              • +
                                              • include
                                              • +
                                              • macro
                                              • +
                                              • proc
                                              • +
                                              • or
                                              • +
                                              • break
                                              • +
                                              • ptr
                                              • +
                                              • func
                                              • +
                                              • asm
                                              • +
                                              • notin
                                              • +
                                              • return
                                              • +
                                              diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index 0f00358644..d37832876b 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -11,3 +11,73 @@ sidebar_label: nodejs-express-server |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen on.| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                + +## RESERVED WORDS + +
                                                • const
                                                • +
                                                • import
                                                • +
                                                • debugger
                                                • +
                                                • for
                                                • +
                                                • do
                                                • +
                                                • while
                                                • +
                                                • delete
                                                • +
                                                • switch
                                                • +
                                                • default
                                                • +
                                                • continue
                                                • +
                                                • else
                                                • +
                                                • function
                                                • +
                                                • yield
                                                • +
                                                • let
                                                • +
                                                • catch
                                                • +
                                                • class
                                                • +
                                                • export
                                                • +
                                                • if
                                                • +
                                                • case
                                                • +
                                                • typeof
                                                • +
                                                • new
                                                • +
                                                • void
                                                • +
                                                • break
                                                • +
                                                • in
                                                • +
                                                • var
                                                • +
                                                • finally
                                                • +
                                                • this
                                                • +
                                                • instanceof
                                                • +
                                                • super
                                                • +
                                                • with
                                                • +
                                                • extends
                                                • +
                                                • throw
                                                • +
                                                • try
                                                • +
                                                • return
                                                • +
                                                diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md index 113637d89a..c74a324950 100644 --- a/docs/generators/nodejs-server-deprecated.md +++ b/docs/generators/nodejs-server-deprecated.md @@ -13,3 +13,73 @@ sidebar_label: nodejs-server-deprecated |googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| |exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null| |serverPort|TCP port to listen on.| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                  + +## RESERVED WORDS + +
                                                  • const
                                                  • +
                                                  • import
                                                  • +
                                                  • debugger
                                                  • +
                                                  • for
                                                  • +
                                                  • do
                                                  • +
                                                  • while
                                                  • +
                                                  • delete
                                                  • +
                                                  • switch
                                                  • +
                                                  • default
                                                  • +
                                                  • continue
                                                  • +
                                                  • else
                                                  • +
                                                  • function
                                                  • +
                                                  • yield
                                                  • +
                                                  • let
                                                  • +
                                                  • catch
                                                  • +
                                                  • class
                                                  • +
                                                  • export
                                                  • +
                                                  • if
                                                  • +
                                                  • case
                                                  • +
                                                  • typeof
                                                  • +
                                                  • new
                                                  • +
                                                  • void
                                                  • +
                                                  • break
                                                  • +
                                                  • in
                                                  • +
                                                  • var
                                                  • +
                                                  • finally
                                                  • +
                                                  • this
                                                  • +
                                                  • instanceof
                                                  • +
                                                  • super
                                                  • +
                                                  • with
                                                  • +
                                                  • extends
                                                  • +
                                                  • throw
                                                  • +
                                                  • try
                                                  • +
                                                  • return
                                                  • +
                                                  diff --git a/docs/generators/objc.md b/docs/generators/objc.md index dff34b94fa..b185b4614b 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -13,3 +13,94 @@ sidebar_label: objc |authorEmail|Email to use in the podspec file.| |team@openapitools.org| |gitRepoURL|URL for the git repo where this podspec should point to.| |https://github.com/openapitools/openapi-generator| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|NSMutableArray| +|map|NSMutableDictionary| + + +## LANGUAGE PRIMITIVES + +
                                                  • NSNumber
                                                  • +
                                                  • NSObject
                                                  • +
                                                  • NSData
                                                  • +
                                                  • bool
                                                  • +
                                                  • BOOL
                                                  • +
                                                  • NSURL
                                                  • +
                                                  • NSString
                                                  • +
                                                  • NSDate
                                                  • +
                                                  + +## RESERVED WORDS + +
                                                  • struct
                                                  • +
                                                  • auto
                                                  • +
                                                  • _packed
                                                  • +
                                                  • queryparams
                                                  • +
                                                  • extern
                                                  • +
                                                  • do
                                                  • +
                                                  • float
                                                  • +
                                                  • while
                                                  • +
                                                  • resourcepath
                                                  • +
                                                  • protocol
                                                  • +
                                                  • readonly
                                                  • +
                                                  • else
                                                  • +
                                                  • continue
                                                  • +
                                                  • unsafe_unretained
                                                  • +
                                                  • property
                                                  • +
                                                  • requestcontenttype
                                                  • +
                                                  • id
                                                  • +
                                                  • if
                                                  • +
                                                  • nsinteger
                                                  • +
                                                  • responsecontenttype
                                                  • +
                                                  • case
                                                  • +
                                                  • pathparams
                                                  • +
                                                  • void
                                                  • +
                                                  • static
                                                  • +
                                                  • sizeof
                                                  • +
                                                  • double
                                                  • +
                                                  • authsettings
                                                  • +
                                                  • signed
                                                  • +
                                                  • nonatomic
                                                  • +
                                                  • formparams
                                                  • +
                                                  • typedef
                                                  • +
                                                  • enum
                                                  • +
                                                  • headerparams
                                                  • +
                                                  • bodyparam
                                                  • +
                                                  • strong
                                                  • +
                                                  • const
                                                  • +
                                                  • for
                                                  • +
                                                  • nsnumber
                                                  • +
                                                  • retain
                                                  • +
                                                  • description
                                                  • +
                                                  • interface
                                                  • +
                                                  • long
                                                  • +
                                                  • switch
                                                  • +
                                                  • weak
                                                  • +
                                                  • default
                                                  • +
                                                  • goto
                                                  • +
                                                  • localvarfiles
                                                  • +
                                                  • class
                                                  • +
                                                  • cgfloat
                                                  • +
                                                  • break
                                                  • +
                                                  • implementation
                                                  • +
                                                  • volatile
                                                  • +
                                                  • nsobject
                                                  • +
                                                  • union
                                                  • +
                                                  • int
                                                  • +
                                                  • char
                                                  • +
                                                  • short
                                                  • +
                                                  • unsigned
                                                  • +
                                                  • readwrite
                                                  • +
                                                  • return
                                                  • +
                                                  • register
                                                  • +
                                                  diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index 2e9278e513..28bae3fd5f 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -10,3 +10,105 @@ sidebar_label: ocaml |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                  • bool
                                                  • +
                                                  • string
                                                  • +
                                                  • int32
                                                  • +
                                                  • int64
                                                  • +
                                                  • bytes
                                                  • +
                                                  • char
                                                  • +
                                                  • Yojson.Safe.t
                                                  • +
                                                  • float
                                                  • +
                                                  • list
                                                  • +
                                                  • int
                                                  • +
                                                  + +## RESERVED WORDS + +
                                                  • exception
                                                  • +
                                                  • struct
                                                  • +
                                                  • asr
                                                  • +
                                                  • mod
                                                  • +
                                                  • do
                                                  • +
                                                  • functor
                                                  • +
                                                  • type
                                                  • +
                                                  • while
                                                  • +
                                                  • when
                                                  • +
                                                  • rec
                                                  • +
                                                  • else
                                                  • +
                                                  • function
                                                  • +
                                                  • mutable
                                                  • +
                                                  • let
                                                  • +
                                                  • if
                                                  • +
                                                  • val
                                                  • +
                                                  • new
                                                  • +
                                                  • method
                                                  • +
                                                  • in
                                                  • +
                                                  • module
                                                  • +
                                                  • nonrec
                                                  • +
                                                  • then
                                                  • +
                                                  • done
                                                  • +
                                                  • as
                                                  • +
                                                  • external
                                                  • +
                                                  • true
                                                  • +
                                                  • try
                                                  • +
                                                  • begin
                                                  • +
                                                  • object
                                                  • +
                                                  • private
                                                  • +
                                                  • virtual
                                                  • +
                                                  • lsl
                                                  • +
                                                  • lazy
                                                  • +
                                                  • for
                                                  • +
                                                  • lsr
                                                  • +
                                                  • lor
                                                  • +
                                                  • sig
                                                  • +
                                                  • result
                                                  • +
                                                  • and
                                                  • +
                                                  • assert
                                                  • +
                                                  • of
                                                  • +
                                                  • land
                                                  • +
                                                  • end
                                                  • +
                                                  • class
                                                  • +
                                                  • lxor
                                                  • +
                                                  • include
                                                  • +
                                                  • or
                                                  • +
                                                  • downto
                                                  • +
                                                  • false
                                                  • +
                                                  • match
                                                  • +
                                                  • initializer
                                                  • +
                                                  • with
                                                  • +
                                                  • inherit
                                                  • +
                                                  • constraint
                                                  • +
                                                  • to
                                                  • +
                                                  • fun
                                                  • +
                                                  • open
                                                  • +
                                                  diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 6c31814c58..19833475e7 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -11,3 +11,39 @@ sidebar_label: openapi-yaml |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |outputFile|Output filename| |openapi/openapi.yaml| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                    + +## RESERVED WORDS + +
                                                      diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index b4fe221913..aaa05565e8 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -10,3 +10,39 @@ sidebar_label: openapi |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                        + +## RESERVED WORDS + +
                                                          diff --git a/docs/generators/perl.md b/docs/generators/perl.md index 2cac430a58..3bda8004d8 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -11,3 +11,71 @@ sidebar_label: perl |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                          • boolean
                                                          • +
                                                          • ARRAY
                                                          • +
                                                          • string
                                                          • +
                                                          • double
                                                          • +
                                                          • int
                                                          • +
                                                          • DateTime
                                                          • +
                                                          • HASH
                                                          • +
                                                          • object
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                          • sub
                                                          • +
                                                          • no
                                                          • +
                                                          • cmp
                                                          • +
                                                          • lt
                                                          • +
                                                          • for
                                                          • +
                                                          • elsif
                                                          • +
                                                          • do
                                                          • +
                                                          • while
                                                          • +
                                                          • __package__
                                                          • +
                                                          • foreach
                                                          • +
                                                          • __end__
                                                          • +
                                                          • unless
                                                          • +
                                                          • else
                                                          • +
                                                          • and
                                                          • +
                                                          • continue
                                                          • +
                                                          • lock
                                                          • +
                                                          • xor
                                                          • +
                                                          • exp
                                                          • +
                                                          • if
                                                          • +
                                                          • ge
                                                          • +
                                                          • qq
                                                          • +
                                                          • qr
                                                          • +
                                                          • or
                                                          • +
                                                          • package
                                                          • +
                                                          • qw
                                                          • +
                                                          • qx
                                                          • +
                                                          • eq
                                                          • +
                                                          • m
                                                          • +
                                                          • gt
                                                          • +
                                                          • q
                                                          • +
                                                          • core
                                                          • +
                                                          • __line__
                                                          • +
                                                          • s
                                                          • +
                                                          • __file__
                                                          • +
                                                          • ne
                                                          • +
                                                          • le
                                                          • +
                                                          • y
                                                          • +
                                                          • until
                                                          • +
                                                          • tr
                                                          • +
                                                          • return
                                                          • +
                                                          diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index dee3787142..c2ed698421 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -17,3 +17,126 @@ sidebar_label: php-laravel |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| |srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                                          • void
                                                          • +
                                                          • bool
                                                          • +
                                                          • string
                                                          • +
                                                          • double
                                                          • +
                                                          • byte
                                                          • +
                                                          • mixed
                                                          • +
                                                          • integer
                                                          • +
                                                          • float
                                                          • +
                                                          • int
                                                          • +
                                                          • DateTime
                                                          • +
                                                          • number
                                                          • +
                                                          • boolean
                                                          • +
                                                          • object
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                          • die
                                                          • +
                                                          • callable
                                                          • +
                                                          • declare
                                                          • +
                                                          • isset
                                                          • +
                                                          • use
                                                          • +
                                                          • queryparams
                                                          • +
                                                          • echo
                                                          • +
                                                          • do
                                                          • +
                                                          • while
                                                          • +
                                                          • unset
                                                          • +
                                                          • empty
                                                          • +
                                                          • resourcepath
                                                          • +
                                                          • endwhile
                                                          • +
                                                          • protected
                                                          • +
                                                          • continue
                                                          • +
                                                          • else
                                                          • +
                                                          • elseif
                                                          • +
                                                          • function
                                                          • +
                                                          • endfor
                                                          • +
                                                          • trait
                                                          • +
                                                          • catch
                                                          • +
                                                          • if
                                                          • +
                                                          • case
                                                          • +
                                                          • new
                                                          • +
                                                          • static
                                                          • +
                                                          • var
                                                          • +
                                                          • require
                                                          • +
                                                          • require_once
                                                          • +
                                                          • list
                                                          • +
                                                          • formparams
                                                          • +
                                                          • headerparams
                                                          • +
                                                          • _header_accept
                                                          • +
                                                          • include_once
                                                          • +
                                                          • exit
                                                          • +
                                                          • as
                                                          • +
                                                          • eval
                                                          • +
                                                          • extends
                                                          • +
                                                          • final
                                                          • +
                                                          • try
                                                          • +
                                                          • httpbody
                                                          • +
                                                          • implements
                                                          • +
                                                          • private
                                                          • +
                                                          • const
                                                          • +
                                                          • for
                                                          • +
                                                          • global
                                                          • +
                                                          • interface
                                                          • +
                                                          • __halt_compiler
                                                          • +
                                                          • _tempbody
                                                          • +
                                                          • switch
                                                          • +
                                                          • foreach
                                                          • +
                                                          • default
                                                          • +
                                                          • goto
                                                          • +
                                                          • public
                                                          • +
                                                          • array
                                                          • +
                                                          • and
                                                          • +
                                                          • xor
                                                          • +
                                                          • class
                                                          • +
                                                          • include
                                                          • +
                                                          • or
                                                          • +
                                                          • endswitch
                                                          • +
                                                          • break
                                                          • +
                                                          • enddeclare
                                                          • +
                                                          • abstract
                                                          • +
                                                          • instanceof
                                                          • +
                                                          • print
                                                          • +
                                                          • throw
                                                          • +
                                                          • insteadof
                                                          • +
                                                          • clone
                                                          • +
                                                          • namespace
                                                          • +
                                                          • endif
                                                          • +
                                                          • endforeach
                                                          • +
                                                          • return
                                                          • +
                                                          diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 96af22e02a..768a8489a8 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -17,3 +17,126 @@ sidebar_label: php-lumen |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| |srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                                          • void
                                                          • +
                                                          • bool
                                                          • +
                                                          • string
                                                          • +
                                                          • double
                                                          • +
                                                          • byte
                                                          • +
                                                          • mixed
                                                          • +
                                                          • integer
                                                          • +
                                                          • float
                                                          • +
                                                          • int
                                                          • +
                                                          • DateTime
                                                          • +
                                                          • number
                                                          • +
                                                          • boolean
                                                          • +
                                                          • object
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                          • die
                                                          • +
                                                          • callable
                                                          • +
                                                          • declare
                                                          • +
                                                          • isset
                                                          • +
                                                          • use
                                                          • +
                                                          • queryparams
                                                          • +
                                                          • echo
                                                          • +
                                                          • do
                                                          • +
                                                          • while
                                                          • +
                                                          • unset
                                                          • +
                                                          • empty
                                                          • +
                                                          • resourcepath
                                                          • +
                                                          • endwhile
                                                          • +
                                                          • protected
                                                          • +
                                                          • continue
                                                          • +
                                                          • else
                                                          • +
                                                          • elseif
                                                          • +
                                                          • function
                                                          • +
                                                          • endfor
                                                          • +
                                                          • trait
                                                          • +
                                                          • catch
                                                          • +
                                                          • if
                                                          • +
                                                          • case
                                                          • +
                                                          • new
                                                          • +
                                                          • static
                                                          • +
                                                          • var
                                                          • +
                                                          • require
                                                          • +
                                                          • require_once
                                                          • +
                                                          • list
                                                          • +
                                                          • formparams
                                                          • +
                                                          • headerparams
                                                          • +
                                                          • _header_accept
                                                          • +
                                                          • include_once
                                                          • +
                                                          • exit
                                                          • +
                                                          • as
                                                          • +
                                                          • eval
                                                          • +
                                                          • extends
                                                          • +
                                                          • final
                                                          • +
                                                          • try
                                                          • +
                                                          • httpbody
                                                          • +
                                                          • implements
                                                          • +
                                                          • private
                                                          • +
                                                          • const
                                                          • +
                                                          • for
                                                          • +
                                                          • global
                                                          • +
                                                          • interface
                                                          • +
                                                          • __halt_compiler
                                                          • +
                                                          • _tempbody
                                                          • +
                                                          • switch
                                                          • +
                                                          • foreach
                                                          • +
                                                          • default
                                                          • +
                                                          • goto
                                                          • +
                                                          • public
                                                          • +
                                                          • array
                                                          • +
                                                          • and
                                                          • +
                                                          • xor
                                                          • +
                                                          • class
                                                          • +
                                                          • include
                                                          • +
                                                          • or
                                                          • +
                                                          • endswitch
                                                          • +
                                                          • break
                                                          • +
                                                          • enddeclare
                                                          • +
                                                          • abstract
                                                          • +
                                                          • instanceof
                                                          • +
                                                          • print
                                                          • +
                                                          • throw
                                                          • +
                                                          • insteadof
                                                          • +
                                                          • clone
                                                          • +
                                                          • namespace
                                                          • +
                                                          • endif
                                                          • +
                                                          • endforeach
                                                          • +
                                                          • return
                                                          • +
                                                          diff --git a/docs/generators/php-silex.md b/docs/generators/php-silex.md index 67000a6a3b..3057c53c8b 100644 --- a/docs/generators/php-silex.md +++ b/docs/generators/php-silex.md @@ -10,3 +10,116 @@ sidebar_label: php-silex |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                                          • number
                                                          • +
                                                          • boolean
                                                          • +
                                                          • string
                                                          • +
                                                          • double
                                                          • +
                                                          • mixed
                                                          • +
                                                          • integer
                                                          • +
                                                          • float
                                                          • +
                                                          • int
                                                          • +
                                                          • DateTime
                                                          • +
                                                          • object
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                          • die
                                                          • +
                                                          • callable
                                                          • +
                                                          • declare
                                                          • +
                                                          • isset
                                                          • +
                                                          • use
                                                          • +
                                                          • echo
                                                          • +
                                                          • do
                                                          • +
                                                          • while
                                                          • +
                                                          • unset
                                                          • +
                                                          • empty
                                                          • +
                                                          • endwhile
                                                          • +
                                                          • protected
                                                          • +
                                                          • continue
                                                          • +
                                                          • else
                                                          • +
                                                          • elseif
                                                          • +
                                                          • function
                                                          • +
                                                          • endfor
                                                          • +
                                                          • trait
                                                          • +
                                                          • catch
                                                          • +
                                                          • if
                                                          • +
                                                          • case
                                                          • +
                                                          • new
                                                          • +
                                                          • static
                                                          • +
                                                          • var
                                                          • +
                                                          • require
                                                          • +
                                                          • require_once
                                                          • +
                                                          • list
                                                          • +
                                                          • include_once
                                                          • +
                                                          • exit
                                                          • +
                                                          • as
                                                          • +
                                                          • eval
                                                          • +
                                                          • extends
                                                          • +
                                                          • final
                                                          • +
                                                          • try
                                                          • +
                                                          • implements
                                                          • +
                                                          • private
                                                          • +
                                                          • const
                                                          • +
                                                          • for
                                                          • +
                                                          • global
                                                          • +
                                                          • interface
                                                          • +
                                                          • __halt_compiler
                                                          • +
                                                          • switch
                                                          • +
                                                          • foreach
                                                          • +
                                                          • default
                                                          • +
                                                          • goto
                                                          • +
                                                          • public
                                                          • +
                                                          • array
                                                          • +
                                                          • and
                                                          • +
                                                          • xor
                                                          • +
                                                          • class
                                                          • +
                                                          • include
                                                          • +
                                                          • or
                                                          • +
                                                          • endswitch
                                                          • +
                                                          • break
                                                          • +
                                                          • enddeclare
                                                          • +
                                                          • abstract
                                                          • +
                                                          • instanceof
                                                          • +
                                                          • print
                                                          • +
                                                          • throw
                                                          • +
                                                          • insteadof
                                                          • +
                                                          • clone
                                                          • +
                                                          • namespace
                                                          • +
                                                          • endif
                                                          • +
                                                          • endforeach
                                                          • +
                                                          • return
                                                          • +
                                                          diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index b15405df2b..98b4234e6b 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -17,3 +17,110 @@ sidebar_label: php-slim-deprecated |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| |srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                                          • void
                                                          • +
                                                          • bool
                                                          • +
                                                          • string
                                                          • +
                                                          • double
                                                          • +
                                                          • byte
                                                          • +
                                                          • mixed
                                                          • +
                                                          • integer
                                                          • +
                                                          • float
                                                          • +
                                                          • int
                                                          • +
                                                          • DateTime
                                                          • +
                                                          • number
                                                          • +
                                                          • boolean
                                                          • +
                                                          • object
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                          • die
                                                          • +
                                                          • callable
                                                          • +
                                                          • declare
                                                          • +
                                                          • isset
                                                          • +
                                                          • use
                                                          • +
                                                          • queryparams
                                                          • +
                                                          • echo
                                                          • +
                                                          • do
                                                          • +
                                                          • while
                                                          • +
                                                          • unset
                                                          • +
                                                          • empty
                                                          • +
                                                          • resourcepath
                                                          • +
                                                          • endwhile
                                                          • +
                                                          • protected
                                                          • +
                                                          • continue
                                                          • +
                                                          • else
                                                          • +
                                                          • elseif
                                                          • +
                                                          • function
                                                          • +
                                                          • endfor
                                                          • +
                                                          • trait
                                                          • +
                                                          • catch
                                                          • +
                                                          • if
                                                          • +
                                                          • case
                                                          • +
                                                          • new
                                                          • +
                                                          • static
                                                          • +
                                                          • var
                                                          • +
                                                          • require
                                                          • +
                                                          • require_once
                                                          • +
                                                          • list
                                                          • +
                                                          • formparams
                                                          • +
                                                          • headerparams
                                                          • +
                                                          • _header_accept
                                                          • +
                                                          • include_once
                                                          • +
                                                          • exit
                                                          • +
                                                          • as
                                                          • +
                                                          • eval
                                                          • +
                                                          • extends
                                                          • +
                                                          • final
                                                          • +
                                                          • try
                                                          • +
                                                          • httpbody
                                                          • +
                                                          • implements
                                                          • +
                                                          • private
                                                          • +
                                                          • const
                                                          • +
                                                          • for
                                                          • +
                                                          • global
                                                          • +
                                                          • interface
                                                          • +
                                                          • __halt_compiler
                                                          • +
                                                          • _tempbody
                                                          • +
                                                          • switch
                                                          • +
                                                          • foreach
                                                          • +
                                                          • default
                                                          • +
                                                          • goto
                                                          • +
                                                          • public
                                                          • +
                                                          • array
                                                          • +
                                                          • and
                                                          • +
                                                          • xor
                                                          • +
                                                          • class
                                                          • +
                                                          • include
                                                          • +
                                                          • or
                                                          • +
                                                          • endswitch
                                                          • +
                                                          • break
                                                          • +
                                                          • enddeclare
                                                          • +
                                                          • abstract
                                                          • +
                                                          • instanceof
                                                          • +
                                                          • print
                                                          • +
                                                          • throw
                                                          • +
                                                          • insteadof
                                                          • +
                                                          • clone
                                                          • +
                                                          • namespace
                                                          • +
                                                          • endif
                                                          • +
                                                          • endforeach
                                                          • +
                                                          • return
                                                          • +
                                                          diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index 6ca37b8adc..eb3ad79302 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -18,3 +18,110 @@ sidebar_label: php-slim4 |srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| |psr7Implementation|Slim 4 provides its own PSR-7 implementation so that it works out of the box. However, you are free to replace Slim’s default PSR-7 objects with a third-party implementation. Ref: https://www.slimframework.com/docs/v4/concepts/value-objects.html|
                                                          **slim-psr7**
                                                          Slim PSR-7 Message implementation
                                                          **nyholm-psr7**
                                                          Nyholm PSR-7 Message implementation
                                                          **guzzle-psr7**
                                                          Guzzle PSR-7 Message implementation
                                                          **zend-diactoros**
                                                          Zend Diactoros PSR-7 Message implementation
                                                          |slim-psr7| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                                          • void
                                                          • +
                                                          • bool
                                                          • +
                                                          • string
                                                          • +
                                                          • double
                                                          • +
                                                          • byte
                                                          • +
                                                          • mixed
                                                          • +
                                                          • integer
                                                          • +
                                                          • float
                                                          • +
                                                          • int
                                                          • +
                                                          • DateTime
                                                          • +
                                                          • number
                                                          • +
                                                          • boolean
                                                          • +
                                                          • object
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                          • die
                                                          • +
                                                          • callable
                                                          • +
                                                          • declare
                                                          • +
                                                          • isset
                                                          • +
                                                          • use
                                                          • +
                                                          • queryparams
                                                          • +
                                                          • echo
                                                          • +
                                                          • do
                                                          • +
                                                          • while
                                                          • +
                                                          • unset
                                                          • +
                                                          • empty
                                                          • +
                                                          • resourcepath
                                                          • +
                                                          • endwhile
                                                          • +
                                                          • protected
                                                          • +
                                                          • continue
                                                          • +
                                                          • else
                                                          • +
                                                          • elseif
                                                          • +
                                                          • function
                                                          • +
                                                          • endfor
                                                          • +
                                                          • trait
                                                          • +
                                                          • catch
                                                          • +
                                                          • if
                                                          • +
                                                          • case
                                                          • +
                                                          • new
                                                          • +
                                                          • static
                                                          • +
                                                          • var
                                                          • +
                                                          • require
                                                          • +
                                                          • require_once
                                                          • +
                                                          • list
                                                          • +
                                                          • formparams
                                                          • +
                                                          • headerparams
                                                          • +
                                                          • _header_accept
                                                          • +
                                                          • include_once
                                                          • +
                                                          • exit
                                                          • +
                                                          • as
                                                          • +
                                                          • eval
                                                          • +
                                                          • extends
                                                          • +
                                                          • final
                                                          • +
                                                          • try
                                                          • +
                                                          • httpbody
                                                          • +
                                                          • implements
                                                          • +
                                                          • private
                                                          • +
                                                          • const
                                                          • +
                                                          • for
                                                          • +
                                                          • global
                                                          • +
                                                          • interface
                                                          • +
                                                          • __halt_compiler
                                                          • +
                                                          • _tempbody
                                                          • +
                                                          • switch
                                                          • +
                                                          • foreach
                                                          • +
                                                          • default
                                                          • +
                                                          • goto
                                                          • +
                                                          • public
                                                          • +
                                                          • array
                                                          • +
                                                          • and
                                                          • +
                                                          • xor
                                                          • +
                                                          • class
                                                          • +
                                                          • include
                                                          • +
                                                          • or
                                                          • +
                                                          • endswitch
                                                          • +
                                                          • break
                                                          • +
                                                          • enddeclare
                                                          • +
                                                          • abstract
                                                          • +
                                                          • instanceof
                                                          • +
                                                          • print
                                                          • +
                                                          • throw
                                                          • +
                                                          • insteadof
                                                          • +
                                                          • clone
                                                          • +
                                                          • namespace
                                                          • +
                                                          • endif
                                                          • +
                                                          • endforeach
                                                          • +
                                                          • return
                                                          • +
                                                          diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index 913c5be6a5..7a58951090 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -23,3 +23,108 @@ sidebar_label: php-symfony |composerProjectName|The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client| |null| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |phpLegacySupport|Should the generated code be compatible with PHP 5.x?| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                                          • number
                                                          • +
                                                          • void
                                                          • +
                                                          • bool
                                                          • +
                                                          • string
                                                          • +
                                                          • array
                                                          • +
                                                          • double
                                                          • +
                                                          • byte
                                                          • +
                                                          • mixed
                                                          • +
                                                          • float
                                                          • +
                                                          • int
                                                          • +
                                                          • object
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                          • die
                                                          • +
                                                          • callable
                                                          • +
                                                          • declare
                                                          • +
                                                          • isset
                                                          • +
                                                          • use
                                                          • +
                                                          • queryparams
                                                          • +
                                                          • echo
                                                          • +
                                                          • do
                                                          • +
                                                          • while
                                                          • +
                                                          • unset
                                                          • +
                                                          • empty
                                                          • +
                                                          • resourcepath
                                                          • +
                                                          • endwhile
                                                          • +
                                                          • protected
                                                          • +
                                                          • continue
                                                          • +
                                                          • else
                                                          • +
                                                          • elseif
                                                          • +
                                                          • function
                                                          • +
                                                          • endfor
                                                          • +
                                                          • trait
                                                          • +
                                                          • catch
                                                          • +
                                                          • if
                                                          • +
                                                          • case
                                                          • +
                                                          • new
                                                          • +
                                                          • static
                                                          • +
                                                          • var
                                                          • +
                                                          • require
                                                          • +
                                                          • require_once
                                                          • +
                                                          • list
                                                          • +
                                                          • formparams
                                                          • +
                                                          • headerparams
                                                          • +
                                                          • _header_accept
                                                          • +
                                                          • include_once
                                                          • +
                                                          • exit
                                                          • +
                                                          • as
                                                          • +
                                                          • eval
                                                          • +
                                                          • extends
                                                          • +
                                                          • final
                                                          • +
                                                          • try
                                                          • +
                                                          • httpbody
                                                          • +
                                                          • implements
                                                          • +
                                                          • private
                                                          • +
                                                          • const
                                                          • +
                                                          • for
                                                          • +
                                                          • global
                                                          • +
                                                          • interface
                                                          • +
                                                          • __halt_compiler
                                                          • +
                                                          • _tempbody
                                                          • +
                                                          • switch
                                                          • +
                                                          • foreach
                                                          • +
                                                          • default
                                                          • +
                                                          • goto
                                                          • +
                                                          • public
                                                          • +
                                                          • array
                                                          • +
                                                          • and
                                                          • +
                                                          • xor
                                                          • +
                                                          • class
                                                          • +
                                                          • include
                                                          • +
                                                          • or
                                                          • +
                                                          • endswitch
                                                          • +
                                                          • break
                                                          • +
                                                          • enddeclare
                                                          • +
                                                          • abstract
                                                          • +
                                                          • instanceof
                                                          • +
                                                          • print
                                                          • +
                                                          • throw
                                                          • +
                                                          • insteadof
                                                          • +
                                                          • clone
                                                          • +
                                                          • namespace
                                                          • +
                                                          • endif
                                                          • +
                                                          • endforeach
                                                          • +
                                                          • return
                                                          • +
                                                          diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md index a1066f34dc..f11bf4f5d9 100644 --- a/docs/generators/php-ze-ph.md +++ b/docs/generators/php-ze-ph.md @@ -17,3 +17,126 @@ sidebar_label: php-ze-ph |packageName|The main package name for classes. e.g. GeneratedPetstore| |null| |srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                                          • void
                                                          • +
                                                          • bool
                                                          • +
                                                          • string
                                                          • +
                                                          • double
                                                          • +
                                                          • byte
                                                          • +
                                                          • mixed
                                                          • +
                                                          • integer
                                                          • +
                                                          • float
                                                          • +
                                                          • int
                                                          • +
                                                          • DateTime
                                                          • +
                                                          • number
                                                          • +
                                                          • boolean
                                                          • +
                                                          • object
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                          • die
                                                          • +
                                                          • callable
                                                          • +
                                                          • declare
                                                          • +
                                                          • isset
                                                          • +
                                                          • use
                                                          • +
                                                          • queryparams
                                                          • +
                                                          • echo
                                                          • +
                                                          • do
                                                          • +
                                                          • while
                                                          • +
                                                          • unset
                                                          • +
                                                          • empty
                                                          • +
                                                          • resourcepath
                                                          • +
                                                          • endwhile
                                                          • +
                                                          • protected
                                                          • +
                                                          • continue
                                                          • +
                                                          • else
                                                          • +
                                                          • elseif
                                                          • +
                                                          • function
                                                          • +
                                                          • endfor
                                                          • +
                                                          • trait
                                                          • +
                                                          • catch
                                                          • +
                                                          • if
                                                          • +
                                                          • case
                                                          • +
                                                          • new
                                                          • +
                                                          • static
                                                          • +
                                                          • var
                                                          • +
                                                          • require
                                                          • +
                                                          • require_once
                                                          • +
                                                          • list
                                                          • +
                                                          • formparams
                                                          • +
                                                          • headerparams
                                                          • +
                                                          • _header_accept
                                                          • +
                                                          • include_once
                                                          • +
                                                          • exit
                                                          • +
                                                          • as
                                                          • +
                                                          • eval
                                                          • +
                                                          • extends
                                                          • +
                                                          • final
                                                          • +
                                                          • try
                                                          • +
                                                          • httpbody
                                                          • +
                                                          • implements
                                                          • +
                                                          • private
                                                          • +
                                                          • const
                                                          • +
                                                          • for
                                                          • +
                                                          • global
                                                          • +
                                                          • interface
                                                          • +
                                                          • __halt_compiler
                                                          • +
                                                          • _tempbody
                                                          • +
                                                          • switch
                                                          • +
                                                          • foreach
                                                          • +
                                                          • default
                                                          • +
                                                          • goto
                                                          • +
                                                          • public
                                                          • +
                                                          • array
                                                          • +
                                                          • and
                                                          • +
                                                          • xor
                                                          • +
                                                          • class
                                                          • +
                                                          • include
                                                          • +
                                                          • or
                                                          • +
                                                          • endswitch
                                                          • +
                                                          • break
                                                          • +
                                                          • enddeclare
                                                          • +
                                                          • abstract
                                                          • +
                                                          • instanceof
                                                          • +
                                                          • print
                                                          • +
                                                          • throw
                                                          • +
                                                          • insteadof
                                                          • +
                                                          • clone
                                                          • +
                                                          • namespace
                                                          • +
                                                          • endif
                                                          • +
                                                          • endforeach
                                                          • +
                                                          • return
                                                          • +
                                                          diff --git a/docs/generators/php.md b/docs/generators/php.md index c7d1766f24..3306fbc557 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -18,3 +18,110 @@ sidebar_label: php |srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| |hideGenerationTimestamp|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|array| +|map|map| + + +## LANGUAGE PRIMITIVES + +
                                                          • void
                                                          • +
                                                          • bool
                                                          • +
                                                          • string
                                                          • +
                                                          • double
                                                          • +
                                                          • byte
                                                          • +
                                                          • mixed
                                                          • +
                                                          • integer
                                                          • +
                                                          • float
                                                          • +
                                                          • int
                                                          • +
                                                          • DateTime
                                                          • +
                                                          • number
                                                          • +
                                                          • boolean
                                                          • +
                                                          • object
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                          • die
                                                          • +
                                                          • callable
                                                          • +
                                                          • declare
                                                          • +
                                                          • isset
                                                          • +
                                                          • use
                                                          • +
                                                          • queryparams
                                                          • +
                                                          • echo
                                                          • +
                                                          • do
                                                          • +
                                                          • while
                                                          • +
                                                          • unset
                                                          • +
                                                          • empty
                                                          • +
                                                          • resourcepath
                                                          • +
                                                          • endwhile
                                                          • +
                                                          • protected
                                                          • +
                                                          • continue
                                                          • +
                                                          • else
                                                          • +
                                                          • elseif
                                                          • +
                                                          • function
                                                          • +
                                                          • endfor
                                                          • +
                                                          • trait
                                                          • +
                                                          • catch
                                                          • +
                                                          • if
                                                          • +
                                                          • case
                                                          • +
                                                          • new
                                                          • +
                                                          • static
                                                          • +
                                                          • var
                                                          • +
                                                          • require
                                                          • +
                                                          • require_once
                                                          • +
                                                          • list
                                                          • +
                                                          • formparams
                                                          • +
                                                          • headerparams
                                                          • +
                                                          • _header_accept
                                                          • +
                                                          • include_once
                                                          • +
                                                          • exit
                                                          • +
                                                          • as
                                                          • +
                                                          • eval
                                                          • +
                                                          • extends
                                                          • +
                                                          • final
                                                          • +
                                                          • try
                                                          • +
                                                          • httpbody
                                                          • +
                                                          • implements
                                                          • +
                                                          • private
                                                          • +
                                                          • const
                                                          • +
                                                          • for
                                                          • +
                                                          • global
                                                          • +
                                                          • interface
                                                          • +
                                                          • __halt_compiler
                                                          • +
                                                          • _tempbody
                                                          • +
                                                          • switch
                                                          • +
                                                          • foreach
                                                          • +
                                                          • default
                                                          • +
                                                          • goto
                                                          • +
                                                          • public
                                                          • +
                                                          • array
                                                          • +
                                                          • and
                                                          • +
                                                          • xor
                                                          • +
                                                          • class
                                                          • +
                                                          • include
                                                          • +
                                                          • or
                                                          • +
                                                          • endswitch
                                                          • +
                                                          • break
                                                          • +
                                                          • enddeclare
                                                          • +
                                                          • abstract
                                                          • +
                                                          • instanceof
                                                          • +
                                                          • print
                                                          • +
                                                          • throw
                                                          • +
                                                          • insteadof
                                                          • +
                                                          • clone
                                                          • +
                                                          • namespace
                                                          • +
                                                          • endif
                                                          • +
                                                          • endforeach
                                                          • +
                                                          • return
                                                          • +
                                                          diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index bef12a7aaf..f4d5daaf73 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -8,3 +8,93 @@ sidebar_label: powershell |packageName|Client package name (e.g. org.openapitools.client).| |Org.OpenAPITools| |packageGuid|GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default.| |null| |csharpClientPath|Path to the C# API client generated by OpenAPI Generator, e.g. $ScriptDir\..\csharp\OpenAPIClient where $ScriptDir is the current directory. NOTE: you will need to generate the C# API client separately.| |$ScriptDir\csharp\OpenAPIClient| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                          • System.DateTime
                                                          • +
                                                          • SByte
                                                          • +
                                                          • XmlDocument
                                                          • +
                                                          • String
                                                          • +
                                                          • Guid
                                                          • +
                                                          • Int16
                                                          • +
                                                          • Double
                                                          • +
                                                          • Uri
                                                          • +
                                                          • TimeSpan
                                                          • +
                                                          • Decimal
                                                          • +
                                                          • Byte[]
                                                          • +
                                                          • Int64
                                                          • +
                                                          • Single
                                                          • +
                                                          • Version
                                                          • +
                                                          • Int32
                                                          • +
                                                          • Char
                                                          • +
                                                          • Byte
                                                          • +
                                                          • UInt16
                                                          • +
                                                          • ProgressRecord
                                                          • +
                                                          • UInt64
                                                          • +
                                                          • Boolean
                                                          • +
                                                          • UInt32
                                                          • +
                                                          • SecureString
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                          • In
                                                          • +
                                                          • Catch
                                                          • +
                                                          • Break
                                                          • +
                                                          • Process
                                                          • +
                                                          • Continue
                                                          • +
                                                          • Elseif
                                                          • +
                                                          • Function
                                                          • +
                                                          • Dynamicparam
                                                          • +
                                                          • Throw
                                                          • +
                                                          • Begin
                                                          • +
                                                          • Try
                                                          • +
                                                          • Private
                                                          • +
                                                          • Exit
                                                          • +
                                                          • Until
                                                          • +
                                                          • Return
                                                          • +
                                                          • For
                                                          • +
                                                          • Local
                                                          • +
                                                          • Data
                                                          • +
                                                          • Trap
                                                          • +
                                                          • Do
                                                          • +
                                                          • From
                                                          • +
                                                          • While
                                                          • +
                                                          • Switch
                                                          • +
                                                          • Filter
                                                          • +
                                                          • Else
                                                          • +
                                                          • Param
                                                          • +
                                                          • Foreach
                                                          • +
                                                          • End
                                                          • +
                                                          • If
                                                          • +
                                                          • Where
                                                          • +
                                                          • Finally
                                                          • +
                                                          diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index 68edd8d6e2..e12611217f 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -5,3 +5,41 @@ sidebar_label: protobuf-schema | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|repeat| + + +## LANGUAGE PRIMITIVES + +
                                                          • fixed64
                                                          • +
                                                          • fixed32
                                                          • +
                                                          • sint64
                                                          • +
                                                          • sint32
                                                          • +
                                                          • bool
                                                          • +
                                                          • string
                                                          • +
                                                          • sfixed64
                                                          • +
                                                          • double
                                                          • +
                                                          • float
                                                          • +
                                                          • array
                                                          • +
                                                          • int32
                                                          • +
                                                          • bytes
                                                          • +
                                                          • int64
                                                          • +
                                                          • uint64
                                                          • +
                                                          • sfixed32
                                                          • +
                                                          • uint32
                                                          • +
                                                          • map
                                                          • +
                                                          + +## RESERVED WORDS + +
                                                            diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index a116fc6e96..c6c59087e7 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -17,3 +17,88 @@ sidebar_label: python-aiohttp |supportPython2|support python2| |false| |serverPort|TCP port to listen to in app.run| |8080| |useNose|use the nose test framework| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • str
                                                            • +
                                                            • date
                                                            • +
                                                            • datetime
                                                            • +
                                                            • file
                                                            • +
                                                            • bool
                                                            • +
                                                            • Dict
                                                            • +
                                                            • byte
                                                            • +
                                                            • bytearray
                                                            • +
                                                            • List
                                                            • +
                                                            • float
                                                            • +
                                                            • int
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • import
                                                            • +
                                                            • def
                                                            • +
                                                            • for
                                                            • +
                                                            • del
                                                            • +
                                                            • global
                                                            • +
                                                            • none
                                                            • +
                                                            • while
                                                            • +
                                                            • nonlocal
                                                            • +
                                                            • not
                                                            • +
                                                            • lambda
                                                            • +
                                                            • and
                                                            • +
                                                            • assert
                                                            • +
                                                            • else
                                                            • +
                                                            • continue
                                                            • +
                                                            • yield
                                                            • +
                                                            • property
                                                            • +
                                                            • raise
                                                            • +
                                                            • from
                                                            • +
                                                            • if
                                                            • +
                                                            • class
                                                            • +
                                                            • or
                                                            • +
                                                            • pass
                                                            • +
                                                            • break
                                                            • +
                                                            • in
                                                            • +
                                                            • finally
                                                            • +
                                                            • false
                                                            • +
                                                            • is
                                                            • +
                                                            • elif
                                                            • +
                                                            • with
                                                            • +
                                                            • as
                                                            • +
                                                            • print
                                                            • +
                                                            • true
                                                            • +
                                                            • self
                                                            • +
                                                            • except
                                                            • +
                                                            • try
                                                            • +
                                                            • exec
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index 7114953628..cb290b83ed 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -17,3 +17,88 @@ sidebar_label: python-blueplanet |supportPython2|support python2| |false| |serverPort|TCP port to listen to in app.run| |8080| |useNose|use the nose test framework| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • str
                                                            • +
                                                            • date
                                                            • +
                                                            • datetime
                                                            • +
                                                            • file
                                                            • +
                                                            • bool
                                                            • +
                                                            • Dict
                                                            • +
                                                            • byte
                                                            • +
                                                            • bytearray
                                                            • +
                                                            • List
                                                            • +
                                                            • float
                                                            • +
                                                            • int
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • import
                                                            • +
                                                            • def
                                                            • +
                                                            • for
                                                            • +
                                                            • del
                                                            • +
                                                            • global
                                                            • +
                                                            • none
                                                            • +
                                                            • while
                                                            • +
                                                            • nonlocal
                                                            • +
                                                            • not
                                                            • +
                                                            • lambda
                                                            • +
                                                            • and
                                                            • +
                                                            • assert
                                                            • +
                                                            • else
                                                            • +
                                                            • continue
                                                            • +
                                                            • yield
                                                            • +
                                                            • property
                                                            • +
                                                            • raise
                                                            • +
                                                            • from
                                                            • +
                                                            • if
                                                            • +
                                                            • class
                                                            • +
                                                            • or
                                                            • +
                                                            • pass
                                                            • +
                                                            • break
                                                            • +
                                                            • in
                                                            • +
                                                            • finally
                                                            • +
                                                            • false
                                                            • +
                                                            • is
                                                            • +
                                                            • elif
                                                            • +
                                                            • with
                                                            • +
                                                            • as
                                                            • +
                                                            • print
                                                            • +
                                                            • true
                                                            • +
                                                            • self
                                                            • +
                                                            • except
                                                            • +
                                                            • try
                                                            • +
                                                            • exec
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index 8ba2d699ed..a45c61e616 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -14,3 +14,84 @@ sidebar_label: python-experimental |generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false| |useNose|use the nose test framework| |false| |library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|map|dict| + + +## LANGUAGE PRIMITIVES + +
                                                            • str
                                                            • +
                                                            • date
                                                            • +
                                                            • datetime
                                                            • +
                                                            • file
                                                            • +
                                                            • none_type
                                                            • +
                                                            • bool
                                                            • +
                                                            • file_type
                                                            • +
                                                            • dict
                                                            • +
                                                            • float
                                                            • +
                                                            • list
                                                            • +
                                                            • int
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • import
                                                            • +
                                                            • def
                                                            • +
                                                            • for
                                                            • +
                                                            • form_params
                                                            • +
                                                            • local_var_files
                                                            • +
                                                            • del
                                                            • +
                                                            • global
                                                            • +
                                                            • none
                                                            • +
                                                            • while
                                                            • +
                                                            • nonlocal
                                                            • +
                                                            • not
                                                            • +
                                                            • lambda
                                                            • +
                                                            • and
                                                            • +
                                                            • assert
                                                            • +
                                                            • else
                                                            • +
                                                            • continue
                                                            • +
                                                            • resource_path
                                                            • +
                                                            • yield
                                                            • +
                                                            • property
                                                            • +
                                                            • raise
                                                            • +
                                                            • await
                                                            • +
                                                            • path_params
                                                            • +
                                                            • from
                                                            • +
                                                            • if
                                                            • +
                                                            • class
                                                            • +
                                                            • or
                                                            • +
                                                            • pass
                                                            • +
                                                            • break
                                                            • +
                                                            • in
                                                            • +
                                                            • finally
                                                            • +
                                                            • all_params
                                                            • +
                                                            • false
                                                            • +
                                                            • body_params
                                                            • +
                                                            • is
                                                            • +
                                                            • elif
                                                            • +
                                                            • auth_settings
                                                            • +
                                                            • header_params
                                                            • +
                                                            • with
                                                            • +
                                                            • async
                                                            • +
                                                            • as
                                                            • +
                                                            • print
                                                            • +
                                                            • query_params
                                                            • +
                                                            • true
                                                            • +
                                                            • self
                                                            • +
                                                            • except
                                                            • +
                                                            • try
                                                            • +
                                                            • exec
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index 1b68530a86..c09d7d993a 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -17,3 +17,88 @@ sidebar_label: python-flask |supportPython2|support python2| |false| |serverPort|TCP port to listen to in app.run| |8080| |useNose|use the nose test framework| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • str
                                                            • +
                                                            • date
                                                            • +
                                                            • datetime
                                                            • +
                                                            • file
                                                            • +
                                                            • bool
                                                            • +
                                                            • Dict
                                                            • +
                                                            • byte
                                                            • +
                                                            • bytearray
                                                            • +
                                                            • List
                                                            • +
                                                            • float
                                                            • +
                                                            • int
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • import
                                                            • +
                                                            • def
                                                            • +
                                                            • for
                                                            • +
                                                            • del
                                                            • +
                                                            • global
                                                            • +
                                                            • none
                                                            • +
                                                            • while
                                                            • +
                                                            • nonlocal
                                                            • +
                                                            • not
                                                            • +
                                                            • lambda
                                                            • +
                                                            • and
                                                            • +
                                                            • assert
                                                            • +
                                                            • else
                                                            • +
                                                            • continue
                                                            • +
                                                            • yield
                                                            • +
                                                            • property
                                                            • +
                                                            • raise
                                                            • +
                                                            • from
                                                            • +
                                                            • if
                                                            • +
                                                            • class
                                                            • +
                                                            • or
                                                            • +
                                                            • pass
                                                            • +
                                                            • break
                                                            • +
                                                            • in
                                                            • +
                                                            • finally
                                                            • +
                                                            • false
                                                            • +
                                                            • is
                                                            • +
                                                            • elif
                                                            • +
                                                            • with
                                                            • +
                                                            • as
                                                            • +
                                                            • print
                                                            • +
                                                            • true
                                                            • +
                                                            • self
                                                            • +
                                                            • except
                                                            • +
                                                            • try
                                                            • +
                                                            • exec
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/python.md b/docs/generators/python.md index ee581848b0..2a394af036 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -14,3 +14,81 @@ sidebar_label: python |generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false| |useNose|use the nose test framework| |false| |library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • str
                                                            • +
                                                            • date
                                                            • +
                                                            • datetime
                                                            • +
                                                            • file
                                                            • +
                                                            • bool
                                                            • +
                                                            • dict
                                                            • +
                                                            • float
                                                            • +
                                                            • list
                                                            • +
                                                            • int
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • import
                                                            • +
                                                            • def
                                                            • +
                                                            • for
                                                            • +
                                                            • form_params
                                                            • +
                                                            • local_var_files
                                                            • +
                                                            • del
                                                            • +
                                                            • global
                                                            • +
                                                            • none
                                                            • +
                                                            • while
                                                            • +
                                                            • nonlocal
                                                            • +
                                                            • not
                                                            • +
                                                            • lambda
                                                            • +
                                                            • and
                                                            • +
                                                            • assert
                                                            • +
                                                            • else
                                                            • +
                                                            • continue
                                                            • +
                                                            • resource_path
                                                            • +
                                                            • yield
                                                            • +
                                                            • property
                                                            • +
                                                            • raise
                                                            • +
                                                            • await
                                                            • +
                                                            • path_params
                                                            • +
                                                            • from
                                                            • +
                                                            • if
                                                            • +
                                                            • class
                                                            • +
                                                            • or
                                                            • +
                                                            • pass
                                                            • +
                                                            • break
                                                            • +
                                                            • in
                                                            • +
                                                            • finally
                                                            • +
                                                            • all_params
                                                            • +
                                                            • false
                                                            • +
                                                            • body_params
                                                            • +
                                                            • is
                                                            • +
                                                            • elif
                                                            • +
                                                            • auth_settings
                                                            • +
                                                            • header_params
                                                            • +
                                                            • with
                                                            • +
                                                            • async
                                                            • +
                                                            • as
                                                            • +
                                                            • print
                                                            • +
                                                            • query_params
                                                            • +
                                                            • true
                                                            • +
                                                            • self
                                                            • +
                                                            • except
                                                            • +
                                                            • try
                                                            • +
                                                            • exec
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/r.md b/docs/generators/r.md index fa257ae0ed..e304948fdc 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -10,3 +10,48 @@ sidebar_label: r |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |returnExceptionOnFailure|Throw an exception on non success response codes| |false| |exceptionPackage|Specify the exception handling package|
                                                            **default**
                                                            Use stop() for raising exceptions.
                                                            **rlang**
                                                            Use rlang package for exceptions.
                                                            |default| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • character
                                                            • +
                                                            • numeric
                                                            • +
                                                            • integer
                                                            • +
                                                            • data.frame
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • next
                                                            • +
                                                            • inf
                                                            • +
                                                            • in
                                                            • +
                                                            • break
                                                            • +
                                                            • for
                                                            • +
                                                            • false
                                                            • +
                                                            • apiresponse
                                                            • +
                                                            • while
                                                            • +
                                                            • na
                                                            • +
                                                            • null
                                                            • +
                                                            • na_character_
                                                            • +
                                                            • na_integer_
                                                            • +
                                                            • else
                                                            • +
                                                            • repeat
                                                            • +
                                                            • function
                                                            • +
                                                            • true
                                                            • +
                                                            • na_complex_
                                                            • +
                                                            • nan
                                                            • +
                                                            • na_real_
                                                            • +
                                                            • if
                                                            • +
                                                            diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index d55421f8d6..07e9f93fb2 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -6,3 +6,87 @@ sidebar_label: ruby-on-rails | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |databaseAdapter|The adapter for database (e.g. mysql, sqlite). Default: sqlite| |sqlite| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • Object
                                                            • +
                                                            • String
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Hash
                                                            • +
                                                            • File
                                                            • +
                                                            • Date
                                                            • +
                                                            • DateTime
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • next
                                                            • +
                                                            • defined?
                                                            • +
                                                            • def
                                                            • +
                                                            • for
                                                            • +
                                                            • redo
                                                            • +
                                                            • do
                                                            • +
                                                            • elsif
                                                            • +
                                                            • while
                                                            • +
                                                            • when
                                                            • +
                                                            • nil
                                                            • +
                                                            • not
                                                            • +
                                                            • unless
                                                            • +
                                                            • and
                                                            • +
                                                            • else
                                                            • +
                                                            • yield
                                                            • +
                                                            • alias
                                                            • +
                                                            • end
                                                            • +
                                                            • class
                                                            • +
                                                            • if
                                                            • +
                                                            • rescue
                                                            • +
                                                            • case
                                                            • +
                                                            • retry
                                                            • +
                                                            • or
                                                            • +
                                                            • ensure
                                                            • +
                                                            • in
                                                            • +
                                                            • break
                                                            • +
                                                            • module
                                                            • +
                                                            • false
                                                            • +
                                                            • undef
                                                            • +
                                                            • then
                                                            • +
                                                            • super
                                                            • +
                                                            • __line__
                                                            • +
                                                            • __file__
                                                            • +
                                                            • true
                                                            • +
                                                            • self
                                                            • +
                                                            • until
                                                            • +
                                                            • begin
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index f46767a209..6d6af85c58 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -5,3 +5,87 @@ sidebar_label: ruby-sinatra | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • Object
                                                            • +
                                                            • String
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Hash
                                                            • +
                                                            • File
                                                            • +
                                                            • Date
                                                            • +
                                                            • DateTime
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • next
                                                            • +
                                                            • defined?
                                                            • +
                                                            • def
                                                            • +
                                                            • for
                                                            • +
                                                            • redo
                                                            • +
                                                            • do
                                                            • +
                                                            • elsif
                                                            • +
                                                            • while
                                                            • +
                                                            • when
                                                            • +
                                                            • nil
                                                            • +
                                                            • not
                                                            • +
                                                            • unless
                                                            • +
                                                            • and
                                                            • +
                                                            • else
                                                            • +
                                                            • yield
                                                            • +
                                                            • alias
                                                            • +
                                                            • end
                                                            • +
                                                            • class
                                                            • +
                                                            • if
                                                            • +
                                                            • rescue
                                                            • +
                                                            • case
                                                            • +
                                                            • retry
                                                            • +
                                                            • or
                                                            • +
                                                            • ensure
                                                            • +
                                                            • in
                                                            • +
                                                            • break
                                                            • +
                                                            • module
                                                            • +
                                                            • false
                                                            • +
                                                            • undef
                                                            • +
                                                            • then
                                                            • +
                                                            • super
                                                            • +
                                                            • __line__
                                                            • +
                                                            • __file__
                                                            • +
                                                            • true
                                                            • +
                                                            • self
                                                            • +
                                                            • until
                                                            • +
                                                            • begin
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 17eab9c029..15d27a0fd1 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -22,3 +22,85 @@ sidebar_label: ruby |gemAuthorEmail|gem author email (only one is supported).| |null| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|HTTP library template (sub-template) to use|
                                                            **faraday**
                                                            Faraday (https://github.com/lostisland/faraday) (Beta support)
                                                            **typhoeus**
                                                            Typhoeus >= 1.0.1 (https://github.com/typhoeus/typhoeus)
                                                            |typhoeus| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • string
                                                            • +
                                                            • String
                                                            • +
                                                            • Hash
                                                            • +
                                                            • Date
                                                            • +
                                                            • DateTime
                                                            • +
                                                            • int
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • array
                                                            • +
                                                            • Object
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • map
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • next
                                                            • +
                                                            • defined?
                                                            • +
                                                            • def
                                                            • +
                                                            • _header_accept_result
                                                            • +
                                                            • _header_content_type
                                                            • +
                                                            • for
                                                            • +
                                                            • local_var_path
                                                            • +
                                                            • form_params
                                                            • +
                                                            • redo
                                                            • +
                                                            • do
                                                            • +
                                                            • elsif
                                                            • +
                                                            • while
                                                            • +
                                                            • when
                                                            • +
                                                            • nil
                                                            • +
                                                            • not
                                                            • +
                                                            • unless
                                                            • +
                                                            • and
                                                            • +
                                                            • else
                                                            • +
                                                            • yield
                                                            • +
                                                            • alias
                                                            • +
                                                            • end
                                                            • +
                                                            • class
                                                            • +
                                                            • if
                                                            • +
                                                            • rescue
                                                            • +
                                                            • case
                                                            • +
                                                            • retry
                                                            • +
                                                            • or
                                                            • +
                                                            • ensure
                                                            • +
                                                            • in
                                                            • +
                                                            • break
                                                            • +
                                                            • module
                                                            • +
                                                            • false
                                                            • +
                                                            • undef
                                                            • +
                                                            • then
                                                            • +
                                                            • _header_accept
                                                            • +
                                                            • super
                                                            • +
                                                            • header_params
                                                            • +
                                                            • __line__
                                                            • +
                                                            • auth_names
                                                            • +
                                                            • __file__
                                                            • +
                                                            • query_params
                                                            • +
                                                            • true
                                                            • +
                                                            • self
                                                            • +
                                                            • until
                                                            • +
                                                            • post_body
                                                            • +
                                                            • begin
                                                            • +
                                                            • send
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index 9671d82b9f..c17eb0390f 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -7,3 +7,92 @@ sidebar_label: rust-server | ------ | ----------- | ------ | ------- | |packageName|Rust crate name (convention: snake_case).| |openapi_client| |packageVersion|Rust crate version.| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Vec| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
                                                            • u8
                                                            • +
                                                            • bool
                                                            • +
                                                            • f32
                                                            • +
                                                            • f64
                                                            • +
                                                            • i64
                                                            • +
                                                            • i32
                                                            • +
                                                            • String
                                                            • +
                                                            • i8
                                                            • +
                                                            • i16
                                                            • +
                                                            • usize
                                                            • +
                                                            • str
                                                            • +
                                                            • u64
                                                            • +
                                                            • u32
                                                            • +
                                                            • isize
                                                            • +
                                                            • char
                                                            • +
                                                            • u16
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • struct
                                                            • +
                                                            • mod
                                                            • +
                                                            • use
                                                            • +
                                                            • extern
                                                            • +
                                                            • do
                                                            • +
                                                            • type
                                                            • +
                                                            • while
                                                            • +
                                                            • impl
                                                            • +
                                                            • ref
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • loop
                                                            • +
                                                            • trait
                                                            • +
                                                            • let
                                                            • +
                                                            • priv
                                                            • +
                                                            • if
                                                            • +
                                                            • static
                                                            • +
                                                            • in
                                                            • +
                                                            • sizeof
                                                            • +
                                                            • enum
                                                            • +
                                                            • as
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • become
                                                            • +
                                                            • virtual
                                                            • +
                                                            • const
                                                            • +
                                                            • fn
                                                            • +
                                                            • for
                                                            • +
                                                            • box
                                                            • +
                                                            • pure
                                                            • +
                                                            • unsafe
                                                            • +
                                                            • mut
                                                            • +
                                                            • yield
                                                            • +
                                                            • offsetof
                                                            • +
                                                            • where
                                                            • +
                                                            • override
                                                            • +
                                                            • typeof
                                                            • +
                                                            • macro
                                                            • +
                                                            • move
                                                            • +
                                                            • proc
                                                            • +
                                                            • alignof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • match
                                                            • +
                                                            • abstract
                                                            • +
                                                            • crate
                                                            • +
                                                            • super
                                                            • +
                                                            • self
                                                            • +
                                                            • pub
                                                            • +
                                                            • return
                                                            • +
                                                            • unsized
                                                            • +
                                                            diff --git a/docs/generators/rust.md b/docs/generators/rust.md index 2f1aa5d747..42c924301a 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -9,3 +9,105 @@ sidebar_label: rust |packageVersion|Rust package version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|library template (sub-template) to use.|
                                                            **hyper**
                                                            HTTP client: Hyper.
                                                            **reqwest**
                                                            HTTP client: Reqwest.
                                                            |hyper| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • u8
                                                            • +
                                                            • f32
                                                            • +
                                                            • bool
                                                            • +
                                                            • f64
                                                            • +
                                                            • i64
                                                            • +
                                                            • i32
                                                            • +
                                                            • String
                                                            • +
                                                            • i8
                                                            • +
                                                            • i16
                                                            • +
                                                            • u64
                                                            • +
                                                            • Vec<u8>
                                                            • +
                                                            • u32
                                                            • +
                                                            • char
                                                            • +
                                                            • u16
                                                            • +
                                                            • File
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • struct
                                                            • +
                                                            • mod
                                                            • +
                                                            • use
                                                            • +
                                                            • extern
                                                            • +
                                                            • do
                                                            • +
                                                            • type
                                                            • +
                                                            • while
                                                            • +
                                                            • impl
                                                            • +
                                                            • ref
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • loop
                                                            • +
                                                            • trait
                                                            • +
                                                            • let
                                                            • +
                                                            • priv
                                                            • +
                                                            • if
                                                            • +
                                                            • static
                                                            • +
                                                            • in
                                                            • +
                                                            • sizeof
                                                            • +
                                                            • enum
                                                            • +
                                                            • as
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • become
                                                            • +
                                                            • virtual
                                                            • +
                                                            • const
                                                            • +
                                                            • fn
                                                            • +
                                                            • for
                                                            • +
                                                            • box
                                                            • +
                                                            • pure
                                                            • +
                                                            • unsafe
                                                            • +
                                                            • mut
                                                            • +
                                                            • yield
                                                            • +
                                                            • offsetof
                                                            • +
                                                            • where
                                                            • +
                                                            • override
                                                            • +
                                                            • typeof
                                                            • +
                                                            • macro
                                                            • +
                                                            • move
                                                            • +
                                                            • proc
                                                            • +
                                                            • alignof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • match
                                                            • +
                                                            • abstract
                                                            • +
                                                            • crate
                                                            • +
                                                            • super
                                                            • +
                                                            • self
                                                            • +
                                                            • pub
                                                            • +
                                                            • return
                                                            • +
                                                            • unsized
                                                            • +
                                                            diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index ceae6b73ea..e24f0977b4 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -14,3 +14,93 @@ sidebar_label: scala-akka |apiPackage|package for generated api classes| |null| |sourceFolder|source folder for generated code| |null| |mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.DateTime| +|Array|java.util.List| +|ListSet|scala.collection.immutable.ListSet| +|UUID|java.util.UUID| +|File|java.io.File| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|set|Set| +|array|ListBuffer| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • List
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Map
                                                            • +
                                                            • Seq
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • implicit
                                                            • +
                                                            • private
                                                            • +
                                                            • def
                                                            • +
                                                            • import
                                                            • +
                                                            • lazy
                                                            • +
                                                            • for
                                                            • +
                                                            • do
                                                            • +
                                                            • type
                                                            • +
                                                            • while
                                                            • +
                                                            • protected
                                                            • +
                                                            • else
                                                            • +
                                                            • yield
                                                            • +
                                                            • trait
                                                            • +
                                                            • catch
                                                            • +
                                                            • override
                                                            • +
                                                            • forsome
                                                            • +
                                                            • class
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • val
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • sealed
                                                            • +
                                                            • var
                                                            • +
                                                            • finally
                                                            • +
                                                            • false
                                                            • +
                                                            • match
                                                            • +
                                                            • this
                                                            • +
                                                            • abstract
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • throw
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • return
                                                            • +
                                                            • object
                                                            • +
                                                            diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 2a38482084..7a286005eb 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -8,3 +8,117 @@ sidebar_label: scala-finch |packageName|Finch package name (e.g. org.openapitools).| |org.openapitools| |modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|HashMap|scala.collection.immutable.HashMap| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|java.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|java.time.LocalDateTime| +|ZonedDateTime|java.time.ZonedDateTime| +|ArrayBuffer|scala.collection.mutable.ArrayBuffer| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|scala.collection.immutable.Map| +|Seq|scala.collection.immutable.Seq| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                                            • Integer
                                                            • +
                                                            • Float
                                                            • +
                                                            • AnyVal
                                                            • +
                                                            • AnyRef
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • String
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • synchronized
                                                            • +
                                                            • def
                                                            • +
                                                            • do
                                                            • +
                                                            • type
                                                            • +
                                                            • while
                                                            • +
                                                            • float
                                                            • +
                                                            • protected
                                                            • +
                                                            • else
                                                            • +
                                                            • continue
                                                            • +
                                                            • trait
                                                            • +
                                                            • catch
                                                            • +
                                                            • forsome
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • val
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • sealed
                                                            • +
                                                            • var
                                                            • +
                                                            • double
                                                            • +
                                                            • byte
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • strictfp
                                                            • +
                                                            • throws
                                                            • +
                                                            • enum
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • object
                                                            • +
                                                            • implements
                                                            • +
                                                            • implicit
                                                            • +
                                                            • private
                                                            • +
                                                            • import
                                                            • +
                                                            • const
                                                            • +
                                                            • lazy
                                                            • +
                                                            • for
                                                            • +
                                                            • interface
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • assert
                                                            • +
                                                            • yield
                                                            • +
                                                            • override
                                                            • +
                                                            • class
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • match
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index 8f56ccebbf..810d1887c4 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -13,3 +13,104 @@ sidebar_label: scala-gatling |modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| |sourceFolder|source folder for generated code| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|ListSet|scala.collection.immutable.ListSet| +|UUID|java.util.UUID| +|File|java.io.File| +|Seq|scala.collection.immutable.Seq| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|set|Set| +|array|ListBuffer| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • List
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Map
                                                            • +
                                                            • Seq
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • def
                                                            • +
                                                            • basepath
                                                            • +
                                                            • queryparams
                                                            • +
                                                            • do
                                                            • +
                                                            • type
                                                            • +
                                                            • while
                                                            • +
                                                            • path
                                                            • +
                                                            • protected
                                                            • +
                                                            • else
                                                            • +
                                                            • trait
                                                            • +
                                                            • catch
                                                            • +
                                                            • forsome
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • contenttypes
                                                            • +
                                                            • val
                                                            • +
                                                            • new
                                                            • +
                                                            • mp
                                                            • +
                                                            • package
                                                            • +
                                                            • sealed
                                                            • +
                                                            • var
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • formparams
                                                            • +
                                                            • headerparams
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • object
                                                            • +
                                                            • implicit
                                                            • +
                                                            • private
                                                            • +
                                                            • import
                                                            • +
                                                            • lazy
                                                            • +
                                                            • for
                                                            • +
                                                            • apiinvoker
                                                            • +
                                                            • yield
                                                            • +
                                                            • override
                                                            • +
                                                            • class
                                                            • +
                                                            • postbody
                                                            • +
                                                            • false
                                                            • +
                                                            • match
                                                            • +
                                                            • abstract
                                                            • +
                                                            • contenttype
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • throw
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index d27b8bf3a0..f9ff403756 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -14,3 +14,104 @@ sidebar_label: scala-httpclient-deprecated |apiPackage|package for generated api classes| |null| |sourceFolder|source folder for generated code| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|ListSet|scala.collection.immutable.ListSet| +|UUID|java.util.UUID| +|File|java.io.File| +|Seq|scala.collection.immutable.Seq| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|set|Set| +|array|ListBuffer| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • List
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Map
                                                            • +
                                                            • Seq
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • def
                                                            • +
                                                            • basepath
                                                            • +
                                                            • queryparams
                                                            • +
                                                            • do
                                                            • +
                                                            • type
                                                            • +
                                                            • while
                                                            • +
                                                            • path
                                                            • +
                                                            • protected
                                                            • +
                                                            • else
                                                            • +
                                                            • trait
                                                            • +
                                                            • catch
                                                            • +
                                                            • forsome
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • contenttypes
                                                            • +
                                                            • val
                                                            • +
                                                            • new
                                                            • +
                                                            • mp
                                                            • +
                                                            • package
                                                            • +
                                                            • sealed
                                                            • +
                                                            • var
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • formparams
                                                            • +
                                                            • headerparams
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • object
                                                            • +
                                                            • implicit
                                                            • +
                                                            • private
                                                            • +
                                                            • import
                                                            • +
                                                            • lazy
                                                            • +
                                                            • for
                                                            • +
                                                            • apiinvoker
                                                            • +
                                                            • yield
                                                            • +
                                                            • override
                                                            • +
                                                            • class
                                                            • +
                                                            • postbody
                                                            • +
                                                            • false
                                                            • +
                                                            • match
                                                            • +
                                                            • abstract
                                                            • +
                                                            • contenttype
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • throw
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index c0d040c642..92ad208d8b 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -14,3 +14,104 @@ sidebar_label: scala-lagom-server |apiPackage|package for generated api classes| |null| |sourceFolder|source folder for generated code| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.DateTime| +|Array|java.util.List| +|ListSet|scala.collection.immutable.ListSet| +|UUID|java.util.UUID| +|File|java.io.File| +|Seq|scala.collection.immutable.Seq| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|set|Set| +|array|ListBuffer| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • List
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Map
                                                            • +
                                                            • Seq
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • def
                                                            • +
                                                            • basepath
                                                            • +
                                                            • queryparams
                                                            • +
                                                            • do
                                                            • +
                                                            • type
                                                            • +
                                                            • while
                                                            • +
                                                            • path
                                                            • +
                                                            • protected
                                                            • +
                                                            • else
                                                            • +
                                                            • trait
                                                            • +
                                                            • catch
                                                            • +
                                                            • forsome
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • contenttypes
                                                            • +
                                                            • val
                                                            • +
                                                            • new
                                                            • +
                                                            • mp
                                                            • +
                                                            • package
                                                            • +
                                                            • sealed
                                                            • +
                                                            • var
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • formparams
                                                            • +
                                                            • headerparams
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • object
                                                            • +
                                                            • implicit
                                                            • +
                                                            • private
                                                            • +
                                                            • import
                                                            • +
                                                            • lazy
                                                            • +
                                                            • for
                                                            • +
                                                            • apiinvoker
                                                            • +
                                                            • yield
                                                            • +
                                                            • override
                                                            • +
                                                            • class
                                                            • +
                                                            • postbody
                                                            • +
                                                            • false
                                                            • +
                                                            • match
                                                            • +
                                                            • abstract
                                                            • +
                                                            • contenttype
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • throw
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index 1582e3959f..af6e5a41c8 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -19,3 +19,98 @@ sidebar_label: scala-play-server |supportAsync|If set, wraps API return types with Futures and generates async actions.| |false| |generateCustomExceptions|If set, generates custom exception types.| |true| |useSwaggerUI|Add a route to /api which show your documentation in swagger-ui. Will also import needed dependencies| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|scala.collection.immutable.Set| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|java.time.LocalDate| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|ListSet|scala.collection.immutable.ListSet| +|OffsetDateTime|java.time.OffsetDateTime| +|List|java.util.*| +|TemporaryFile|play.api.libs.Files.TemporaryFile| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| +|Seq|scala.collection.immutable.Seq| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|set|Set| +|array|List| +|map|Map| + + +## LANGUAGE PRIMITIVES + +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • List
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Map
                                                            • +
                                                            • Seq
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • implicit
                                                            • +
                                                            • private
                                                            • +
                                                            • def
                                                            • +
                                                            • import
                                                            • +
                                                            • lazy
                                                            • +
                                                            • for
                                                            • +
                                                            • do
                                                            • +
                                                            • type
                                                            • +
                                                            • while
                                                            • +
                                                            • forSome
                                                            • +
                                                            • protected
                                                            • +
                                                            • else
                                                            • +
                                                            • yield
                                                            • +
                                                            • trait
                                                            • +
                                                            • catch
                                                            • +
                                                            • override
                                                            • +
                                                            • class
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • val
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • sealed
                                                            • +
                                                            • var
                                                            • +
                                                            • finally
                                                            • +
                                                            • false
                                                            • +
                                                            • match
                                                            • +
                                                            • this
                                                            • +
                                                            • abstract
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • throw
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • return
                                                            • +
                                                            • object
                                                            • +
                                                            diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index c55dc21c74..aeb1f8de82 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -13,3 +13,106 @@ sidebar_label: scalatra |modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| |sourceFolder|source folder for generated code| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.LocalDateTime| +|Set|scala.collection.immutable.Set| +|LocalTime|org.joda.time.LocalTime| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.DateTime| +|Array|java.util.List| +|ListSet|scala.collection.immutable.ListSet| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|set|Set| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • List
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Map
                                                            • +
                                                            • Seq
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • synchronized
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • type
                                                            • +
                                                            • protected
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • catch
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • double
                                                            • +
                                                            • byte
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • strictfp
                                                            • +
                                                            • throws
                                                            • +
                                                            • enum
                                                            • +
                                                            • extends
                                                            • +
                                                            • transient
                                                            • +
                                                            • final
                                                            • +
                                                            • try
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • import
                                                            • +
                                                            • const
                                                            • +
                                                            • for
                                                            • +
                                                            • interface
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • assert
                                                            • +
                                                            • class
                                                            • +
                                                            • break
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • boolean
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index bf097e1ced..082e71e571 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -14,3 +14,104 @@ sidebar_label: scalaz |apiPackage|package for generated api classes| |null| |sourceFolder|source folder for generated code| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.LocalDateTime| +|LocalTime|org.joda.time.LocalTime| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.LocalDate| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.DateTime| +|Array|java.util.List| +|ListSet|scala.collection.immutable.ListSet| +|UUID|java.util.UUID| +|File|java.io.File| +|Seq|scala.collection.immutable.Seq| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|set|Set| +|array|ListBuffer| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • List
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Map
                                                            • +
                                                            • Seq
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • def
                                                            • +
                                                            • basepath
                                                            • +
                                                            • queryparams
                                                            • +
                                                            • do
                                                            • +
                                                            • type
                                                            • +
                                                            • while
                                                            • +
                                                            • path
                                                            • +
                                                            • protected
                                                            • +
                                                            • else
                                                            • +
                                                            • trait
                                                            • +
                                                            • catch
                                                            • +
                                                            • forsome
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • contenttypes
                                                            • +
                                                            • val
                                                            • +
                                                            • new
                                                            • +
                                                            • mp
                                                            • +
                                                            • package
                                                            • +
                                                            • sealed
                                                            • +
                                                            • var
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • formparams
                                                            • +
                                                            • headerparams
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • object
                                                            • +
                                                            • implicit
                                                            • +
                                                            • private
                                                            • +
                                                            • import
                                                            • +
                                                            • lazy
                                                            • +
                                                            • for
                                                            • +
                                                            • apiinvoker
                                                            • +
                                                            • yield
                                                            • +
                                                            • override
                                                            • +
                                                            • class
                                                            • +
                                                            • postbody
                                                            • +
                                                            • false
                                                            • +
                                                            • match
                                                            • +
                                                            • abstract
                                                            • +
                                                            • contenttype
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • throw
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 6d6d462d80..09a9e979cd 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -64,3 +64,120 @@ sidebar_label: spring |returnSuccessCode|Generated server returns 2xx code| |false| |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| |library|library template (sub-template)|
                                                            **spring-boot**
                                                            Spring-boot Server application using the SpringFox integration.
                                                            **spring-mvc**
                                                            Spring-MVC Server application using the SpringFox integration.
                                                            **spring-cloud**
                                                            Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
                                                            |spring-boot| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | +|LocalDateTime|org.joda.time.*| +|Set|java.util.*| +|LocalTime|org.joda.time.*| +|HashMap|java.util.HashMap| +|ArrayList|java.util.ArrayList| +|URI|java.net.URI| +|Timestamp|java.sql.Timestamp| +|LocalDate|org.joda.time.*| +|BigDecimal|java.math.BigDecimal| +|Date|java.util.Date| +|DateTime|org.joda.time.*| +|Array|java.util.List| +|List|java.util.*| +|UUID|java.util.UUID| +|File|java.io.File| +|Map|java.util.Map| + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|ArrayList| +|map|HashMap| + + +## LANGUAGE PRIMITIVES + +
                                                            • Integer
                                                            • +
                                                            • byte[]
                                                            • +
                                                            • Float
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • String
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • Double
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • localvaraccepts
                                                            • +
                                                            • synchronized
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • localvarpath
                                                            • +
                                                            • protected
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • apiclient
                                                            • +
                                                            • localvarqueryparams
                                                            • +
                                                            • catch
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • localvaraccept
                                                            • +
                                                            • double
                                                            • +
                                                            • byte
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • strictfp
                                                            • +
                                                            • throws
                                                            • +
                                                            • enum
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • apiexception
                                                            • +
                                                            • final
                                                            • +
                                                            • try
                                                            • +
                                                            • object
                                                            • +
                                                            • localvarcontenttypes
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • import
                                                            • +
                                                            • const
                                                            • +
                                                            • configuration
                                                            • +
                                                            • for
                                                            • +
                                                            • apiresponse
                                                            • +
                                                            • interface
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • localvarheaderparams
                                                            • +
                                                            • native
                                                            • +
                                                            • localvarcontenttype
                                                            • +
                                                            • assert
                                                            • +
                                                            • stringutil
                                                            • +
                                                            • class
                                                            • +
                                                            • localvarcollectionqueryparams
                                                            • +
                                                            • localvarcookieparams
                                                            • +
                                                            • localreturntype
                                                            • +
                                                            • localvarformparams
                                                            • +
                                                            • break
                                                            • +
                                                            • volatile
                                                            • +
                                                            • localvarauthnames
                                                            • +
                                                            • abstract
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • boolean
                                                            • +
                                                            • throw
                                                            • +
                                                            • localvarpostbody
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/swift2-deprecated.md b/docs/generators/swift2-deprecated.md index 1ba09b421c..45a0547686 100644 --- a/docs/generators/swift2-deprecated.md +++ b/docs/generators/swift2-deprecated.md @@ -26,3 +26,129 @@ sidebar_label: swift2-deprecated |podDocumentationURL|Documentation URL used for Podspec| |null| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • Float
                                                            • +
                                                            • AnyObject
                                                            • +
                                                            • Character
                                                            • +
                                                            • Int64
                                                            • +
                                                            • Bool
                                                            • +
                                                            • Int32
                                                            • +
                                                            • String
                                                            • +
                                                            • Void
                                                            • +
                                                            • Double
                                                            • +
                                                            • Int
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • struct
                                                            • +
                                                            • prefix
                                                            • +
                                                            • convenience
                                                            • +
                                                            • String
                                                            • +
                                                            • none
                                                            • +
                                                            • required
                                                            • +
                                                            • nil
                                                            • +
                                                            • Bool
                                                            • +
                                                            • else
                                                            • +
                                                            • let
                                                            • +
                                                            • mutating
                                                            • +
                                                            • catch
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • init
                                                            • +
                                                            • in
                                                            • +
                                                            • var
                                                            • +
                                                            • is
                                                            • +
                                                            • optional
                                                            • +
                                                            • infix
                                                            • +
                                                            • FUNCTION
                                                            • +
                                                            • enum
                                                            • +
                                                            • Float
                                                            • +
                                                            • as
                                                            • +
                                                            • left
                                                            • +
                                                            • extension
                                                            • +
                                                            • internal
                                                            • +
                                                            • lazy
                                                            • +
                                                            • guard
                                                            • +
                                                            • Self
                                                            • +
                                                            • nonmutating
                                                            • +
                                                            • weak
                                                            • +
                                                            • default
                                                            • +
                                                            • Int32
                                                            • +
                                                            • get
                                                            • +
                                                            • where
                                                            • +
                                                            • override
                                                            • +
                                                            • typealias
                                                            • +
                                                            • FILE
                                                            • +
                                                            • Protocol
                                                            • +
                                                            • set
                                                            • +
                                                            • break
                                                            • +
                                                            • willSet
                                                            • +
                                                            • right
                                                            • +
                                                            • ErrorResponse
                                                            • +
                                                            • AnyObject
                                                            • +
                                                            • Type
                                                            • +
                                                            • deinit
                                                            • +
                                                            • throw
                                                            • +
                                                            • self
                                                            • +
                                                            • return
                                                            • +
                                                            • open
                                                            • +
                                                            • COLUMN
                                                            • +
                                                            • do
                                                            • +
                                                            • dynamicType
                                                            • +
                                                            • while
                                                            • +
                                                            • operator
                                                            • +
                                                            • precedence
                                                            • +
                                                            • protocol
                                                            • +
                                                            • continue
                                                            • +
                                                            • dynamic
                                                            • +
                                                            • Void
                                                            • +
                                                            • associativity
                                                            • +
                                                            • static
                                                            • +
                                                            • Character
                                                            • +
                                                            • subscript
                                                            • +
                                                            • indirect
                                                            • +
                                                            • throws
                                                            • +
                                                            • Double
                                                            • +
                                                            • fileprivate
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • Class
                                                            • +
                                                            • try
                                                            • +
                                                            • rethrows
                                                            • +
                                                            • private
                                                            • +
                                                            • defer
                                                            • +
                                                            • import
                                                            • +
                                                            • for
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • switch
                                                            • +
                                                            • public
                                                            • +
                                                            • LINE
                                                            • +
                                                            • repeat
                                                            • +
                                                            • postfix
                                                            • +
                                                            • class
                                                            • +
                                                            • false
                                                            • +
                                                            • Data
                                                            • +
                                                            • unowned
                                                            • +
                                                            • super
                                                            • +
                                                            • inout
                                                            • +
                                                            • func
                                                            • +
                                                            • Int64
                                                            • +
                                                            • didSet
                                                            • +
                                                            • fallthrough
                                                            • +
                                                            diff --git a/docs/generators/swift3-deprecated.md b/docs/generators/swift3-deprecated.md index d72fe8b9d2..a3079fd607 100644 --- a/docs/generators/swift3-deprecated.md +++ b/docs/generators/swift3-deprecated.md @@ -28,3 +28,121 @@ sidebar_label: swift3-deprecated |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • Float
                                                            • +
                                                            • AnyObject
                                                            • +
                                                            • Character
                                                            • +
                                                            • Int64
                                                            • +
                                                            • Bool
                                                            • +
                                                            • Int32
                                                            • +
                                                            • String
                                                            • +
                                                            • Void
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • struct
                                                            • +
                                                            • prefix
                                                            • +
                                                            • COLUMN
                                                            • +
                                                            • convenience
                                                            • +
                                                            • String
                                                            • +
                                                            • do
                                                            • +
                                                            • none
                                                            • +
                                                            • dynamicType
                                                            • +
                                                            • while
                                                            • +
                                                            • operator
                                                            • +
                                                            • precedence
                                                            • +
                                                            • required
                                                            • +
                                                            • nil
                                                            • +
                                                            • protocol
                                                            • +
                                                            • Bool
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • dynamic
                                                            • +
                                                            • let
                                                            • +
                                                            • mutating
                                                            • +
                                                            • Void
                                                            • +
                                                            • associativity
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • init
                                                            • +
                                                            • static
                                                            • +
                                                            • Character
                                                            • +
                                                            • subscript
                                                            • +
                                                            • in
                                                            • +
                                                            • var
                                                            • +
                                                            • is
                                                            • +
                                                            • optional
                                                            • +
                                                            • infix
                                                            • +
                                                            • Double
                                                            • +
                                                            • FUNCTION
                                                            • +
                                                            • enum
                                                            • +
                                                            • Float
                                                            • +
                                                            • as
                                                            • +
                                                            • left
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • Class
                                                            • +
                                                            • extension
                                                            • +
                                                            • internal
                                                            • +
                                                            • private
                                                            • +
                                                            • import
                                                            • +
                                                            • lazy
                                                            • +
                                                            • for
                                                            • +
                                                            • Self
                                                            • +
                                                            • Any
                                                            • +
                                                            • nonmutating
                                                            • +
                                                            • Int
                                                            • +
                                                            • URL
                                                            • +
                                                            • switch
                                                            • +
                                                            • weak
                                                            • +
                                                            • default
                                                            • +
                                                            • public
                                                            • +
                                                            • Int32
                                                            • +
                                                            • get
                                                            • +
                                                            • LINE
                                                            • +
                                                            • where
                                                            • +
                                                            • override
                                                            • +
                                                            • postfix
                                                            • +
                                                            • typealias
                                                            • +
                                                            • FILE
                                                            • +
                                                            • Protocol
                                                            • +
                                                            • class
                                                            • +
                                                            • set
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • Error
                                                            • +
                                                            • Data
                                                            • +
                                                            • right
                                                            • +
                                                            • unowned
                                                            • +
                                                            • ErrorResponse
                                                            • +
                                                            • Response
                                                            • +
                                                            • super
                                                            • +
                                                            • AnyObject
                                                            • +
                                                            • inout
                                                            • +
                                                            • Type
                                                            • +
                                                            • deinit
                                                            • +
                                                            • func
                                                            • +
                                                            • Int64
                                                            • +
                                                            • didSet
                                                            • +
                                                            • self
                                                            • +
                                                            • fallthrough
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/swift4.md b/docs/generators/swift4.md index 53f718d49c..7018d2aad2 100644 --- a/docs/generators/swift4.md +++ b/docs/generators/swift4.md @@ -30,3 +30,178 @@ sidebar_label: swift4 |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • Character
                                                            • +
                                                            • Data
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • URL
                                                            • +
                                                            • Date
                                                            • +
                                                            • Float
                                                            • +
                                                            • AnyObject
                                                            • +
                                                            • Decimal
                                                            • +
                                                            • Int64
                                                            • +
                                                            • Bool
                                                            • +
                                                            • Int32
                                                            • +
                                                            • Void
                                                            • +
                                                            • UUID
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • struct
                                                            • +
                                                            • #elseif
                                                            • +
                                                            • #file
                                                            • +
                                                            • #imageLiteral
                                                            • +
                                                            • prefix
                                                            • +
                                                            • convenience
                                                            • +
                                                            • none
                                                            • +
                                                            • String
                                                            • +
                                                            • Int16
                                                            • +
                                                            • required
                                                            • +
                                                            • nil
                                                            • +
                                                            • CountableRange
                                                            • +
                                                            • Float32
                                                            • +
                                                            • Bool
                                                            • +
                                                            • else
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • mutating
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • init
                                                            • +
                                                            • in
                                                            • +
                                                            • var
                                                            • +
                                                            • is
                                                            • +
                                                            • optional
                                                            • +
                                                            • infix
                                                            • +
                                                            • FUNCTION
                                                            • +
                                                            • enum
                                                            • +
                                                            • Float
                                                            • +
                                                            • as
                                                            • +
                                                            • Decodable
                                                            • +
                                                            • left
                                                            • +
                                                            • extension
                                                            • +
                                                            • internal
                                                            • +
                                                            • Set
                                                            • +
                                                            • lazy
                                                            • +
                                                            • guard
                                                            • +
                                                            • associatedtype
                                                            • +
                                                            • #available
                                                            • +
                                                            • Self
                                                            • +
                                                            • nonmutating
                                                            • +
                                                            • URL
                                                            • +
                                                            • weak
                                                            • +
                                                            • #function
                                                            • +
                                                            • default
                                                            • +
                                                            • Int32
                                                            • +
                                                            • get
                                                            • +
                                                            • where
                                                            • +
                                                            • typealias
                                                            • +
                                                            • override
                                                            • +
                                                            • Protocol
                                                            • +
                                                            • FILE
                                                            • +
                                                            • _
                                                            • +
                                                            • #selector
                                                            • +
                                                            • set
                                                            • +
                                                            • break
                                                            • +
                                                            • willSet
                                                            • +
                                                            • right
                                                            • +
                                                            • Int8
                                                            • +
                                                            • ErrorResponse
                                                            • +
                                                            • Type
                                                            • +
                                                            • AnyObject
                                                            • +
                                                            • Float64
                                                            • +
                                                            • deinit
                                                            • +
                                                            • throw
                                                            • +
                                                            • self
                                                            • +
                                                            • UInt
                                                            • +
                                                            • UInt32
                                                            • +
                                                            • open
                                                            • +
                                                            • return
                                                            • +
                                                            • #if
                                                            • +
                                                            • #column
                                                            • +
                                                            • COLUMN
                                                            • +
                                                            • #line
                                                            • +
                                                            • #endif
                                                            • +
                                                            • do
                                                            • +
                                                            • while
                                                            • +
                                                            • dynamicType
                                                            • +
                                                            • operator
                                                            • +
                                                            • precedence
                                                            • +
                                                            • StaticString
                                                            • +
                                                            • protocol
                                                            • +
                                                            • CountableClosedRange
                                                            • +
                                                            • continue
                                                            • +
                                                            • dynamic
                                                            • +
                                                            • associativity
                                                            • +
                                                            • Void
                                                            • +
                                                            • Unicode
                                                            • +
                                                            • static
                                                            • +
                                                            • #colorLiteral
                                                            • +
                                                            • subscript
                                                            • +
                                                            • indirect
                                                            • +
                                                            • Optional
                                                            • +
                                                            • Character
                                                            • +
                                                            • throws
                                                            • +
                                                            • Range
                                                            • +
                                                            • Double
                                                            • +
                                                            • fileprivate
                                                            • +
                                                            • true
                                                            • +
                                                            • final
                                                            • +
                                                            • try
                                                            • +
                                                            • Class
                                                            • +
                                                            • UInt16
                                                            • +
                                                            • rethrows
                                                            • +
                                                            • Float80
                                                            • +
                                                            • Encodable
                                                            • +
                                                            • #else
                                                            • +
                                                            • Dictionary
                                                            • +
                                                            • private
                                                            • +
                                                            • defer
                                                            • +
                                                            • import
                                                            • +
                                                            • ClosedRange
                                                            • +
                                                            • #fileLiteral
                                                            • +
                                                            • for
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • UInt8
                                                            • +
                                                            • switch
                                                            • +
                                                            • public
                                                            • +
                                                            • repeat
                                                            • +
                                                            • LINE
                                                            • +
                                                            • #sourceLocation
                                                            • +
                                                            • postfix
                                                            • +
                                                            • UInt64
                                                            • +
                                                            • class
                                                            • +
                                                            • false
                                                            • +
                                                            • Codable
                                                            • +
                                                            • Error
                                                            • +
                                                            • Data
                                                            • +
                                                            • unowned
                                                            • +
                                                            • Response
                                                            • +
                                                            • super
                                                            • +
                                                            • Array
                                                            • +
                                                            • inout
                                                            • +
                                                            • func
                                                            • +
                                                            • Int64
                                                            • +
                                                            • didSet
                                                            • +
                                                            • fallthrough
                                                            • +
                                                            • OptionSet
                                                            • +
                                                            diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 2d3d9cff6e..3897f396d2 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -29,3 +29,178 @@ sidebar_label: swift5 |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| |library|Library template (sub-template) to use|
                                                            **urlsession**
                                                            [DEFAULT] HTTP client: URLSession
                                                            **alamofire**
                                                            HTTP client: Alamofire
                                                            |urlsession| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | + + +## LANGUAGE PRIMITIVES + +
                                                            • Character
                                                            • +
                                                            • Data
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • URL
                                                            • +
                                                            • Date
                                                            • +
                                                            • Float
                                                            • +
                                                            • AnyObject
                                                            • +
                                                            • Decimal
                                                            • +
                                                            • Int64
                                                            • +
                                                            • Bool
                                                            • +
                                                            • Int32
                                                            • +
                                                            • Void
                                                            • +
                                                            • UUID
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • struct
                                                            • +
                                                            • #elseif
                                                            • +
                                                            • #file
                                                            • +
                                                            • #imageLiteral
                                                            • +
                                                            • prefix
                                                            • +
                                                            • convenience
                                                            • +
                                                            • none
                                                            • +
                                                            • String
                                                            • +
                                                            • Int16
                                                            • +
                                                            • required
                                                            • +
                                                            • nil
                                                            • +
                                                            • CountableRange
                                                            • +
                                                            • Float32
                                                            • +
                                                            • Bool
                                                            • +
                                                            • else
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • mutating
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • init
                                                            • +
                                                            • in
                                                            • +
                                                            • var
                                                            • +
                                                            • is
                                                            • +
                                                            • optional
                                                            • +
                                                            • infix
                                                            • +
                                                            • FUNCTION
                                                            • +
                                                            • enum
                                                            • +
                                                            • Float
                                                            • +
                                                            • as
                                                            • +
                                                            • Decodable
                                                            • +
                                                            • left
                                                            • +
                                                            • extension
                                                            • +
                                                            • internal
                                                            • +
                                                            • Set
                                                            • +
                                                            • lazy
                                                            • +
                                                            • guard
                                                            • +
                                                            • associatedtype
                                                            • +
                                                            • #available
                                                            • +
                                                            • Self
                                                            • +
                                                            • nonmutating
                                                            • +
                                                            • URL
                                                            • +
                                                            • weak
                                                            • +
                                                            • #function
                                                            • +
                                                            • default
                                                            • +
                                                            • Int32
                                                            • +
                                                            • get
                                                            • +
                                                            • where
                                                            • +
                                                            • typealias
                                                            • +
                                                            • override
                                                            • +
                                                            • Protocol
                                                            • +
                                                            • FILE
                                                            • +
                                                            • _
                                                            • +
                                                            • #selector
                                                            • +
                                                            • set
                                                            • +
                                                            • break
                                                            • +
                                                            • willSet
                                                            • +
                                                            • right
                                                            • +
                                                            • Int8
                                                            • +
                                                            • ErrorResponse
                                                            • +
                                                            • Type
                                                            • +
                                                            • AnyObject
                                                            • +
                                                            • Float64
                                                            • +
                                                            • deinit
                                                            • +
                                                            • throw
                                                            • +
                                                            • self
                                                            • +
                                                            • UInt
                                                            • +
                                                            • UInt32
                                                            • +
                                                            • open
                                                            • +
                                                            • return
                                                            • +
                                                            • #if
                                                            • +
                                                            • #column
                                                            • +
                                                            • COLUMN
                                                            • +
                                                            • #line
                                                            • +
                                                            • #endif
                                                            • +
                                                            • do
                                                            • +
                                                            • while
                                                            • +
                                                            • dynamicType
                                                            • +
                                                            • operator
                                                            • +
                                                            • precedence
                                                            • +
                                                            • StaticString
                                                            • +
                                                            • protocol
                                                            • +
                                                            • CountableClosedRange
                                                            • +
                                                            • continue
                                                            • +
                                                            • dynamic
                                                            • +
                                                            • associativity
                                                            • +
                                                            • Void
                                                            • +
                                                            • Unicode
                                                            • +
                                                            • static
                                                            • +
                                                            • #colorLiteral
                                                            • +
                                                            • subscript
                                                            • +
                                                            • indirect
                                                            • +
                                                            • Optional
                                                            • +
                                                            • Character
                                                            • +
                                                            • throws
                                                            • +
                                                            • Range
                                                            • +
                                                            • Double
                                                            • +
                                                            • fileprivate
                                                            • +
                                                            • true
                                                            • +
                                                            • final
                                                            • +
                                                            • try
                                                            • +
                                                            • Class
                                                            • +
                                                            • UInt16
                                                            • +
                                                            • rethrows
                                                            • +
                                                            • Float80
                                                            • +
                                                            • Encodable
                                                            • +
                                                            • #else
                                                            • +
                                                            • Dictionary
                                                            • +
                                                            • private
                                                            • +
                                                            • defer
                                                            • +
                                                            • import
                                                            • +
                                                            • ClosedRange
                                                            • +
                                                            • #fileLiteral
                                                            • +
                                                            • for
                                                            • +
                                                            • Any
                                                            • +
                                                            • Int
                                                            • +
                                                            • UInt8
                                                            • +
                                                            • switch
                                                            • +
                                                            • public
                                                            • +
                                                            • repeat
                                                            • +
                                                            • LINE
                                                            • +
                                                            • #sourceLocation
                                                            • +
                                                            • postfix
                                                            • +
                                                            • UInt64
                                                            • +
                                                            • class
                                                            • +
                                                            • false
                                                            • +
                                                            • Codable
                                                            • +
                                                            • Error
                                                            • +
                                                            • Data
                                                            • +
                                                            • unowned
                                                            • +
                                                            • Response
                                                            • +
                                                            • super
                                                            • +
                                                            • Array
                                                            • +
                                                            • inout
                                                            • +
                                                            • func
                                                            • +
                                                            • Int64
                                                            • +
                                                            • didSet
                                                            • +
                                                            • fallthrough
                                                            • +
                                                            • OptionSet
                                                            • +
                                                            diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 11711420ff..30cebe68a2 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -28,3 +28,110 @@ sidebar_label: typescript-angular |modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| |fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase| |stringEnums|Generate string enums instead of objects for enum values.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                                            • Blob
                                                            • +
                                                            • string
                                                            • +
                                                            • Error
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • any
                                                            • +
                                                            • Date
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • number
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • Map
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • synchronized
                                                            • +
                                                            • debugger
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • varLocalPath
                                                            • +
                                                            • headerParams
                                                            • +
                                                            • queryParameters
                                                            • +
                                                            • protected
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • function
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • export
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • in
                                                            • +
                                                            • formParams
                                                            • +
                                                            • byte
                                                            • +
                                                            • double
                                                            • +
                                                            • var
                                                            • +
                                                            • useFormData
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • enum
                                                            • +
                                                            • varLocalDeferred
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • const
                                                            • +
                                                            • import
                                                            • +
                                                            • for
                                                            • +
                                                            • interface
                                                            • +
                                                            • delete
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • yield
                                                            • +
                                                            • await
                                                            • +
                                                            • class
                                                            • +
                                                            • typeof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • requestOptions
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • boolean
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index 5fd86f3d8e..e4789789c0 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -12,3 +12,109 @@ sidebar_label: typescript-angularjs |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |supportsES6|Generate code that conforms to ES6.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                                            • string
                                                            • +
                                                            • Error
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • any
                                                            • +
                                                            • Date
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • number
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • Map
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • synchronized
                                                            • +
                                                            • debugger
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • varLocalPath
                                                            • +
                                                            • headerParams
                                                            • +
                                                            • queryParameters
                                                            • +
                                                            • protected
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • function
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • export
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • in
                                                            • +
                                                            • formParams
                                                            • +
                                                            • byte
                                                            • +
                                                            • double
                                                            • +
                                                            • var
                                                            • +
                                                            • useFormData
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • enum
                                                            • +
                                                            • varLocalDeferred
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • const
                                                            • +
                                                            • import
                                                            • +
                                                            • for
                                                            • +
                                                            • interface
                                                            • +
                                                            • delete
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • yield
                                                            • +
                                                            • await
                                                            • +
                                                            • class
                                                            • +
                                                            • typeof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • requestOptions
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • boolean
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index fe5f6d13c9..630149f0ec 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -15,3 +15,109 @@ sidebar_label: typescript-aurelia |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| |snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                                            • string
                                                            • +
                                                            • Error
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • any
                                                            • +
                                                            • Date
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • number
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • Map
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • synchronized
                                                            • +
                                                            • debugger
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • varLocalPath
                                                            • +
                                                            • headerParams
                                                            • +
                                                            • queryParameters
                                                            • +
                                                            • protected
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • function
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • export
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • in
                                                            • +
                                                            • formParams
                                                            • +
                                                            • byte
                                                            • +
                                                            • double
                                                            • +
                                                            • var
                                                            • +
                                                            • useFormData
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • enum
                                                            • +
                                                            • varLocalDeferred
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • const
                                                            • +
                                                            • import
                                                            • +
                                                            • for
                                                            • +
                                                            • interface
                                                            • +
                                                            • delete
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • yield
                                                            • +
                                                            • await
                                                            • +
                                                            • class
                                                            • +
                                                            • typeof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • requestOptions
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • boolean
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 9b03c130ac..2ce7e5c197 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -19,3 +19,109 @@ sidebar_label: typescript-axios |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes| |false| |withoutPrefixEnums|Don't prefix enum names with class names| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                                            • string
                                                            • +
                                                            • Error
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • any
                                                            • +
                                                            • Date
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • number
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • Map
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • synchronized
                                                            • +
                                                            • debugger
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • varLocalPath
                                                            • +
                                                            • headerParams
                                                            • +
                                                            • queryParameters
                                                            • +
                                                            • protected
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • function
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • export
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • in
                                                            • +
                                                            • formParams
                                                            • +
                                                            • byte
                                                            • +
                                                            • double
                                                            • +
                                                            • var
                                                            • +
                                                            • useFormData
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • enum
                                                            • +
                                                            • varLocalDeferred
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • const
                                                            • +
                                                            • import
                                                            • +
                                                            • for
                                                            • +
                                                            • interface
                                                            • +
                                                            • delete
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • yield
                                                            • +
                                                            • await
                                                            • +
                                                            • class
                                                            • +
                                                            • typeof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • requestOptions
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • boolean
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index d603f8de2d..c46d4226c9 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -20,3 +20,134 @@ sidebar_label: typescript-fetch |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true| |prefixParameterInterfaces|Setting this property to true will generate parameter interface declarations prefixed with API class name to avoid name conflicts.| |false| |typescriptThreePlus|Setting this property to true will generate TypeScript 3.6+ compatible code.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                                            • string
                                                            • +
                                                            • Error
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • any
                                                            • +
                                                            • Date
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • number
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • Map
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • ModelPropertyNaming
                                                            • +
                                                            • synchronized
                                                            • +
                                                            • HTTPHeaders
                                                            • +
                                                            • Configuration
                                                            • +
                                                            • debugger
                                                            • +
                                                            • COLLECTION_FORMATS
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • BaseAPI
                                                            • +
                                                            • ApiResponse
                                                            • +
                                                            • varLocalPath
                                                            • +
                                                            • headerParams
                                                            • +
                                                            • queryParameters
                                                            • +
                                                            • protected
                                                            • +
                                                            • HTTPMethod
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • function
                                                            • +
                                                            • ResponseContext
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • RequestContext
                                                            • +
                                                            • export
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • in
                                                            • +
                                                            • formParams
                                                            • +
                                                            • byte
                                                            • +
                                                            • double
                                                            • +
                                                            • var
                                                            • +
                                                            • ResponseTransformer
                                                            • +
                                                            • useFormData
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • Middleware
                                                            • +
                                                            • enum
                                                            • +
                                                            • varLocalDeferred
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • BlobApiResponse
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • const
                                                            • +
                                                            • import
                                                            • +
                                                            • configuration
                                                            • +
                                                            • BASE_PATH
                                                            • +
                                                            • for
                                                            • +
                                                            • JSONApiResponse
                                                            • +
                                                            • interface
                                                            • +
                                                            • ConfigurationParameters
                                                            • +
                                                            • delete
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • TextApiResponse
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • yield
                                                            • +
                                                            • await
                                                            • +
                                                            • RequestOpts
                                                            • +
                                                            • class
                                                            • +
                                                            • FetchAPI
                                                            • +
                                                            • typeof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • requestOptions
                                                            • +
                                                            • RequiredError
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • FetchParams
                                                            • +
                                                            • boolean
                                                            • +
                                                            • HTTPBody
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • exists
                                                            • +
                                                            • HTTPQuery
                                                            • +
                                                            • return
                                                            • +
                                                            • VoidApiResponse
                                                            • +
                                                            diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 3acc05d8b7..6df5d833cc 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -20,3 +20,111 @@ sidebar_label: typescript-inversify |usePromise|Setting this property to use promise instead of observable inside every service.| |false| |useRxJS6|Setting this property to use rxjs 6 instead of rxjs 5.| |false| |taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                                            • Blob
                                                            • +
                                                            • string
                                                            • +
                                                            • Error
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • any
                                                            • +
                                                            • Date
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • number
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • Map
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • synchronized
                                                            • +
                                                            • debugger
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • varLocalPath
                                                            • +
                                                            • headerParams
                                                            • +
                                                            • queryParameters
                                                            • +
                                                            • protected
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • function
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • export
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • in
                                                            • +
                                                            • formParams
                                                            • +
                                                            • byte
                                                            • +
                                                            • double
                                                            • +
                                                            • var
                                                            • +
                                                            • useFormData
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • enum
                                                            • +
                                                            • varLocalDeferred
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • const
                                                            • +
                                                            • import
                                                            • +
                                                            • for
                                                            • +
                                                            • interface
                                                            • +
                                                            • delete
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • yield
                                                            • +
                                                            • await
                                                            • +
                                                            • class
                                                            • +
                                                            • map
                                                            • +
                                                            • typeof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • requestOptions
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • boolean
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index da4df1c90a..e0d11461d1 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -17,3 +17,109 @@ sidebar_label: typescript-jquery |snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| |jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                                            • string
                                                            • +
                                                            • Error
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • any
                                                            • +
                                                            • Date
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • number
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • Map
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • synchronized
                                                            • +
                                                            • debugger
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • varLocalPath
                                                            • +
                                                            • headerParams
                                                            • +
                                                            • queryParameters
                                                            • +
                                                            • protected
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • function
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • export
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • in
                                                            • +
                                                            • formParams
                                                            • +
                                                            • byte
                                                            • +
                                                            • double
                                                            • +
                                                            • var
                                                            • +
                                                            • useFormData
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • enum
                                                            • +
                                                            • varLocalDeferred
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • const
                                                            • +
                                                            • import
                                                            • +
                                                            • for
                                                            • +
                                                            • interface
                                                            • +
                                                            • delete
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • yield
                                                            • +
                                                            • await
                                                            • +
                                                            • class
                                                            • +
                                                            • typeof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • requestOptions
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • boolean
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index aea7c2a40c..4d9e1d36e2 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -16,3 +16,113 @@ sidebar_label: typescript-node |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| |snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                                            • Buffer
                                                            • +
                                                            • string
                                                            • +
                                                            • Error
                                                            • +
                                                            • String
                                                            • +
                                                            • RequestDetailedFile
                                                            • +
                                                            • Double
                                                            • +
                                                            • any
                                                            • +
                                                            • Date
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • number
                                                            • +
                                                            • boolean
                                                            • +
                                                            • ReadStream
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • RequestFile
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • Map
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • synchronized
                                                            • +
                                                            • debugger
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • varLocalPath
                                                            • +
                                                            • headerParams
                                                            • +
                                                            • queryParameters
                                                            • +
                                                            • protected
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • function
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • export
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • in
                                                            • +
                                                            • formParams
                                                            • +
                                                            • byte
                                                            • +
                                                            • double
                                                            • +
                                                            • var
                                                            • +
                                                            • useFormData
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • enum
                                                            • +
                                                            • varLocalDeferred
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • const
                                                            • +
                                                            • import
                                                            • +
                                                            • for
                                                            • +
                                                            • interface
                                                            • +
                                                            • delete
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • yield
                                                            • +
                                                            • await
                                                            • +
                                                            • class
                                                            • +
                                                            • typeof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • requestOptions
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • boolean
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • return
                                                            • +
                                                            diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index 1f4c0850ba..89b061d760 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -18,3 +18,132 @@ sidebar_label: typescript-redux-query |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                                            • string
                                                            • +
                                                            • Error
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • any
                                                            • +
                                                            • Date
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • number
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • Map
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • ModelPropertyNaming
                                                            • +
                                                            • synchronized
                                                            • +
                                                            • HTTPHeaders
                                                            • +
                                                            • Configuration
                                                            • +
                                                            • debugger
                                                            • +
                                                            • COLLECTION_FORMATS
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • BaseAPI
                                                            • +
                                                            • ApiResponse
                                                            • +
                                                            • varLocalPath
                                                            • +
                                                            • headerParams
                                                            • +
                                                            • queryParameters
                                                            • +
                                                            • protected
                                                            • +
                                                            • HTTPMethod
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • function
                                                            • +
                                                            • ResponseContext
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • RequestContext
                                                            • +
                                                            • export
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • in
                                                            • +
                                                            • formParams
                                                            • +
                                                            • byte
                                                            • +
                                                            • double
                                                            • +
                                                            • var
                                                            • +
                                                            • ResponseTransformer
                                                            • +
                                                            • useFormData
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • Middleware
                                                            • +
                                                            • enum
                                                            • +
                                                            • varLocalDeferred
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • BlobApiResponse
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • const
                                                            • +
                                                            • import
                                                            • +
                                                            • configuration
                                                            • +
                                                            • BASE_PATH
                                                            • +
                                                            • for
                                                            • +
                                                            • JSONApiResponse
                                                            • +
                                                            • interface
                                                            • +
                                                            • ConfigurationParameters
                                                            • +
                                                            • delete
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • TextApiResponse
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • yield
                                                            • +
                                                            • await
                                                            • +
                                                            • RequestOpts
                                                            • +
                                                            • class
                                                            • +
                                                            • typeof
                                                            • +
                                                            • break
                                                            • +
                                                            • false
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • requestOptions
                                                            • +
                                                            • RequiredError
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • boolean
                                                            • +
                                                            • HTTPBody
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • exists
                                                            • +
                                                            • HTTPQuery
                                                            • +
                                                            • return
                                                            • +
                                                            • VoidApiResponse
                                                            • +
                                                            diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index a2473ca26f..d5d43d6208 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -17,3 +17,128 @@ sidebar_label: typescript-rxjs |snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| + +## IMPORT MAPPING + +| Type/Alias | Imports | +| ---------- | ------- | + + +## INSTANTIATION TYPES + +| Type/Alias | Instantiated By | +| ---------- | --------------- | +|array|Array| + + +## LANGUAGE PRIMITIVES + +
                                                            • Blob
                                                            • +
                                                            • string
                                                            • +
                                                            • Error
                                                            • +
                                                            • String
                                                            • +
                                                            • Double
                                                            • +
                                                            • any
                                                            • +
                                                            • Date
                                                            • +
                                                            • Integer
                                                            • +
                                                            • Array
                                                            • +
                                                            • Float
                                                            • +
                                                            • number
                                                            • +
                                                            • boolean
                                                            • +
                                                            • Long
                                                            • +
                                                            • Object
                                                            • +
                                                            • Boolean
                                                            • +
                                                            • File
                                                            • +
                                                            • Map
                                                            • +
                                                            • object
                                                            • +
                                                            + +## RESERVED WORDS + +
                                                            • ModelPropertyNaming
                                                            • +
                                                            • synchronized
                                                            • +
                                                            • HttpHeaders
                                                            • +
                                                            • RequestArgs
                                                            • +
                                                            • Configuration
                                                            • +
                                                            • debugger
                                                            • +
                                                            • COLLECTION_FORMATS
                                                            • +
                                                            • HttpBody
                                                            • +
                                                            • do
                                                            • +
                                                            • float
                                                            • +
                                                            • while
                                                            • +
                                                            • BaseAPI
                                                            • +
                                                            • varLocalPath
                                                            • +
                                                            • headerParams
                                                            • +
                                                            • queryParameters
                                                            • +
                                                            • protected
                                                            • +
                                                            • continue
                                                            • +
                                                            • else
                                                            • +
                                                            • function
                                                            • +
                                                            • let
                                                            • +
                                                            • catch
                                                            • +
                                                            • export
                                                            • +
                                                            • if
                                                            • +
                                                            • case
                                                            • +
                                                            • new
                                                            • +
                                                            • package
                                                            • +
                                                            • static
                                                            • +
                                                            • void
                                                            • +
                                                            • in
                                                            • +
                                                            • formParams
                                                            • +
                                                            • byte
                                                            • +
                                                            • double
                                                            • +
                                                            • var
                                                            • +
                                                            • useFormData
                                                            • +
                                                            • finally
                                                            • +
                                                            • this
                                                            • +
                                                            • Middleware
                                                            • +
                                                            • enum
                                                            • +
                                                            • varLocalDeferred
                                                            • +
                                                            • extends
                                                            • +
                                                            • null
                                                            • +
                                                            • transient
                                                            • +
                                                            • final
                                                            • +
                                                            • true
                                                            • +
                                                            • try
                                                            • +
                                                            • HttpMethod
                                                            • +
                                                            • implements
                                                            • +
                                                            • private
                                                            • +
                                                            • const
                                                            • +
                                                            • import
                                                            • +
                                                            • BASE_PATH
                                                            • +
                                                            • for
                                                            • +
                                                            • interface
                                                            • +
                                                            • ConfigurationParameters
                                                            • +
                                                            • delete
                                                            • +
                                                            • long
                                                            • +
                                                            • switch
                                                            • +
                                                            • default
                                                            • +
                                                            • goto
                                                            • +
                                                            • AjaxRequest
                                                            • +
                                                            • public
                                                            • +
                                                            • native
                                                            • +
                                                            • ResponseArgs
                                                            • +
                                                            • yield
                                                            • +
                                                            • await
                                                            • +
                                                            • RequestOpts
                                                            • +
                                                            • class
                                                            • +
                                                            • typeof
                                                            • +
                                                            • break
                                                            • +
                                                            • HttpQuery
                                                            • +
                                                            • AjaxResponse
                                                            • +
                                                            • false
                                                            • +
                                                            • volatile
                                                            • +
                                                            • abstract
                                                            • +
                                                            • requestOptions
                                                            • +
                                                            • RequiredError
                                                            • +
                                                            • int
                                                            • +
                                                            • instanceof
                                                            • +
                                                            • super
                                                            • +
                                                            • with
                                                            • +
                                                            • boolean
                                                            • +
                                                            • throw
                                                            • +
                                                            • char
                                                            • +
                                                            • short
                                                            • +
                                                            • exists
                                                            • +
                                                            • return
                                                            • +
                                                            From 2d24d42e652e1abeb979a89d50235c383c12bf44 Mon Sep 17 00:00:00 2001 From: Artem Shubovych Date: Thu, 9 Jan 2020 15:55:32 +1100 Subject: [PATCH 35/82] Fix auto-labeler for jax-rs (#4943) --- .github/auto-labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/auto-labeler.yml b/.github/auto-labeler.yml index f623319907..5bff51d5ce 100644 --- a/.github/auto-labeler.yml +++ b/.github/auto-labeler.yml @@ -247,7 +247,7 @@ labels: 'Server: Java': - '\s*?\[java-.*?\]\s*?' - '\s*?-[gl] java-.*?\s*?' - - '\s*?-[gl] jaxrx-.*?\s*?' + - '\s*?-[gl] jaxrs-.*?\s*?' 'Server: Kotlin': - '\s*?\[ktor]\s*?' - '\s*?\[kotlin-spring]\s*?' From 6dcdf5c31135cb1dde769accfc55944de4084c0d Mon Sep 17 00:00:00 2001 From: Yuriy Belenko Date: Fri, 10 Jan 2020 11:27:44 +0300 Subject: [PATCH 36/82] [Slim4] Add ref support to Data Mocker (#4932) * [Slim4] Add new method to Mocker interface * [Slim4] Add implementation and tests for new method * [Slim4] Add test fixture to encrease code coverage * [Slim4] Add ref support to mockArray method * [Slim4] Add mockFromRef method * [Slim4] Add ref support to mockObject method * [Slim4] Add ModelInterface * [Slim4] Refresh samples * [Slim4] Add ref support to mockFromSchema method * [Slim4] Run all test suites by default test command As it turnes out to generate coverage report for a whole project I need to run all test suites at once. * [Slim4] Fix enum option of string mocking --- .../languages/PhpSlim4ServerCodegen.java | 12 + .../php-slim4-server/composer.mustache | 5 +- .../resources/php-slim4-server/model.mustache | 21 +- .../php-slim4-server/model_interface.mustache | 54 +++ .../php-slim4-server/model_test.mustache | 12 + .../openapi_data_mocker.mustache | 65 +++- .../openapi_data_mocker_interface.mustache | 23 ++ .../openapi_data_mocker_test.mustache | 272 ++++++++++++++- .../server/petstore/php-slim4/composer.json | 5 +- .../lib/Interfaces/ModelInterface.php | 45 +++ .../php-slim4/lib/Mock/OpenApiDataMocker.php | 65 +++- .../lib/Mock/OpenApiDataMockerInterface.php | 23 ++ .../lib/Model/AdditionalPropertiesAnyType.php | 32 +- .../lib/Model/AdditionalPropertiesArray.php | 35 +- .../lib/Model/AdditionalPropertiesBoolean.php | 31 +- .../lib/Model/AdditionalPropertiesClass.php | 118 ++++++- .../lib/Model/AdditionalPropertiesInteger.php | 31 +- .../lib/Model/AdditionalPropertiesNumber.php | 31 +- .../lib/Model/AdditionalPropertiesObject.php | 35 +- .../lib/Model/AdditionalPropertiesString.php | 31 +- .../petstore/php-slim4/lib/Model/Animal.php | 38 +- .../php-slim4/lib/Model/ApiResponse.php | 39 ++- .../lib/Model/ArrayOfArrayOfNumberOnly.php | 34 +- .../php-slim4/lib/Model/ArrayOfNumberOnly.php | 31 +- .../php-slim4/lib/Model/ArrayTest.php | 54 ++- .../petstore/php-slim4/lib/Model/BigCat.php | 33 +- .../php-slim4/lib/Model/BigCatAllOf.php | 28 +- .../php-slim4/lib/Model/Capitalization.php | 54 ++- .../petstore/php-slim4/lib/Model/Cat.php | 31 +- .../petstore/php-slim4/lib/Model/CatAllOf.php | 27 +- .../petstore/php-slim4/lib/Model/Category.php | 39 ++- .../php-slim4/lib/Model/ClassModel.php | 29 +- .../petstore/php-slim4/lib/Model/Client.php | 28 +- .../petstore/php-slim4/lib/Model/Dog.php | 31 +- .../petstore/php-slim4/lib/Model/DogAllOf.php | 27 +- .../php-slim4/lib/Model/EnumArrays.php | 38 +- .../php-slim4/lib/Model/EnumClass.php | 23 +- .../petstore/php-slim4/lib/Model/EnumTest.php | 55 ++- .../petstore/php-slim4/lib/Model/File.php | 30 +- .../lib/Model/FileSchemaTestClass.php | 36 +- .../php-slim4/lib/Model/FormatTest.php | 120 ++++++- .../php-slim4/lib/Model/HasOnlyReadOnly.php | 35 +- .../petstore/php-slim4/lib/Model/MapTest.php | 56 ++- ...PropertiesAndAdditionalPropertiesClass.php | 43 ++- .../php-slim4/lib/Model/Model200Response.php | 38 +- .../php-slim4/lib/Model/ModelList.php | 28 +- .../php-slim4/lib/Model/ModelReturn.php | 33 +- .../petstore/php-slim4/lib/Model/Name.php | 52 ++- .../php-slim4/lib/Model/NumberOnly.php | 28 +- .../petstore/php-slim4/lib/Model/Order.php | 63 +++- .../php-slim4/lib/Model/OuterComposite.php | 38 +- .../php-slim4/lib/Model/OuterEnum.php | 22 +- .../petstore/php-slim4/lib/Model/Pet.php | 76 +++- .../php-slim4/lib/Model/ReadOnlyFirst.php | 34 +- .../php-slim4/lib/Model/SpecialModelName.php | 32 +- .../petstore/php-slim4/lib/Model/Tag.php | 37 +- .../php-slim4/lib/Model/TypeHolderDefault.php | 54 ++- .../php-slim4/lib/Model/TypeHolderExample.php | 64 +++- .../petstore/php-slim4/lib/Model/User.php | 70 +++- .../petstore/php-slim4/lib/Model/XmlItem.php | 329 ++++++++++++++++-- .../test/Mock/OpenApiDataMockerTest.php | 272 ++++++++++++++- 61 files changed, 2946 insertions(+), 229 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/php-slim4-server/model_interface.mustache create mode 100644 samples/server/petstore/php-slim4/lib/Interfaces/ModelInterface.php diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java index 4ec5c1f116..43efb15906 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java @@ -44,6 +44,8 @@ public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { protected String mockPackage = ""; protected String utilsDirName = "Utils"; protected String utilsPackage = ""; + protected String interfacesDirName = "Interfaces"; + protected String interfacesPackage = ""; public PhpSlim4ServerCodegen() { super(); @@ -54,6 +56,7 @@ public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { mockPackage = invokerPackage + "\\" + mockDirName; utilsPackage = invokerPackage + "\\" + utilsDirName; + interfacesPackage = invokerPackage + "\\" + interfacesDirName; outputFolder = "generated-code" + File.separator + "slim4"; embeddedTemplateDir = templateDir = "php-slim4-server"; @@ -92,6 +95,7 @@ public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { // Update mockPackage and utilsPackage mockPackage = invokerPackage + "\\" + mockDirName; utilsPackage = invokerPackage + "\\" + utilsDirName; + interfacesPackage = invokerPackage + "\\" + interfacesDirName; } // make mock src path available in mustache template @@ -104,6 +108,11 @@ public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { additionalProperties.put("utilsSrcPath", "./" + toSrcPath(utilsPackage, srcBasePath)); additionalProperties.put("utilsTestPath", "./" + toSrcPath(utilsPackage, testBasePath)); + // same for interfaces package + additionalProperties.put("interfacesPackage", interfacesPackage); + additionalProperties.put("interfacesSrcPath", "./" + toSrcPath(interfacesPackage, srcBasePath)); + additionalProperties.put("interfacesTestPath", "./" + toSrcPath(interfacesPackage, testBasePath)); + if (additionalProperties.containsKey(PSR7_IMPLEMENTATION)) { this.setPsr7Implementation((String) additionalProperties.get(PSR7_IMPLEMENTATION)); } @@ -147,6 +156,9 @@ public class PhpSlim4ServerCodegen extends PhpSlimServerCodegen { supportingFiles.add(new SupportingFile("string_utils_trait_test.mustache", toSrcPath(utilsPackage, testBasePath), toTraitName("StringUtils") + "Test.php")); supportingFiles.add(new SupportingFile("model_utils_trait.mustache", toSrcPath(utilsPackage, srcBasePath), toTraitName("ModelUtils") + ".php")); supportingFiles.add(new SupportingFile("model_utils_trait_test.mustache", toSrcPath(utilsPackage, testBasePath), toTraitName("ModelUtils") + "Test.php")); + + // model interface + supportingFiles.add(new SupportingFile("model_interface.mustache", toSrcPath(interfacesPackage, srcBasePath), toInterfaceName("Model") + ".php")); } /** diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache index 68b2c89e92..2c399a84d7 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache @@ -41,10 +41,7 @@ }, "scripts": { "test": [ - "@test-apis", - "@test-models", - "@test-mock", - "@test-utils" + "phpunit" ], "test-apis": "phpunit --testsuite Apis", "test-models": "phpunit --testsuite Models", diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache index 6ed9dea54c..67112c8522 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/model.mustache @@ -16,6 +16,8 @@ */ namespace {{modelPackage}}; +use {{interfacesPackage}}\{{interfaceNamePrefix}}Model{{interfaceNameSuffix}}; + /** * {{classname}} * @@ -23,12 +25,27 @@ namespace {{modelPackage}}; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class {{classname}} +class {{classname}} implements {{interfaceNamePrefix}}Model{{interfaceNameSuffix}} { + private const MODEL_SCHEMA = <<<'SCHEMA' +{{{modelJson}}} +SCHEMA; {{#vars}} - + /** @var {{dataType}} ${{name}} {{#description}}{{description}}{{/description}}*/ private ${{name}}; {{/vars}} + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } {{/model}}{{/models}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/model_interface.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/model_interface.mustache new file mode 100644 index 0000000000..eb440ee559 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/model_interface.mustache @@ -0,0 +1,54 @@ +assertIsObject($schemaObject); + $this->assertIsArray($schemaArr); + } } {{/model}}{{/models}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache index 4a335b5c31..b18c8f8903 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache @@ -34,6 +34,7 @@ namespace {{mockPackage}}; use {{mockPackage}}\{{interfaceNamePrefix}}OpenApiDataMocker{{interfaceNameSuffix}} as IMocker; +use {{utilsPackage}}\{{traitNamePrefix}}ModelUtils{{traitNameSuffix}}; use StdClass; use InvalidArgumentException; @@ -46,6 +47,8 @@ use InvalidArgumentException; */ final class OpenApiDataMocker implements IMocker { + use {{traitNamePrefix}}ModelUtils{{traitNameSuffix}}; + /** * Mocks OpenApi Data. * @see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#data-types @@ -74,7 +77,8 @@ final class OpenApiDataMocker implements IMocker case IMocker::DATA_TYPE_STRING: $minLength = $options['minLength'] ?? 0; $maxLength = $options['maxLength'] ?? null; - return $this->mockString($dataFormat, $minLength, $maxLength); + $enum = $options['enum'] ?? null; + return $this->mockString($dataFormat, $minLength, $maxLength, $enum); case IMocker::DATA_TYPE_BOOLEAN: return $this->mockBoolean(); case IMocker::DATA_TYPE_ARRAY: @@ -276,11 +280,13 @@ final class OpenApiDataMocker implements IMocker $options = $this->extractSchemaProperties($items); $dataType = $options['type']; $dataFormat = $options['format'] ?? null; + $ref = $options['$ref'] ?? null; - // always genarate smallest possible array to avoid huge JSON responses + // always generate smallest possible array to avoid huge JSON responses $arrSize = ($maxSize < 1) ? $maxSize : max($minSize, 1); while (count($arr) < $arrSize) { - $arr[] = $this->mock($dataType, $dataFormat, $options); + $data = $this->mockFromRef($ref); + $arr[] = ($data) ? $data : $this->mock($dataType, $dataFormat, $options); } return $arr; } @@ -360,12 +366,62 @@ final class OpenApiDataMocker implements IMocker $options = $this->extractSchemaProperties($propValue); $dataType = $options['type']; $dataFormat = $options['dataFormat'] ?? null; - $obj->$propName = $this->mock($dataType, $dataFormat, $options); + $ref = $options['$ref'] ?? null; + $data = $this->mockFromRef($ref); + $obj->$propName = ($data) ? $data : $this->mock($dataType, $dataFormat, $options); } return $obj; } + /** + * Mocks OpenApi Data from schema. + * + * @param array|object $schema OpenAPI schema + * + * @throws \InvalidArgumentException when invalid arguments passed + * + * @return mixed + */ + public function mockFromSchema($schema) + { + $props = $this->extractSchemaProperties($schema); + if (array_key_exists('$ref', $props) && !empty($props['$ref'])) { + return $this->mockFromRef($props['$ref']); + } elseif ($props['type'] === null) { + throw new InvalidArgumentException('"schema" must be object or assoc array with "type" property'); + } + return $this->mock($props['type'], $props['format'], $props); + } + + /** + * Mock data by referenced schema. + * TODO: this method will return model instance, not an StdClass + * + * @param string|null $ref Ref to model, eg. #/components/schemas/User + * + * @return mixed + */ + public function mockFromRef($ref) + { + $data = null; + if (is_string($ref) && !empty($ref)) { + $refName = static::getSimpleRef($ref); + $modelName = static::toModelName($refName); + $modelClass = '{{modelPackage}}\\' . $modelName; + if (!class_exists($modelClass) || !method_exists($modelClass, 'getOpenApiSchema')) { + throw new InvalidArgumentException(sprintf( + 'Model %s not found or method %s doesn\'t exist', + $modelClass, + $modelClass . '::getOpenApiSchema' + )); + } + $data = $this->mockFromSchema($modelClass::getOpenApiSchema(true)); + } + + return $data; + } + /** * @internal Extract OAS properties from array or object. * @codeCoverageIgnore @@ -402,6 +458,7 @@ final class OpenApiDataMocker implements IMocker 'additionalProperties', 'required', 'example', + '$ref', ] as $propName ) { if (is_array($val) && array_key_exists($propName, $val)) { diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_interface.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_interface.mustache index cbed4323a2..eaa28ba2b4 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_interface.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_interface.mustache @@ -237,5 +237,28 @@ interface {{interfaceNamePrefix}}OpenApiDataMocker{{interfaceNameSuffix}} $additionalProperties = null, $required = null ); + + /** + * Mocks OpenApi Data from schema. + * + * @param array|object $schema OpenAPI schema + * + * @throws \InvalidArgumentException when invalid arguments passed + * + * @return mixed + */ + public function mockFromSchema($schema); + + /** + * Mock data by referenced schema. + * TODO: this method will return model instance, not an StdClass + * + * @param string|null $ref Ref to model, eg. #/components/schemas/User + * + * @throws \InvalidArgumentException when invalid arguments passed + * + * @return mixed + */ + public function mockFromRef($ref); } {{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache index 53a700bed7..94b80e9352 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache @@ -38,6 +38,7 @@ use {{mockPackage}}\{{interfaceNamePrefix}}OpenApiDataMocker{{interfaceNameSuffi use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Constraint\IsType; use StdClass; +use DateTime; /** * OpenApiDataMockerTest Class Doc Comment @@ -103,6 +104,18 @@ class OpenApiDataMockerTest extends TestCase ]; } + /** + * @covers ::mock + */ + public function testMockWithStringEnumOptions() + { + $mocker = new OpenApiDataMocker(); + $string = $mocker->mock(IMocker::DATA_TYPE_STRING, null, [ + 'enum' => ['foobar', 'foobaz', 'helloworld'], + ]); + $this->assertContains($string, ['foobar', 'foobaz', 'helloworld']); + } + /** * @dataProvider provideMockIntegerCorrectArguments * @covers ::mockInteger @@ -519,7 +532,7 @@ class OpenApiDataMockerTest extends TestCase $subMaxItems = $items->maxItems ?? null; $subUniqueItems = $items->uniqueItems ?? null; } - + foreach ($arr as $item) { switch ($dataType) { @@ -647,6 +660,45 @@ class OpenApiDataMockerTest extends TestCase 'maxItems less than minItems' => [ $intItems, 5, 2, false, ], + 'items with ref to unknown class' => [ + ['$ref' => '#/components/schemas/UnknownClass'], null, null, false, + ], + 'items with ref to class without getOpenApiSchema method' => [ + ['$ref' => '#/components/schemas/ClassWithoutGetSchemaMethod'], null, null, false, + ], + ]; + } + + /** + * @dataProvider provideMockArrayWithRefArguments + * @covers ::mockArray + */ + public function testMockArrayWithRef($items, $expectedStructure) + { + $mocker = new OpenApiDataMocker(); + $arr = $mocker->mockArray($items); + $this->assertIsArray($arr); + $this->assertCount(1, $arr); + foreach ($arr as $item) { + // TODO: replace with assertInstanceOf assertion + $this->assertInternalType(IsType::TYPE_OBJECT, $item); + foreach ($expectedStructure as $expectedProp => $expectedType) { + $this->assertInternalType($expectedType, $item->$expectedProp); + } + } + } + + public function provideMockArrayWithRefArguments() + { + return [ + 'items with ref to CatRefTestClass' => [ + ['$ref' => '#/components/schemas/CatRefTestClass'], + [ + 'className' => IsType::TYPE_STRING, + 'color' => IsType::TYPE_STRING, + 'declawed' => IsType::TYPE_BOOL, + ], + ], ]; } @@ -731,6 +783,9 @@ class OpenApiDataMockerTest extends TestCase 'properties cannot be a string' => [ 'foobar', 0, 10, false, null, ], + 'property value cannot be a string' => [ + ['username' => 'foobar'], 0, 10, false, null, + ], 'minProperties is not integer' => [ [], 3.12, null, false, null, ], @@ -769,5 +824,220 @@ class OpenApiDataMockerTest extends TestCase ], ]; } + + /** + * @covers ::mockObject + */ + public function testMockObjectWithReferencedProps() + { + $mocker = new OpenApiDataMocker(); + $obj = $mocker->mockObject( + (object) [ + 'cat' => [ + '$ref' => '#/components/schemas/CatRefTestClass', + ], + ] + ); + $this->assertInternalType(IsType::TYPE_OBJECT, $obj->cat); + $this->assertInternalType(IsType::TYPE_STRING, $obj->cat->className); + $this->assertInternalType(IsType::TYPE_STRING, $obj->cat->color); + $this->assertInternalType(IsType::TYPE_BOOL, $obj->cat->declawed); + } + + /** + * @dataProvider provideMockFromSchemaCorrectArguments + * @covers ::mockFromSchema + */ + public function testMockFromSchemaWithCorrectArguments($schema, $expectedType) + { + $mocker = new OpenApiDataMocker(); + $data = $mocker->mockFromSchema($schema); + $this->assertInternalType($expectedType, $data); + } + + public function provideMockFromSchemaCorrectArguments() + { + return [ + 'string from object' => [ + (object) ['type' => IMocker::DATA_TYPE_STRING], + IsType::TYPE_STRING, + ], + 'string from array' => [ + ['type' => IMocker::DATA_TYPE_STRING], + IsType::TYPE_STRING, + ], + 'integer from object' => [ + (object) ['type' => IMocker::DATA_TYPE_INTEGER], + IsType::TYPE_INT, + ], + 'integer from array' => [ + ['type' => IMocker::DATA_TYPE_INTEGER], + IsType::TYPE_INT, + ], + 'number from object' => [ + (object) ['type' => IMocker::DATA_TYPE_NUMBER], + IsType::TYPE_FLOAT, + ], + 'number from array' => [ + ['type' => IMocker::DATA_TYPE_NUMBER], + IsType::TYPE_FLOAT, + ], + 'string from object' => [ + (object) ['type' => IMocker::DATA_TYPE_STRING], + IsType::TYPE_STRING, + ], + 'string from array' => [ + ['type' => IMocker::DATA_TYPE_STRING], + IsType::TYPE_STRING, + ], + 'boolean from object' => [ + (object) ['type' => IMocker::DATA_TYPE_BOOLEAN], + IsType::TYPE_BOOL, + ], + 'boolean from array' => [ + ['type' => IMocker::DATA_TYPE_BOOLEAN], + IsType::TYPE_BOOL, + ], + 'array of strings from object' => [ + (object) [ + 'type' => IMocker::DATA_TYPE_ARRAY, + 'items' => ['type' => IMocker::DATA_TYPE_STRING], + ], + IsType::TYPE_ARRAY, + ], + 'array of strings from array' => [ + [ + 'type' => IMocker::DATA_TYPE_ARRAY, + 'items' => ['type' => IMocker::DATA_TYPE_STRING], + ], + IsType::TYPE_ARRAY, + ], + 'object with username prop from object' => [ + (object) [ + 'type' => IMocker::DATA_TYPE_OBJECT, + 'properties' => ['username' => ['type' => IMocker::DATA_TYPE_STRING]], + ], + IsType::TYPE_OBJECT, + ], + 'object with username prop from array' => [ + [ + 'type' => IMocker::DATA_TYPE_OBJECT, + 'properties' => ['username' => ['type' => IMocker::DATA_TYPE_STRING]], + ], + IsType::TYPE_OBJECT, + ], + 'referenced class' => [ + ['$ref' => '#/components/schemas/CatRefTestClass'], + IsType::TYPE_OBJECT, + ], + ]; + } + + /** + * @dataProvider provideMockFromSchemaInvalidArguments + * @expectedException \InvalidArgumentException + * @covers ::mockFromSchema + */ + public function testMockFromSchemaWithInvalidArguments($schema) + { + $mocker = new OpenApiDataMocker(); + $data = $mocker->mockFromSchema($schema); + } + + + public function provideMockFromSchemaInvalidArguments() + { + return [ + 'null' => [null], + 'numeric' => [3.14], + 'empty array' => [[]], + 'empty object' => [(object) []], + 'string' => ['foobar'], + 'DateTime object' => [new DateTime()], + ]; + } + + /** + * @dataProvider provideMockFromRefCorrectArguments + * @covers ::mockFromRef + */ + public function testMockFromRefWithCorrectArguments($ref, $expectedStructure) + { + $mocker = new OpenApiDataMocker(); + $data = $mocker->mockFromRef($ref); + foreach ($expectedStructure as $expectedProp => $expectedType) { + $this->assertInternalType($expectedType, $data->$expectedProp); + } + } + + public function provideMockFromRefCorrectArguments() + { + return [ + 'CatRefTestClass model' => [ + '#/components/schemas/CatRefTestClass', + [ + 'className' => IsType::TYPE_STRING, + 'color' => IsType::TYPE_STRING, + 'declawed' => IsType::TYPE_BOOL, + ] + ], + ]; + } + + /** + * @dataProvider provideMockFromRefInvalidArguments + * @expectedException \InvalidArgumentException + * @covers ::mockFromRef + */ + public function testMockFromRefWithInvalidArguments($ref) + { + $mocker = new OpenApiDataMocker(); + $data = $mocker->mockFromRef($ref); + } + + public function provideMockFromRefInvalidArguments() + { + return [ + 'ref to unknown class' => ['#/components/schemas/UnknownClass'], + 'ref to class without getOpenApiSchema method' => ['#/components/schemas/ClassWithoutGetSchemaMethod'], + ]; + } +} + +namespace {{modelPackage}}; + +// phpcs:disable PSR1.Classes.ClassDeclaration.MultipleClasses +final class CatRefTestClass +{ + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "required" : [ "className" ], + "type" : "object", + "properties" : { + "className" : { + "type" : "string" + }, + "color" : { + "type" : "string", + "default" : "red" + }, + "declawed" : { + "type" : "boolean" + } + }, + "discriminator" : { + "propertyName" : "className" + } +} +SCHEMA; + + public static function getOpenApiSchema() + { + return json_decode(static::MODEL_SCHEMA, true); + } +} + +final class ClassWithoutGetSchemaMethod +{ } {{/apiInfo}} diff --git a/samples/server/petstore/php-slim4/composer.json b/samples/server/petstore/php-slim4/composer.json index d7d8142f6d..eebb5f2440 100644 --- a/samples/server/petstore/php-slim4/composer.json +++ b/samples/server/petstore/php-slim4/composer.json @@ -28,10 +28,7 @@ }, "scripts": { "test": [ - "@test-apis", - "@test-models", - "@test-mock", - "@test-utils" + "phpunit" ], "test-apis": "phpunit --testsuite Apis", "test-models": "phpunit --testsuite Models", diff --git a/samples/server/petstore/php-slim4/lib/Interfaces/ModelInterface.php b/samples/server/petstore/php-slim4/lib/Interfaces/ModelInterface.php new file mode 100644 index 0000000000..480eae3d38 --- /dev/null +++ b/samples/server/petstore/php-slim4/lib/Interfaces/ModelInterface.php @@ -0,0 +1,45 @@ +mockString($dataFormat, $minLength, $maxLength); + $enum = $options['enum'] ?? null; + return $this->mockString($dataFormat, $minLength, $maxLength, $enum); case IMocker::DATA_TYPE_BOOLEAN: return $this->mockBoolean(); case IMocker::DATA_TYPE_ARRAY: @@ -268,11 +272,13 @@ final class OpenApiDataMocker implements IMocker $options = $this->extractSchemaProperties($items); $dataType = $options['type']; $dataFormat = $options['format'] ?? null; + $ref = $options['$ref'] ?? null; - // always genarate smallest possible array to avoid huge JSON responses + // always generate smallest possible array to avoid huge JSON responses $arrSize = ($maxSize < 1) ? $maxSize : max($minSize, 1); while (count($arr) < $arrSize) { - $arr[] = $this->mock($dataType, $dataFormat, $options); + $data = $this->mockFromRef($ref); + $arr[] = ($data) ? $data : $this->mock($dataType, $dataFormat, $options); } return $arr; } @@ -352,12 +358,62 @@ final class OpenApiDataMocker implements IMocker $options = $this->extractSchemaProperties($propValue); $dataType = $options['type']; $dataFormat = $options['dataFormat'] ?? null; - $obj->$propName = $this->mock($dataType, $dataFormat, $options); + $ref = $options['$ref'] ?? null; + $data = $this->mockFromRef($ref); + $obj->$propName = ($data) ? $data : $this->mock($dataType, $dataFormat, $options); } return $obj; } + /** + * Mocks OpenApi Data from schema. + * + * @param array|object $schema OpenAPI schema + * + * @throws \InvalidArgumentException when invalid arguments passed + * + * @return mixed + */ + public function mockFromSchema($schema) + { + $props = $this->extractSchemaProperties($schema); + if (array_key_exists('$ref', $props) && !empty($props['$ref'])) { + return $this->mockFromRef($props['$ref']); + } elseif ($props['type'] === null) { + throw new InvalidArgumentException('"schema" must be object or assoc array with "type" property'); + } + return $this->mock($props['type'], $props['format'], $props); + } + + /** + * Mock data by referenced schema. + * TODO: this method will return model instance, not an StdClass + * + * @param string|null $ref Ref to model, eg. #/components/schemas/User + * + * @return mixed + */ + public function mockFromRef($ref) + { + $data = null; + if (is_string($ref) && !empty($ref)) { + $refName = static::getSimpleRef($ref); + $modelName = static::toModelName($refName); + $modelClass = 'OpenAPIServer\Model\\' . $modelName; + if (!class_exists($modelClass) || !method_exists($modelClass, 'getOpenApiSchema')) { + throw new InvalidArgumentException(sprintf( + 'Model %s not found or method %s doesn\'t exist', + $modelClass, + $modelClass . '::getOpenApiSchema' + )); + } + $data = $this->mockFromSchema($modelClass::getOpenApiSchema(true)); + } + + return $data; + } + /** * @internal Extract OAS properties from array or object. * @codeCoverageIgnore @@ -394,6 +450,7 @@ final class OpenApiDataMocker implements IMocker 'additionalProperties', 'required', 'example', + '$ref', ] as $propName ) { if (is_array($val) && array_key_exists($propName, $val)) { diff --git a/samples/server/petstore/php-slim4/lib/Mock/OpenApiDataMockerInterface.php b/samples/server/petstore/php-slim4/lib/Mock/OpenApiDataMockerInterface.php index 78fd9a859a..0a2852aaaf 100644 --- a/samples/server/petstore/php-slim4/lib/Mock/OpenApiDataMockerInterface.php +++ b/samples/server/petstore/php-slim4/lib/Mock/OpenApiDataMockerInterface.php @@ -229,4 +229,27 @@ interface OpenApiDataMockerInterface $additionalProperties = null, $required = null ); + + /** + * Mocks OpenApi Data from schema. + * + * @param array|object $schema OpenAPI schema + * + * @throws \InvalidArgumentException when invalid arguments passed + * + * @return mixed + */ + public function mockFromSchema($schema); + + /** + * Mock data by referenced schema. + * TODO: this method will return model instance, not an StdClass + * + * @param string|null $ref Ref to model, eg. #/components/schemas/User + * + * @throws \InvalidArgumentException when invalid arguments passed + * + * @return mixed + */ + public function mockFromRef($ref); } diff --git a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesAnyType.php b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesAnyType.php index 6aae0e269b..d5bfc975b9 100644 --- a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesAnyType.php +++ b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesAnyType.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * AdditionalPropertiesAnyType * @@ -23,9 +25,35 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class AdditionalPropertiesAnyType +class AdditionalPropertiesAnyType implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + } + }, + "additionalProperties" : { + "type" : "object", + "properties" : { } + } +} +SCHEMA; + /** @var string $name */ private $name; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesArray.php b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesArray.php index e56c49842d..eec1753f0d 100644 --- a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesArray.php +++ b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesArray.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * AdditionalPropertiesArray * @@ -23,9 +25,38 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class AdditionalPropertiesArray +class AdditionalPropertiesArray implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + } + }, + "additionalProperties" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { } + } + } +} +SCHEMA; + /** @var string $name */ private $name; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesBoolean.php b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesBoolean.php index c5bc97b966..f5503fa41b 100644 --- a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesBoolean.php +++ b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesBoolean.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * AdditionalPropertiesBoolean * @@ -23,9 +25,34 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class AdditionalPropertiesBoolean +class AdditionalPropertiesBoolean implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + } + }, + "additionalProperties" : { + "type" : "boolean" + } +} +SCHEMA; + /** @var string $name */ private $name; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesClass.php b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesClass.php index a1c90ffa2a..7fb8f08834 100644 --- a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesClass.php +++ b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesClass.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * AdditionalPropertiesClass * @@ -23,39 +25,131 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class AdditionalPropertiesClass +class AdditionalPropertiesClass implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "map_string" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "map_number" : { + "type" : "object", + "additionalProperties" : { + "type" : "number" + } + }, + "map_integer" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer" + } + }, + "map_boolean" : { + "type" : "object", + "additionalProperties" : { + "type" : "boolean" + } + }, + "map_array_integer" : { + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "type" : "integer" + } + } + }, + "map_array_anytype" : { + "type" : "object", + "additionalProperties" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { } + } + } + }, + "map_map_string" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + }, + "map_map_anytype" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "properties" : { } + } + } + }, + "anytype_1" : { + "type" : "object", + "properties" : { } + }, + "anytype_2" : { + "type" : "object" + }, + "anytype_3" : { + "type" : "object", + "properties" : { } + } + } +} +SCHEMA; + /** @var map[string,string] $mapString */ private $mapString; - + /** @var map[string,float] $mapNumber */ private $mapNumber; - + /** @var map[string,int] $mapInteger */ private $mapInteger; - + /** @var map[string,bool] $mapBoolean */ private $mapBoolean; - + /** @var map[string,int[]] $mapArrayInteger */ private $mapArrayInteger; - + /** @var map[string,object[]] $mapArrayAnytype */ private $mapArrayAnytype; - + /** @var map[string,map[string,string]] $mapMapString */ private $mapMapString; - + /** @var map[string,map[string,object]] $mapMapAnytype */ private $mapMapAnytype; - + /** @var object $anytype1 */ private $anytype1; - + /** @var object $anytype2 */ private $anytype2; - + /** @var object $anytype3 */ private $anytype3; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesInteger.php b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesInteger.php index ebeddfd129..116ed20c56 100644 --- a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesInteger.php +++ b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesInteger.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * AdditionalPropertiesInteger * @@ -23,9 +25,34 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class AdditionalPropertiesInteger +class AdditionalPropertiesInteger implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + } + }, + "additionalProperties" : { + "type" : "integer" + } +} +SCHEMA; + /** @var string $name */ private $name; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesNumber.php b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesNumber.php index 31541b5b69..e234140479 100644 --- a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesNumber.php +++ b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesNumber.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * AdditionalPropertiesNumber * @@ -23,9 +25,34 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class AdditionalPropertiesNumber +class AdditionalPropertiesNumber implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + } + }, + "additionalProperties" : { + "type" : "number" + } +} +SCHEMA; + /** @var string $name */ private $name; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesObject.php b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesObject.php index 8b1036894d..55ea5bf762 100644 --- a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesObject.php +++ b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesObject.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * AdditionalPropertiesObject * @@ -23,9 +25,38 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class AdditionalPropertiesObject +class AdditionalPropertiesObject implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + } + }, + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "properties" : { } + } + } +} +SCHEMA; + /** @var string $name */ private $name; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesString.php b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesString.php index 303636060c..56471c9bc8 100644 --- a/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesString.php +++ b/samples/server/petstore/php-slim4/lib/Model/AdditionalPropertiesString.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * AdditionalPropertiesString * @@ -23,9 +25,34 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class AdditionalPropertiesString +class AdditionalPropertiesString implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + } + }, + "additionalProperties" : { + "type" : "string" + } +} +SCHEMA; + /** @var string $name */ private $name; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Animal.php b/samples/server/petstore/php-slim4/lib/Model/Animal.php index 69fc086183..b0f3c23849 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Animal.php +++ b/samples/server/petstore/php-slim4/lib/Model/Animal.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Animal * @@ -23,12 +25,42 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Animal +class Animal implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "required" : [ "className" ], + "type" : "object", + "properties" : { + "className" : { + "type" : "string" + }, + "color" : { + "type" : "string", + "default" : "red" + } + }, + "discriminator" : { + "propertyName" : "className" + } +} +SCHEMA; + /** @var string $className */ private $className; - + /** @var string $color */ private $color; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php b/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php index 8cfae424fd..eb00821d06 100644 --- a/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php +++ b/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * ApiResponse * @@ -23,15 +25,44 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class ApiResponse +class ApiResponse implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + } +} +SCHEMA; + /** @var int $code */ private $code; - + /** @var string $type */ private $type; - + /** @var string $message */ private $message; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/server/petstore/php-slim4/lib/Model/ArrayOfArrayOfNumberOnly.php index ff08b3a578..ea7a72a4f1 100644 --- a/samples/server/petstore/php-slim4/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/server/petstore/php-slim4/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * ArrayOfArrayOfNumberOnly * @@ -23,9 +25,37 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class ArrayOfArrayOfNumberOnly +class ArrayOfArrayOfNumberOnly implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "ArrayArrayNumber" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "type" : "number" + } + } + } + } +} +SCHEMA; + /** @var float[][] $arrayArrayNumber */ private $arrayArrayNumber; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/ArrayOfNumberOnly.php b/samples/server/petstore/php-slim4/lib/Model/ArrayOfNumberOnly.php index 05a136efde..25b4c97c2a 100644 --- a/samples/server/petstore/php-slim4/lib/Model/ArrayOfNumberOnly.php +++ b/samples/server/petstore/php-slim4/lib/Model/ArrayOfNumberOnly.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * ArrayOfNumberOnly * @@ -23,9 +25,34 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class ArrayOfNumberOnly +class ArrayOfNumberOnly implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "ArrayNumber" : { + "type" : "array", + "items" : { + "type" : "number" + } + } + } +} +SCHEMA; + /** @var float[] $arrayNumber */ private $arrayNumber; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/ArrayTest.php b/samples/server/petstore/php-slim4/lib/Model/ArrayTest.php index 2cfa4827bc..66aa7e053a 100644 --- a/samples/server/petstore/php-slim4/lib/Model/ArrayTest.php +++ b/samples/server/petstore/php-slim4/lib/Model/ArrayTest.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * ArrayTest * @@ -23,15 +25,59 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class ArrayTest +class ArrayTest implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "array_of_string" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "array_array_of_integer" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } + } + }, + "array_array_of_model" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ReadOnlyFirst" + } + } + } + } +} +SCHEMA; + /** @var string[] $arrayOfString */ private $arrayOfString; - + /** @var int[][] $arrayArrayOfInteger */ private $arrayArrayOfInteger; - + /** @var \OpenAPIServer\Model\ReadOnlyFirst[][] $arrayArrayOfModel */ private $arrayArrayOfModel; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/BigCat.php b/samples/server/petstore/php-slim4/lib/Model/BigCat.php index 39eec7cbfa..4b795da239 100644 --- a/samples/server/petstore/php-slim4/lib/Model/BigCat.php +++ b/samples/server/petstore/php-slim4/lib/Model/BigCat.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * BigCat * @@ -23,18 +25,39 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class BigCat +class BigCat implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "allOf" : [ { + "$ref" : "#/components/schemas/Cat" + }, { + "$ref" : "#/components/schemas/BigCat_allOf" + } ] +} +SCHEMA; + /** @var string $className */ private $className; - + /** @var string $color */ private $color; - + /** @var bool $declawed */ private $declawed; - + /** @var string $kind */ private $kind; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/BigCatAllOf.php b/samples/server/petstore/php-slim4/lib/Model/BigCatAllOf.php index 4716fc8dd4..10433c34b8 100644 --- a/samples/server/petstore/php-slim4/lib/Model/BigCatAllOf.php +++ b/samples/server/petstore/php-slim4/lib/Model/BigCatAllOf.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * BigCatAllOf * @@ -23,9 +25,31 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class BigCatAllOf +class BigCatAllOf implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "properties" : { + "kind" : { + "type" : "string", + "enum" : [ "lions", "tigers", "leopards", "jaguars" ] + } + } +} +SCHEMA; + /** @var string $kind */ private $kind; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Capitalization.php b/samples/server/petstore/php-slim4/lib/Model/Capitalization.php index edcbd0aff7..b596ec9227 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Capitalization.php +++ b/samples/server/petstore/php-slim4/lib/Model/Capitalization.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Capitalization * @@ -23,24 +25,62 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Capitalization +class Capitalization implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "smallCamel" : { + "type" : "string" + }, + "CapitalCamel" : { + "type" : "string" + }, + "small_Snake" : { + "type" : "string" + }, + "Capital_Snake" : { + "type" : "string" + }, + "SCA_ETH_Flow_Points" : { + "type" : "string" + }, + "ATT_NAME" : { + "type" : "string", + "description" : "Name of the pet\n" + } + } +} +SCHEMA; + /** @var string $smallCamel */ private $smallCamel; - + /** @var string $capitalCamel */ private $capitalCamel; - + /** @var string $smallSnake */ private $smallSnake; - + /** @var string $capitalSnake */ private $capitalSnake; - + /** @var string $sCAETHFlowPoints */ private $sCAETHFlowPoints; - + /** @var string $aTTNAME Name of the pet*/ private $aTTNAME; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Cat.php b/samples/server/petstore/php-slim4/lib/Model/Cat.php index 9771920130..1a6471a231 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Cat.php +++ b/samples/server/petstore/php-slim4/lib/Model/Cat.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Cat * @@ -23,15 +25,36 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Cat +class Cat implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "allOf" : [ { + "$ref" : "#/components/schemas/Animal" + }, { + "$ref" : "#/components/schemas/Cat_allOf" + } ] +} +SCHEMA; + /** @var string $className */ private $className; - + /** @var string $color */ private $color; - + /** @var bool $declawed */ private $declawed; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/CatAllOf.php b/samples/server/petstore/php-slim4/lib/Model/CatAllOf.php index 54dfe1cdab..8caa1dc6e5 100644 --- a/samples/server/petstore/php-slim4/lib/Model/CatAllOf.php +++ b/samples/server/petstore/php-slim4/lib/Model/CatAllOf.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * CatAllOf * @@ -23,9 +25,30 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class CatAllOf +class CatAllOf implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "properties" : { + "declawed" : { + "type" : "boolean" + } + } +} +SCHEMA; + /** @var bool $declawed */ private $declawed; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Category.php b/samples/server/petstore/php-slim4/lib/Model/Category.php index 0a5a55d237..f53e2af890 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Category.php +++ b/samples/server/petstore/php-slim4/lib/Model/Category.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Category * @@ -23,12 +25,43 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Category +class Category implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "required" : [ "name" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string", + "default" : "default-name" + } + }, + "xml" : { + "name" : "Category" + } +} +SCHEMA; + /** @var int $id */ private $id; - + /** @var string $name */ private $name; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/ClassModel.php b/samples/server/petstore/php-slim4/lib/Model/ClassModel.php index f95868609a..3b3f5c28d9 100644 --- a/samples/server/petstore/php-slim4/lib/Model/ClassModel.php +++ b/samples/server/petstore/php-slim4/lib/Model/ClassModel.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * ClassModel * @@ -23,9 +25,32 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class ClassModel +class ClassModel implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "_class" : { + "type" : "string" + } + }, + "description" : "Model for testing model with \"_class\" property" +} +SCHEMA; + /** @var string $class */ private $class; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Client.php b/samples/server/petstore/php-slim4/lib/Model/Client.php index e905a3bb11..12aaff03c0 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Client.php +++ b/samples/server/petstore/php-slim4/lib/Model/Client.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Client * @@ -23,9 +25,31 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Client +class Client implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "client" : { + "type" : "string" + } + } +} +SCHEMA; + /** @var string $client */ private $client; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Dog.php b/samples/server/petstore/php-slim4/lib/Model/Dog.php index c3ac105884..c38c1ea4a6 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Dog.php +++ b/samples/server/petstore/php-slim4/lib/Model/Dog.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Dog * @@ -23,15 +25,36 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Dog +class Dog implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "allOf" : [ { + "$ref" : "#/components/schemas/Animal" + }, { + "$ref" : "#/components/schemas/Dog_allOf" + } ] +} +SCHEMA; + /** @var string $className */ private $className; - + /** @var string $color */ private $color; - + /** @var string $breed */ private $breed; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/DogAllOf.php b/samples/server/petstore/php-slim4/lib/Model/DogAllOf.php index c219ea94fd..cf81a5f99b 100644 --- a/samples/server/petstore/php-slim4/lib/Model/DogAllOf.php +++ b/samples/server/petstore/php-slim4/lib/Model/DogAllOf.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * DogAllOf * @@ -23,9 +25,30 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class DogAllOf +class DogAllOf implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "properties" : { + "breed" : { + "type" : "string" + } + } +} +SCHEMA; + /** @var string $breed */ private $breed; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/EnumArrays.php b/samples/server/petstore/php-slim4/lib/Model/EnumArrays.php index 16133e7e20..aef61078eb 100644 --- a/samples/server/petstore/php-slim4/lib/Model/EnumArrays.php +++ b/samples/server/petstore/php-slim4/lib/Model/EnumArrays.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * EnumArrays * @@ -23,12 +25,42 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class EnumArrays +class EnumArrays implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "just_symbol" : { + "type" : "string", + "enum" : [ ">=", "$" ] + }, + "array_enum" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "fish", "crab" ] + } + } + } +} +SCHEMA; + /** @var string $justSymbol */ private $justSymbol; - + /** @var string[] $arrayEnum */ private $arrayEnum; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/EnumClass.php b/samples/server/petstore/php-slim4/lib/Model/EnumClass.php index 13d72c7a97..3ddd829b31 100644 --- a/samples/server/petstore/php-slim4/lib/Model/EnumClass.php +++ b/samples/server/petstore/php-slim4/lib/Model/EnumClass.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * EnumClass * @@ -23,6 +25,25 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class EnumClass +class EnumClass implements ModelInterface { + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "string", + "default" : "-efg", + "enum" : [ "_abc", "-efg", "(xyz)" ] +} +SCHEMA; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/EnumTest.php b/samples/server/petstore/php-slim4/lib/Model/EnumTest.php index 0f883a6705..e4c4ffc0ee 100644 --- a/samples/server/petstore/php-slim4/lib/Model/EnumTest.php +++ b/samples/server/petstore/php-slim4/lib/Model/EnumTest.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * EnumTest * @@ -23,21 +25,62 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class EnumTest +class EnumTest implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "required" : [ "enum_string_required" ], + "type" : "object", + "properties" : { + "enum_string" : { + "type" : "string", + "enum" : [ "UPPER", "lower", "" ] + }, + "enum_string_required" : { + "type" : "string", + "enum" : [ "UPPER", "lower", "" ] + }, + "enum_integer" : { + "type" : "integer", + "format" : "int32", + "enum" : [ 1, -1 ] + }, + "enum_number" : { + "type" : "number", + "format" : "double", + "enum" : [ 1.1, -1.2 ] + }, + "outerEnum" : { + "$ref" : "#/components/schemas/OuterEnum" + } + } +} +SCHEMA; + /** @var string $enumString */ private $enumString; - + /** @var string $enumStringRequired */ private $enumStringRequired; - + /** @var int $enumInteger */ private $enumInteger; - + /** @var double $enumNumber */ private $enumNumber; - + /** @var \OpenAPIServer\Model\OuterEnum $outerEnum */ private $outerEnum; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/File.php b/samples/server/petstore/php-slim4/lib/Model/File.php index 159ef73f38..4237e72144 100644 --- a/samples/server/petstore/php-slim4/lib/Model/File.php +++ b/samples/server/petstore/php-slim4/lib/Model/File.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * File * @@ -23,9 +25,33 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class File +class File implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "sourceURI" : { + "type" : "string", + "description" : "Test capitalization" + } + }, + "description" : "Must be named `File` for test." +} +SCHEMA; + /** @var string $sourceURI Test capitalization*/ private $sourceURI; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/FileSchemaTestClass.php b/samples/server/petstore/php-slim4/lib/Model/FileSchemaTestClass.php index 33e4bfaf3d..3ebabaa367 100644 --- a/samples/server/petstore/php-slim4/lib/Model/FileSchemaTestClass.php +++ b/samples/server/petstore/php-slim4/lib/Model/FileSchemaTestClass.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * FileSchemaTestClass * @@ -23,12 +25,40 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class FileSchemaTestClass +class FileSchemaTestClass implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "file" : { + "$ref" : "#/components/schemas/File" + }, + "files" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/File" + } + } + } +} +SCHEMA; + /** @var \OpenAPIServer\Model\File $file */ private $file; - + /** @var \OpenAPIServer\Model\File[] $files */ private $files; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/FormatTest.php b/samples/server/petstore/php-slim4/lib/Model/FormatTest.php index 5674fc1ad3..751f9607e8 100644 --- a/samples/server/petstore/php-slim4/lib/Model/FormatTest.php +++ b/samples/server/petstore/php-slim4/lib/Model/FormatTest.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * FormatTest * @@ -23,48 +25,136 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class FormatTest +class FormatTest implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "required" : [ "byte", "date", "number", "password" ], + "type" : "object", + "properties" : { + "integer" : { + "maximum" : 1E+2, + "minimum" : 1E+1, + "type" : "integer" + }, + "int32" : { + "maximum" : 2E+2, + "minimum" : 2E+1, + "type" : "integer", + "format" : "int32" + }, + "int64" : { + "type" : "integer", + "format" : "int64" + }, + "number" : { + "maximum" : 543.2, + "minimum" : 32.1, + "type" : "number" + }, + "float" : { + "maximum" : 987.6, + "minimum" : 54.3, + "type" : "number", + "format" : "float" + }, + "double" : { + "maximum" : 123.4, + "minimum" : 67.8, + "type" : "number", + "format" : "double" + }, + "string" : { + "pattern" : "/[a-z]/i", + "type" : "string" + }, + "byte" : { + "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$", + "type" : "string", + "format" : "byte" + }, + "binary" : { + "type" : "string", + "format" : "binary" + }, + "date" : { + "type" : "string", + "format" : "date" + }, + "dateTime" : { + "type" : "string", + "format" : "date-time" + }, + "uuid" : { + "type" : "string", + "format" : "uuid", + "example" : "72f98069-206d-4f12-9f12-3d1e525a8e84" + }, + "password" : { + "maxLength" : 64, + "minLength" : 10, + "type" : "string", + "format" : "password" + }, + "BigDecimal" : { + "type" : "string", + "format" : "number" + } + } +} +SCHEMA; + /** @var int $integer */ private $integer; - + /** @var int $int32 */ private $int32; - + /** @var int $int64 */ private $int64; - + /** @var float $number */ private $number; - + /** @var float $float */ private $float; - + /** @var double $double */ private $double; - + /** @var string $string */ private $string; - + /** @var string $byte */ private $byte; - + /** @var \SplFileObject $binary */ private $binary; - + /** @var \DateTime $date */ private $date; - + /** @var \DateTime $dateTime */ private $dateTime; - + /** @var string $uuid */ private $uuid; - + /** @var string $password */ private $password; - + /** @var BigDecimal $bigDecimal */ private $bigDecimal; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/HasOnlyReadOnly.php b/samples/server/petstore/php-slim4/lib/Model/HasOnlyReadOnly.php index f71bf33afa..afeb12af3d 100644 --- a/samples/server/petstore/php-slim4/lib/Model/HasOnlyReadOnly.php +++ b/samples/server/petstore/php-slim4/lib/Model/HasOnlyReadOnly.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * HasOnlyReadOnly * @@ -23,12 +25,39 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class HasOnlyReadOnly +class HasOnlyReadOnly implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "bar" : { + "type" : "string", + "readOnly" : true + }, + "foo" : { + "type" : "string", + "readOnly" : true + } + } +} +SCHEMA; + /** @var string $bar */ private $bar; - + /** @var string $foo */ private $foo; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/MapTest.php b/samples/server/petstore/php-slim4/lib/Model/MapTest.php index bb64e6f1b1..2cc9edf701 100644 --- a/samples/server/petstore/php-slim4/lib/Model/MapTest.php +++ b/samples/server/petstore/php-slim4/lib/Model/MapTest.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * MapTest * @@ -23,18 +25,62 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class MapTest +class MapTest implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "map_map_of_string" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + }, + "map_of_enum_string" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "enum" : [ "UPPER", "lower" ] + } + }, + "direct_map" : { + "type" : "object", + "additionalProperties" : { + "type" : "boolean" + } + }, + "indirect_map" : { + "$ref" : "#/components/schemas/StringBooleanMap" + } + } +} +SCHEMA; + /** @var map[string,map[string,string]] $mapMapOfString */ private $mapMapOfString; - + /** @var map[string,string] $mapOfEnumString */ private $mapOfEnumString; - + /** @var map[string,bool] $directMap */ private $directMap; - + /** @var map[string,bool] $indirectMap */ private $indirectMap; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/server/petstore/php-slim4/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 2a7699b753..5d55499c7b 100644 --- a/samples/server/petstore/php-slim4/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/server/petstore/php-slim4/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * MixedPropertiesAndAdditionalPropertiesClass * @@ -23,15 +25,48 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class MixedPropertiesAndAdditionalPropertiesClass +class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "uuid" : { + "type" : "string", + "format" : "uuid" + }, + "dateTime" : { + "type" : "string", + "format" : "date-time" + }, + "map" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/components/schemas/Animal" + } + } + } +} +SCHEMA; + /** @var string $uuid */ private $uuid; - + /** @var \DateTime $dateTime */ private $dateTime; - + /** @var map[string,\OpenAPIServer\Model\Animal] $map */ private $map; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Model200Response.php b/samples/server/petstore/php-slim4/lib/Model/Model200Response.php index c86898cadf..6af1b357c7 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Model200Response.php +++ b/samples/server/petstore/php-slim4/lib/Model/Model200Response.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Model200Response * @@ -23,12 +25,42 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Model200Response +class Model200Response implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "name" : { + "type" : "integer", + "format" : "int32" + }, + "class" : { + "type" : "string" + } + }, + "description" : "Model for testing model name starting with number", + "xml" : { + "name" : "Name" + } +} +SCHEMA; + /** @var int $name */ private $name; - + /** @var string $class */ private $class; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/ModelList.php b/samples/server/petstore/php-slim4/lib/Model/ModelList.php index 144a669da9..48c984dad6 100644 --- a/samples/server/petstore/php-slim4/lib/Model/ModelList.php +++ b/samples/server/petstore/php-slim4/lib/Model/ModelList.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * ModelList * @@ -23,9 +25,31 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class ModelList +class ModelList implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "123-list" : { + "type" : "string" + } + } +} +SCHEMA; + /** @var string $_123list */ private $_123list; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/ModelReturn.php b/samples/server/petstore/php-slim4/lib/Model/ModelReturn.php index e0c32bb789..b56717e60a 100644 --- a/samples/server/petstore/php-slim4/lib/Model/ModelReturn.php +++ b/samples/server/petstore/php-slim4/lib/Model/ModelReturn.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * ModelReturn * @@ -23,9 +25,36 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class ModelReturn +class ModelReturn implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "return" : { + "type" : "integer", + "format" : "int32" + } + }, + "description" : "Model for testing reserved words", + "xml" : { + "name" : "Return" + } +} +SCHEMA; + /** @var int $return */ private $return; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Name.php b/samples/server/petstore/php-slim4/lib/Model/Name.php index 9773c2ad51..4eca6a4b6b 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Name.php +++ b/samples/server/petstore/php-slim4/lib/Model/Name.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Name * @@ -23,18 +25,58 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Name +class Name implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "required" : [ "name" ], + "type" : "object", + "properties" : { + "name" : { + "type" : "integer", + "format" : "int32" + }, + "snake_case" : { + "type" : "integer", + "format" : "int32", + "readOnly" : true + }, + "property" : { + "type" : "string" + }, + "123Number" : { + "type" : "integer", + "readOnly" : true + } + }, + "description" : "Model for testing model name same as property name", + "xml" : { + "name" : "Name" + } +} +SCHEMA; + /** @var int $name */ private $name; - + /** @var int $snakeCase */ private $snakeCase; - + /** @var string $property */ private $property; - + /** @var int $_123number */ private $_123number; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/NumberOnly.php b/samples/server/petstore/php-slim4/lib/Model/NumberOnly.php index e95c8453fc..89a47886ed 100644 --- a/samples/server/petstore/php-slim4/lib/Model/NumberOnly.php +++ b/samples/server/petstore/php-slim4/lib/Model/NumberOnly.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * NumberOnly * @@ -23,9 +25,31 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class NumberOnly +class NumberOnly implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "JustNumber" : { + "type" : "number" + } + } +} +SCHEMA; + /** @var float $justNumber */ private $justNumber; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Order.php b/samples/server/petstore/php-slim4/lib/Model/Order.php index 3c92e287aa..e8227de89a 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Order.php +++ b/samples/server/petstore/php-slim4/lib/Model/Order.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Order * @@ -23,24 +25,71 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Order +class Order implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "xml" : { + "name" : "Order" + } +} +SCHEMA; + /** @var int $id */ private $id; - + /** @var int $petId */ private $petId; - + /** @var int $quantity */ private $quantity; - + /** @var \DateTime $shipDate */ private $shipDate; - + /** @var string $status Order Status*/ private $status; - + /** @var bool $complete */ private $complete; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/OuterComposite.php b/samples/server/petstore/php-slim4/lib/Model/OuterComposite.php index 0661fbf5ac..277df1f035 100644 --- a/samples/server/petstore/php-slim4/lib/Model/OuterComposite.php +++ b/samples/server/petstore/php-slim4/lib/Model/OuterComposite.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * OuterComposite * @@ -23,15 +25,43 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class OuterComposite +class OuterComposite implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "my_number" : { + "$ref" : "#/components/schemas/OuterNumber" + }, + "my_string" : { + "$ref" : "#/components/schemas/OuterString" + }, + "my_boolean" : { + "$ref" : "#/components/schemas/OuterBoolean" + } + } +} +SCHEMA; + /** @var float $myNumber */ private $myNumber; - + /** @var string $myString */ private $myString; - + /** @var bool $myBoolean */ private $myBoolean; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/OuterEnum.php b/samples/server/petstore/php-slim4/lib/Model/OuterEnum.php index 21d740cf91..ac9d21d460 100644 --- a/samples/server/petstore/php-slim4/lib/Model/OuterEnum.php +++ b/samples/server/petstore/php-slim4/lib/Model/OuterEnum.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * OuterEnum * @@ -23,6 +25,24 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class OuterEnum +class OuterEnum implements ModelInterface { + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "string", + "enum" : [ "placed", "approved", "delivered" ] +} +SCHEMA; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Pet.php b/samples/server/petstore/php-slim4/lib/Model/Pet.php index dc74f59771..0815662f35 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Pet.php +++ b/samples/server/petstore/php-slim4/lib/Model/Pet.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Pet * @@ -23,24 +25,84 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Pet +class Pet implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "required" : [ "name", "photoUrls" ], + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64", + "x-is-unique" : true + }, + "category" : { + "$ref" : "#/components/schemas/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "xml" : { + "name" : "Pet" + } +} +SCHEMA; + /** @var int $id */ private $id; - + /** @var \OpenAPIServer\Model\Category $category */ private $category; - + /** @var string $name */ private $name; - + /** @var string[] $photoUrls */ private $photoUrls; - + /** @var \OpenAPIServer\Model\Tag[] $tags */ private $tags; - + /** @var string $status pet status in the store*/ private $status; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/ReadOnlyFirst.php b/samples/server/petstore/php-slim4/lib/Model/ReadOnlyFirst.php index 5fb368360f..5ab8ee4838 100644 --- a/samples/server/petstore/php-slim4/lib/Model/ReadOnlyFirst.php +++ b/samples/server/petstore/php-slim4/lib/Model/ReadOnlyFirst.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * ReadOnlyFirst * @@ -23,12 +25,38 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class ReadOnlyFirst +class ReadOnlyFirst implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "bar" : { + "type" : "string", + "readOnly" : true + }, + "baz" : { + "type" : "string" + } + } +} +SCHEMA; + /** @var string $bar */ private $bar; - + /** @var string $baz */ private $baz; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/SpecialModelName.php b/samples/server/petstore/php-slim4/lib/Model/SpecialModelName.php index 6b57beaea0..e22f746884 100644 --- a/samples/server/petstore/php-slim4/lib/Model/SpecialModelName.php +++ b/samples/server/petstore/php-slim4/lib/Model/SpecialModelName.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * SpecialModelName * @@ -23,9 +25,35 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class SpecialModelName +class SpecialModelName implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "$special[property.name]" : { + "type" : "integer", + "format" : "int64" + } + }, + "xml" : { + "name" : "$special[model.name]" + } +} +SCHEMA; + /** @var int $specialPropertyName */ private $specialPropertyName; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/Tag.php b/samples/server/petstore/php-slim4/lib/Model/Tag.php index 2757b9ad52..6a7078552a 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Tag.php +++ b/samples/server/petstore/php-slim4/lib/Model/Tag.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * Tag * @@ -23,12 +25,41 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class Tag +class Tag implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "xml" : { + "name" : "Tag" + } +} +SCHEMA; + /** @var int $id */ private $id; - + /** @var string $name */ private $name; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/TypeHolderDefault.php b/samples/server/petstore/php-slim4/lib/Model/TypeHolderDefault.php index 66331c167e..2a4e87d43e 100644 --- a/samples/server/petstore/php-slim4/lib/Model/TypeHolderDefault.php +++ b/samples/server/petstore/php-slim4/lib/Model/TypeHolderDefault.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * TypeHolderDefault * @@ -23,21 +25,61 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class TypeHolderDefault +class TypeHolderDefault implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "required" : [ "array_item", "bool_item", "integer_item", "number_item", "string_item" ], + "type" : "object", + "properties" : { + "string_item" : { + "type" : "string", + "default" : "what" + }, + "number_item" : { + "type" : "number" + }, + "integer_item" : { + "type" : "integer" + }, + "bool_item" : { + "type" : "boolean", + "default" : true + }, + "array_item" : { + "type" : "array", + "items" : { + "type" : "integer" + } + } + } +} +SCHEMA; + /** @var string $stringItem */ private $stringItem; - + /** @var float $numberItem */ private $numberItem; - + /** @var int $integerItem */ private $integerItem; - + /** @var bool $boolItem */ private $boolItem; - + /** @var int[] $arrayItem */ private $arrayItem; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/TypeHolderExample.php b/samples/server/petstore/php-slim4/lib/Model/TypeHolderExample.php index 42b648585a..958e326075 100644 --- a/samples/server/petstore/php-slim4/lib/Model/TypeHolderExample.php +++ b/samples/server/petstore/php-slim4/lib/Model/TypeHolderExample.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * TypeHolderExample * @@ -23,24 +25,72 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class TypeHolderExample +class TypeHolderExample implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "required" : [ "array_item", "bool_item", "float_item", "integer_item", "number_item", "string_item" ], + "type" : "object", + "properties" : { + "string_item" : { + "type" : "string", + "example" : "what" + }, + "number_item" : { + "type" : "number", + "example" : 1.234 + }, + "float_item" : { + "type" : "number", + "format" : "float", + "example" : 1.234 + }, + "integer_item" : { + "type" : "integer", + "example" : -2 + }, + "bool_item" : { + "type" : "boolean", + "example" : true + }, + "array_item" : { + "type" : "array", + "example" : [ 0, 1, 2, 3 ], + "items" : { + "type" : "integer" + } + } + } +} +SCHEMA; + /** @var string $stringItem */ private $stringItem; - + /** @var float $numberItem */ private $numberItem; - + /** @var float $floatItem */ private $floatItem; - + /** @var int $integerItem */ private $integerItem; - + /** @var bool $boolItem */ private $boolItem; - + /** @var int[] $arrayItem */ private $arrayItem; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/User.php b/samples/server/petstore/php-slim4/lib/Model/User.php index 1810f1c9e1..ebd8f17ae3 100644 --- a/samples/server/petstore/php-slim4/lib/Model/User.php +++ b/samples/server/petstore/php-slim4/lib/Model/User.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * User * @@ -23,30 +25,80 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class User +class User implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64", + "x-is-unique" : true + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string" + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "description" : "User Status", + "format" : "int32" + } + }, + "xml" : { + "name" : "User" + } +} +SCHEMA; + /** @var int $id */ private $id; - + /** @var string $username */ private $username; - + /** @var string $firstName */ private $firstName; - + /** @var string $lastName */ private $lastName; - + /** @var string $email */ private $email; - + /** @var string $password */ private $password; - + /** @var string $phone */ private $phone; - + /** @var int $userStatus User Status*/ private $userStatus; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/lib/Model/XmlItem.php b/samples/server/petstore/php-slim4/lib/Model/XmlItem.php index dd2e4d867f..a63fc64264 100644 --- a/samples/server/petstore/php-slim4/lib/Model/XmlItem.php +++ b/samples/server/petstore/php-slim4/lib/Model/XmlItem.php @@ -16,6 +16,8 @@ */ namespace OpenAPIServer\Model; +use OpenAPIServer\Interfaces\ModelInterface; + /** * XmlItem * @@ -23,93 +25,360 @@ namespace OpenAPIServer\Model; * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ -class XmlItem +class XmlItem implements ModelInterface { - + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "type" : "object", + "properties" : { + "attribute_string" : { + "type" : "string", + "example" : "string", + "xml" : { + "attribute" : true + } + }, + "attribute_number" : { + "type" : "number", + "example" : 1.234, + "xml" : { + "attribute" : true + } + }, + "attribute_integer" : { + "type" : "integer", + "example" : -2, + "xml" : { + "attribute" : true + } + }, + "attribute_boolean" : { + "type" : "boolean", + "example" : true, + "xml" : { + "attribute" : true + } + }, + "wrapped_array" : { + "type" : "array", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "integer" + } + }, + "name_string" : { + "type" : "string", + "example" : "string", + "xml" : { + "name" : "xml_name_string" + } + }, + "name_number" : { + "type" : "number", + "example" : 1.234, + "xml" : { + "name" : "xml_name_number" + } + }, + "name_integer" : { + "type" : "integer", + "example" : -2, + "xml" : { + "name" : "xml_name_integer" + } + }, + "name_boolean" : { + "type" : "boolean", + "example" : true, + "xml" : { + "name" : "xml_name_boolean" + } + }, + "name_array" : { + "type" : "array", + "items" : { + "type" : "integer", + "xml" : { + "name" : "xml_name_array_item" + } + } + }, + "name_wrapped_array" : { + "type" : "array", + "xml" : { + "name" : "xml_name_wrapped_array", + "wrapped" : true + }, + "items" : { + "type" : "integer", + "xml" : { + "name" : "xml_name_wrapped_array_item" + } + } + }, + "prefix_string" : { + "type" : "string", + "example" : "string", + "xml" : { + "prefix" : "ab" + } + }, + "prefix_number" : { + "type" : "number", + "example" : 1.234, + "xml" : { + "prefix" : "cd" + } + }, + "prefix_integer" : { + "type" : "integer", + "example" : -2, + "xml" : { + "prefix" : "ef" + } + }, + "prefix_boolean" : { + "type" : "boolean", + "example" : true, + "xml" : { + "prefix" : "gh" + } + }, + "prefix_array" : { + "type" : "array", + "items" : { + "type" : "integer", + "xml" : { + "prefix" : "ij" + } + } + }, + "prefix_wrapped_array" : { + "type" : "array", + "xml" : { + "prefix" : "kl", + "wrapped" : true + }, + "items" : { + "type" : "integer", + "xml" : { + "prefix" : "mn" + } + } + }, + "namespace_string" : { + "type" : "string", + "example" : "string", + "xml" : { + "namespace" : "http://a.com/schema" + } + }, + "namespace_number" : { + "type" : "number", + "example" : 1.234, + "xml" : { + "namespace" : "http://b.com/schema" + } + }, + "namespace_integer" : { + "type" : "integer", + "example" : -2, + "xml" : { + "namespace" : "http://c.com/schema" + } + }, + "namespace_boolean" : { + "type" : "boolean", + "example" : true, + "xml" : { + "namespace" : "http://d.com/schema" + } + }, + "namespace_array" : { + "type" : "array", + "items" : { + "type" : "integer", + "xml" : { + "namespace" : "http://e.com/schema" + } + } + }, + "namespace_wrapped_array" : { + "type" : "array", + "xml" : { + "namespace" : "http://f.com/schema", + "wrapped" : true + }, + "items" : { + "type" : "integer", + "xml" : { + "namespace" : "http://g.com/schema" + } + } + }, + "prefix_ns_string" : { + "type" : "string", + "example" : "string", + "xml" : { + "namespace" : "http://a.com/schema", + "prefix" : "a" + } + }, + "prefix_ns_number" : { + "type" : "number", + "example" : 1.234, + "xml" : { + "namespace" : "http://b.com/schema", + "prefix" : "b" + } + }, + "prefix_ns_integer" : { + "type" : "integer", + "example" : -2, + "xml" : { + "namespace" : "http://c.com/schema", + "prefix" : "c" + } + }, + "prefix_ns_boolean" : { + "type" : "boolean", + "example" : true, + "xml" : { + "namespace" : "http://d.com/schema", + "prefix" : "d" + } + }, + "prefix_ns_array" : { + "type" : "array", + "items" : { + "type" : "integer", + "xml" : { + "namespace" : "http://e.com/schema", + "prefix" : "e" + } + } + }, + "prefix_ns_wrapped_array" : { + "type" : "array", + "xml" : { + "namespace" : "http://f.com/schema", + "prefix" : "f", + "wrapped" : true + }, + "items" : { + "type" : "integer", + "xml" : { + "namespace" : "http://g.com/schema", + "prefix" : "g" + } + } + } + }, + "xml" : { + "namespace" : "http://a.com/schema", + "prefix" : "pre" + } +} +SCHEMA; + /** @var string $attributeString */ private $attributeString; - + /** @var float $attributeNumber */ private $attributeNumber; - + /** @var int $attributeInteger */ private $attributeInteger; - + /** @var bool $attributeBoolean */ private $attributeBoolean; - + /** @var int[] $wrappedArray */ private $wrappedArray; - + /** @var string $nameString */ private $nameString; - + /** @var float $nameNumber */ private $nameNumber; - + /** @var int $nameInteger */ private $nameInteger; - + /** @var bool $nameBoolean */ private $nameBoolean; - + /** @var int[] $nameArray */ private $nameArray; - + /** @var int[] $nameWrappedArray */ private $nameWrappedArray; - + /** @var string $prefixString */ private $prefixString; - + /** @var float $prefixNumber */ private $prefixNumber; - + /** @var int $prefixInteger */ private $prefixInteger; - + /** @var bool $prefixBoolean */ private $prefixBoolean; - + /** @var int[] $prefixArray */ private $prefixArray; - + /** @var int[] $prefixWrappedArray */ private $prefixWrappedArray; - + /** @var string $namespaceString */ private $namespaceString; - + /** @var float $namespaceNumber */ private $namespaceNumber; - + /** @var int $namespaceInteger */ private $namespaceInteger; - + /** @var bool $namespaceBoolean */ private $namespaceBoolean; - + /** @var int[] $namespaceArray */ private $namespaceArray; - + /** @var int[] $namespaceWrappedArray */ private $namespaceWrappedArray; - + /** @var string $prefixNsString */ private $prefixNsString; - + /** @var float $prefixNsNumber */ private $prefixNsNumber; - + /** @var int $prefixNsInteger */ private $prefixNsInteger; - + /** @var bool $prefixNsBoolean */ private $prefixNsBoolean; - + /** @var int[] $prefixNsArray */ private $prefixNsArray; - + /** @var int[] $prefixNsWrappedArray */ private $prefixNsWrappedArray; + + /** + * Returns model schema. + * + * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE. + * + * @return array + */ + public static function getOpenApiSchema($assoc = false) + { + return json_decode(static::MODEL_SCHEMA, $assoc); + } } diff --git a/samples/server/petstore/php-slim4/test/Mock/OpenApiDataMockerTest.php b/samples/server/petstore/php-slim4/test/Mock/OpenApiDataMockerTest.php index 2b925cddef..2ddf0b8a0f 100644 --- a/samples/server/petstore/php-slim4/test/Mock/OpenApiDataMockerTest.php +++ b/samples/server/petstore/php-slim4/test/Mock/OpenApiDataMockerTest.php @@ -30,6 +30,7 @@ use OpenAPIServer\Mock\OpenApiDataMockerInterface as IMocker; use PHPUnit\Framework\TestCase; use PHPUnit\Framework\Constraint\IsType; use StdClass; +use DateTime; /** * OpenApiDataMockerTest Class Doc Comment @@ -95,6 +96,18 @@ class OpenApiDataMockerTest extends TestCase ]; } + /** + * @covers ::mock + */ + public function testMockWithStringEnumOptions() + { + $mocker = new OpenApiDataMocker(); + $string = $mocker->mock(IMocker::DATA_TYPE_STRING, null, [ + 'enum' => ['foobar', 'foobaz', 'helloworld'], + ]); + $this->assertContains($string, ['foobar', 'foobaz', 'helloworld']); + } + /** * @dataProvider provideMockIntegerCorrectArguments * @covers ::mockInteger @@ -511,7 +524,7 @@ class OpenApiDataMockerTest extends TestCase $subMaxItems = $items->maxItems ?? null; $subUniqueItems = $items->uniqueItems ?? null; } - + foreach ($arr as $item) { switch ($dataType) { @@ -639,6 +652,45 @@ class OpenApiDataMockerTest extends TestCase 'maxItems less than minItems' => [ $intItems, 5, 2, false, ], + 'items with ref to unknown class' => [ + ['$ref' => '#/components/schemas/UnknownClass'], null, null, false, + ], + 'items with ref to class without getOpenApiSchema method' => [ + ['$ref' => '#/components/schemas/ClassWithoutGetSchemaMethod'], null, null, false, + ], + ]; + } + + /** + * @dataProvider provideMockArrayWithRefArguments + * @covers ::mockArray + */ + public function testMockArrayWithRef($items, $expectedStructure) + { + $mocker = new OpenApiDataMocker(); + $arr = $mocker->mockArray($items); + $this->assertIsArray($arr); + $this->assertCount(1, $arr); + foreach ($arr as $item) { + // TODO: replace with assertInstanceOf assertion + $this->assertInternalType(IsType::TYPE_OBJECT, $item); + foreach ($expectedStructure as $expectedProp => $expectedType) { + $this->assertInternalType($expectedType, $item->$expectedProp); + } + } + } + + public function provideMockArrayWithRefArguments() + { + return [ + 'items with ref to CatRefTestClass' => [ + ['$ref' => '#/components/schemas/CatRefTestClass'], + [ + 'className' => IsType::TYPE_STRING, + 'color' => IsType::TYPE_STRING, + 'declawed' => IsType::TYPE_BOOL, + ], + ], ]; } @@ -723,6 +775,9 @@ class OpenApiDataMockerTest extends TestCase 'properties cannot be a string' => [ 'foobar', 0, 10, false, null, ], + 'property value cannot be a string' => [ + ['username' => 'foobar'], 0, 10, false, null, + ], 'minProperties is not integer' => [ [], 3.12, null, false, null, ], @@ -761,4 +816,219 @@ class OpenApiDataMockerTest extends TestCase ], ]; } + + /** + * @covers ::mockObject + */ + public function testMockObjectWithReferencedProps() + { + $mocker = new OpenApiDataMocker(); + $obj = $mocker->mockObject( + (object) [ + 'cat' => [ + '$ref' => '#/components/schemas/CatRefTestClass', + ], + ] + ); + $this->assertInternalType(IsType::TYPE_OBJECT, $obj->cat); + $this->assertInternalType(IsType::TYPE_STRING, $obj->cat->className); + $this->assertInternalType(IsType::TYPE_STRING, $obj->cat->color); + $this->assertInternalType(IsType::TYPE_BOOL, $obj->cat->declawed); + } + + /** + * @dataProvider provideMockFromSchemaCorrectArguments + * @covers ::mockFromSchema + */ + public function testMockFromSchemaWithCorrectArguments($schema, $expectedType) + { + $mocker = new OpenApiDataMocker(); + $data = $mocker->mockFromSchema($schema); + $this->assertInternalType($expectedType, $data); + } + + public function provideMockFromSchemaCorrectArguments() + { + return [ + 'string from object' => [ + (object) ['type' => IMocker::DATA_TYPE_STRING], + IsType::TYPE_STRING, + ], + 'string from array' => [ + ['type' => IMocker::DATA_TYPE_STRING], + IsType::TYPE_STRING, + ], + 'integer from object' => [ + (object) ['type' => IMocker::DATA_TYPE_INTEGER], + IsType::TYPE_INT, + ], + 'integer from array' => [ + ['type' => IMocker::DATA_TYPE_INTEGER], + IsType::TYPE_INT, + ], + 'number from object' => [ + (object) ['type' => IMocker::DATA_TYPE_NUMBER], + IsType::TYPE_FLOAT, + ], + 'number from array' => [ + ['type' => IMocker::DATA_TYPE_NUMBER], + IsType::TYPE_FLOAT, + ], + 'string from object' => [ + (object) ['type' => IMocker::DATA_TYPE_STRING], + IsType::TYPE_STRING, + ], + 'string from array' => [ + ['type' => IMocker::DATA_TYPE_STRING], + IsType::TYPE_STRING, + ], + 'boolean from object' => [ + (object) ['type' => IMocker::DATA_TYPE_BOOLEAN], + IsType::TYPE_BOOL, + ], + 'boolean from array' => [ + ['type' => IMocker::DATA_TYPE_BOOLEAN], + IsType::TYPE_BOOL, + ], + 'array of strings from object' => [ + (object) [ + 'type' => IMocker::DATA_TYPE_ARRAY, + 'items' => ['type' => IMocker::DATA_TYPE_STRING], + ], + IsType::TYPE_ARRAY, + ], + 'array of strings from array' => [ + [ + 'type' => IMocker::DATA_TYPE_ARRAY, + 'items' => ['type' => IMocker::DATA_TYPE_STRING], + ], + IsType::TYPE_ARRAY, + ], + 'object with username prop from object' => [ + (object) [ + 'type' => IMocker::DATA_TYPE_OBJECT, + 'properties' => ['username' => ['type' => IMocker::DATA_TYPE_STRING]], + ], + IsType::TYPE_OBJECT, + ], + 'object with username prop from array' => [ + [ + 'type' => IMocker::DATA_TYPE_OBJECT, + 'properties' => ['username' => ['type' => IMocker::DATA_TYPE_STRING]], + ], + IsType::TYPE_OBJECT, + ], + 'referenced class' => [ + ['$ref' => '#/components/schemas/CatRefTestClass'], + IsType::TYPE_OBJECT, + ], + ]; + } + + /** + * @dataProvider provideMockFromSchemaInvalidArguments + * @expectedException \InvalidArgumentException + * @covers ::mockFromSchema + */ + public function testMockFromSchemaWithInvalidArguments($schema) + { + $mocker = new OpenApiDataMocker(); + $data = $mocker->mockFromSchema($schema); + } + + + public function provideMockFromSchemaInvalidArguments() + { + return [ + 'null' => [null], + 'numeric' => [3.14], + 'empty array' => [[]], + 'empty object' => [(object) []], + 'string' => ['foobar'], + 'DateTime object' => [new DateTime()], + ]; + } + + /** + * @dataProvider provideMockFromRefCorrectArguments + * @covers ::mockFromRef + */ + public function testMockFromRefWithCorrectArguments($ref, $expectedStructure) + { + $mocker = new OpenApiDataMocker(); + $data = $mocker->mockFromRef($ref); + foreach ($expectedStructure as $expectedProp => $expectedType) { + $this->assertInternalType($expectedType, $data->$expectedProp); + } + } + + public function provideMockFromRefCorrectArguments() + { + return [ + 'CatRefTestClass model' => [ + '#/components/schemas/CatRefTestClass', + [ + 'className' => IsType::TYPE_STRING, + 'color' => IsType::TYPE_STRING, + 'declawed' => IsType::TYPE_BOOL, + ] + ], + ]; + } + + /** + * @dataProvider provideMockFromRefInvalidArguments + * @expectedException \InvalidArgumentException + * @covers ::mockFromRef + */ + public function testMockFromRefWithInvalidArguments($ref) + { + $mocker = new OpenApiDataMocker(); + $data = $mocker->mockFromRef($ref); + } + + public function provideMockFromRefInvalidArguments() + { + return [ + 'ref to unknown class' => ['#/components/schemas/UnknownClass'], + 'ref to class without getOpenApiSchema method' => ['#/components/schemas/ClassWithoutGetSchemaMethod'], + ]; + } +} + +namespace OpenAPIServer\Model; + +// phpcs:disable PSR1.Classes.ClassDeclaration.MultipleClasses +final class CatRefTestClass +{ + private const MODEL_SCHEMA = <<<'SCHEMA' +{ + "required" : [ "className" ], + "type" : "object", + "properties" : { + "className" : { + "type" : "string" + }, + "color" : { + "type" : "string", + "default" : "red" + }, + "declawed" : { + "type" : "boolean" + } + }, + "discriminator" : { + "propertyName" : "className" + } +} +SCHEMA; + + public static function getOpenApiSchema() + { + return json_decode(static::MODEL_SCHEMA, true); + } +} + +final class ClassWithoutGetSchemaMethod +{ } From 75508f5ce0d1bfd7dfef46192895780e0674a4c1 Mon Sep 17 00:00:00 2001 From: Steve Porter <12199424+StevePorter92@users.noreply.github.com> Date: Fri, 10 Jan 2020 09:02:50 +0000 Subject: [PATCH 37/82] Add npmRepository option to javascript generators (#4956) --- docs/generators/javascript.md | 1 + .../codegen/languages/JavascriptClientCodegen.java | 11 +++++++++++ .../main/resources/Javascript/es6/package.mustache | 5 +++++ .../src/main/resources/Javascript/package.mustache | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index acb79669c4..d591782d5d 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -26,6 +26,7 @@ sidebar_label: javascript |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |useES6|use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| ## IMPORT MAPPING diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index e8f9fd6fec..ce6b34343e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -48,6 +48,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo public static final String EMIT_MODEL_METHODS = "emitModelMethods"; public static final String EMIT_JS_DOC = "emitJSDoc"; public static final String USE_ES6 = "useES6"; + public static final String NPM_REPOSITORY = "npmRepository"; final String[][] JAVASCRIPT_SUPPORTING_FILES = new String[][]{ new String[]{"package.mustache", "package.json"}, @@ -86,6 +87,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo protected String apiTestPath = "api/"; protected String modelTestPath = "model/"; protected boolean useES6 = true; // default is ES6 + protected String npmRepository = null; private String modelPropertyNaming = "camelCase"; public JavascriptClientCodegen() { @@ -193,6 +195,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo "use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.") .defaultValue(Boolean.TRUE.toString())); cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase")); + cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); } @Override @@ -263,6 +266,9 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo if (additionalProperties.containsKey(CodegenConstants.MODEL_PROPERTY_NAMING)) { setModelPropertyNaming((String) additionalProperties.get(CodegenConstants.MODEL_PROPERTY_NAMING)); } + if (additionalProperties.containsKey(NPM_REPOSITORY)) { + setNpmRepository(((String) additionalProperties.get(NPM_REPOSITORY))); + } } @Override @@ -326,6 +332,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo additionalProperties.put(EMIT_MODEL_METHODS, emitModelMethods); additionalProperties.put(EMIT_JS_DOC, emitJSDoc); additionalProperties.put(USE_ES6, useES6); + additionalProperties.put(NPM_REPOSITORY, npmRepository); // make api and model doc path available in mustache template additionalProperties.put("apiDocPath", apiDocPath); @@ -433,6 +440,10 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo this.usePromises = usePromises; } + public void setNpmRepository(String npmRepository) { + this.npmRepository = npmRepository; + } + public void setUseES6(boolean useES6) { this.useES6 = useES6; if (useES6) { diff --git a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache index bd87553eb2..15a0a52fec 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/es6/package.mustache @@ -12,6 +12,11 @@ "browser": { "fs": false }, +{{#npmRepository}} + "publishConfig":{ + "registry":"{{npmRepository}}" + }, +{{/npmRepository}} "dependencies": { "@babel/cli": "^7.0.0", "superagent": "3.7.0" diff --git a/modules/openapi-generator/src/main/resources/Javascript/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/package.mustache index 23515dd9c2..2fe23d57d7 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/package.mustache @@ -10,6 +10,11 @@ "browser": { "fs": false }, +{{#npmRepository}} + "publishConfig":{ + "registry":"{{npmRepository}}" + }, +{{/npmRepository}} "dependencies": { "superagent": "5.1.0" }, From cbc12543a9c949ca0eacc73db5f8c383bf3d0a75 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 10 Jan 2020 01:43:35 -0800 Subject: [PATCH 38/82] [Python] Allow models to have properties of type self (#4888) * Refactors openapi_types into a staticmethod * Adds a Player model with a self type rpoperty, adds a test to ensure that it is working right --- .../PythonClientExperimentalCodegen.java | 9 ++ .../model_templates/classvars.mustache | 28 ++-- .../docstring_openapi_validations.mustache | 2 - .../method_set_attribute.mustache | 5 +- .../python-experimental/model_utils.mustache | 8 +- ...ith-fake-endpoints-models-for-testing.yaml | 10 ++ .../petstore/python-experimental/README.md | 1 + .../python-experimental/docs/Player.md | 11 ++ .../petstore_api/__init__.py | 1 + .../petstore_api/model_utils.py | 13 +- .../models/additional_properties_any_type.py | 20 ++- .../models/additional_properties_array.py | 20 ++- .../models/additional_properties_boolean.py | 20 ++- .../models/additional_properties_class.py | 40 +++--- .../models/additional_properties_integer.py | 20 ++- .../models/additional_properties_number.py | 20 ++- .../models/additional_properties_object.py | 20 ++- .../models/additional_properties_string.py | 20 ++- .../petstore_api/models/animal.py | 22 ++- .../petstore_api/models/api_response.py | 24 ++-- .../models/array_of_array_of_number_only.py | 20 ++- .../models/array_of_number_only.py | 20 ++- .../petstore_api/models/array_test.py | 24 ++-- .../petstore_api/models/capitalization.py | 30 ++-- .../petstore_api/models/cat.py | 24 ++-- .../petstore_api/models/cat_all_of.py | 20 ++- .../petstore_api/models/category.py | 22 ++- .../petstore_api/models/child.py | 24 ++-- .../petstore_api/models/child_all_of.py | 20 ++- .../petstore_api/models/child_cat.py | 22 ++- .../petstore_api/models/child_cat_all_of.py | 20 ++- .../petstore_api/models/child_dog.py | 22 ++- .../petstore_api/models/child_dog_all_of.py | 20 ++- .../petstore_api/models/child_lizard.py | 22 ++- .../models/child_lizard_all_of.py | 20 ++- .../petstore_api/models/class_model.py | 20 ++- .../petstore_api/models/client.py | 20 ++- .../petstore_api/models/dog.py | 24 ++-- .../petstore_api/models/dog_all_of.py | 20 ++- .../petstore_api/models/enum_arrays.py | 22 ++- .../petstore_api/models/enum_class.py | 20 ++- .../petstore_api/models/enum_test.py | 28 ++-- .../petstore_api/models/file.py | 20 ++- .../models/file_schema_test_class.py | 22 ++- .../petstore_api/models/format_test.py | 44 +++--- .../petstore_api/models/grandparent.py | 20 ++- .../petstore_api/models/grandparent_animal.py | 20 ++- .../petstore_api/models/has_only_read_only.py | 22 ++- .../petstore_api/models/list.py | 20 ++- .../petstore_api/models/map_test.py | 26 ++-- ...perties_and_additional_properties_class.py | 24 ++-- .../petstore_api/models/model200_response.py | 22 ++- .../petstore_api/models/model_return.py | 20 ++- .../petstore_api/models/name.py | 26 ++-- .../petstore_api/models/number_only.py | 20 ++- .../petstore_api/models/order.py | 30 ++-- .../petstore_api/models/outer_composite.py | 24 ++-- .../petstore_api/models/outer_enum.py | 20 ++- .../petstore_api/models/outer_number.py | 20 ++- .../petstore_api/models/parent.py | 22 ++- .../petstore_api/models/parent_all_of.py | 20 ++- .../petstore_api/models/parent_pet.py | 20 ++- .../petstore_api/models/pet.py | 30 ++-- .../petstore_api/models/player.py | 132 ++++++++++++++++++ .../petstore_api/models/read_only_first.py | 22 ++- .../petstore_api/models/special_model_name.py | 20 ++- .../petstore_api/models/string_boolean_map.py | 18 ++- .../petstore_api/models/tag.py | 24 ++-- .../models/type_holder_default.py | 32 +++-- .../models/type_holder_example.py | 28 ++-- .../petstore_api/models/user.py | 34 +++-- .../petstore_api/models/xml_item.py | 76 +++++----- .../python-experimental/test/test_player.py | 43 ++++++ 73 files changed, 1212 insertions(+), 507 deletions(-) create mode 100644 samples/client/petstore/python-experimental/docs/Player.md create mode 100644 samples/client/petstore/python-experimental/petstore_api/models/player.py create mode 100644 samples/client/petstore/python-experimental/test/test_player.py diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index eb3c65438e..1467060a88 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -643,6 +643,11 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { // fix ListContainers p.complexType = getPythonClassName(p.mostInnerItems.complexType); } + // if a model has a property that is of type self, remove the module name from the dataType + if (p.complexType != null && p.dataType.contains(model.classname)) { + String classNameNoModule = getPythonClassName(model.classname); + p.dataType = p.dataType.replace(model.classname, classNameNoModule); + } } @Override @@ -753,6 +758,10 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { result.imports.add(modelName); } } + // if a class has a property of type self, remove the self import from imports + if (result.imports.contains(result.classname)) { + result.imports.remove(result.classname); + } return result; } diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache index fcd8a71fd1..60fff484ef 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/classvars.mustache @@ -29,15 +29,6 @@ {{/optionalVars}} } - openapi_types = { -{{#requiredVars}} - '{{name}}': ({{{dataType}}},), # noqa: E501 -{{/requiredVars}} -{{#optionalVars}} - '{{name}}': ({{{dataType}}},), # noqa: E501 -{{/optionalVars}} - } - validations = { {{#requiredVars}} {{#hasValidation}} @@ -103,6 +94,25 @@ additional_properties_type = {{#additionalPropertiesType}}({{{additionalPropertiesType}}},) # noqa: E501{{/additionalPropertiesType}}{{^additionalPropertiesType}}None{{/additionalPropertiesType}} + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { +{{#requiredVars}} + '{{name}}': ({{{dataType}}},), # noqa: E501 +{{/requiredVars}} +{{#optionalVars}} + '{{name}}': ({{{dataType}}},), # noqa: E501 +{{/optionalVars}} + } + @staticmethod def discriminator(): return {{^discriminator}}None{{/discriminator}}{{#discriminator}}{ diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/docstring_openapi_validations.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/docstring_openapi_validations.mustache index 03eec953f3..f933b86c5b 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/docstring_openapi_validations.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/docstring_openapi_validations.mustache @@ -1,5 +1,3 @@ - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_set_attribute.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_set_attribute.mustache index f4a36e42f2..bcafb71368 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_set_attribute.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_templates/method_set_attribute.mustache @@ -6,8 +6,9 @@ path_to_item.extend(self._path_to_item) path_to_item.append(name) - if name in self.openapi_types: - required_types_mixed = self.openapi_types[name] + openapi_types = self.openapi_types() + if name in openapi_types: + required_types_mixed = openapi_types[name] elif self.additional_properties_type is None: raise ApiKeyError( "{0} has no key '{1}'".format(type(self).__name__, name), diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache index dbd592c37e..c3d9e7d536 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/model_utils.mustache @@ -928,7 +928,7 @@ def get_allof_instances(self, model_args, constant_args): # extract a dict of only required keys from fixed_model_args kwargs = {} - var_names = set(allof_class.openapi_types.keys()) + var_names = set(allof_class.openapi_types().keys()) for var_name in var_names: if var_name in fixed_model_args: kwargs[var_name] = fixed_model_args[var_name] @@ -963,7 +963,7 @@ def get_oneof_instance(self, model_args, constant_args): # extract a dict of only required keys from fixed_model_args kwargs = {} - var_names = set(oneof_class.openapi_types.keys()) + var_names = set(oneof_class.openapi_types().keys()) for var_name in var_names: if var_name in fixed_model_args: kwargs[var_name] = fixed_model_args[var_name] @@ -1006,7 +1006,7 @@ def get_anyof_instances(self, model_args, constant_args): # extract a dict of only required keys from these_model_vars kwargs = {} - var_names = set(anyof_class.openapi_types.keys()) + var_names = set(anyof_class.openapi_types().keys()) for var_name in var_names: if var_name in fixed_model_args: kwargs[var_name] = fixed_model_args[var_name] @@ -1043,7 +1043,7 @@ def get_var_name_to_model_instances(self, composed_instances): all_instances = [self] all_instances.extend(composed_instances) for instance in all_instances: - for var_name in instance.openapi_types: + for var_name in instance.openapi_types(): if var_name not in var_name_to_model_instances: var_name_to_model_instances[var_name] = [instance] else: diff --git a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml index fa1bdfe009..ee41ff46ba 100644 --- a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1341,6 +1341,16 @@ definitions: properties: _class: type: string + Player: + type: object + required: + - name + properties: + name: + type: string + enemyPlayer: + type: object + $ref: '#/components/schemas/Player' Dog: allOf: - $ref: '#/definitions/Animal' diff --git a/samples/client/petstore/python-experimental/README.md b/samples/client/petstore/python-experimental/README.md index ffffbf80eb..b1d65b496d 100644 --- a/samples/client/petstore/python-experimental/README.md +++ b/samples/client/petstore/python-experimental/README.md @@ -167,6 +167,7 @@ Class | Method | HTTP request | Description - [parent_all_of.ParentAllOf](docs/ParentAllOf.md) - [parent_pet.ParentPet](docs/ParentPet.md) - [pet.Pet](docs/Pet.md) + - [player.Player](docs/Player.md) - [read_only_first.ReadOnlyFirst](docs/ReadOnlyFirst.md) - [special_model_name.SpecialModelName](docs/SpecialModelName.md) - [string_boolean_map.StringBooleanMap](docs/StringBooleanMap.md) diff --git a/samples/client/petstore/python-experimental/docs/Player.md b/samples/client/petstore/python-experimental/docs/Player.md new file mode 100644 index 0000000000..34adf5302a --- /dev/null +++ b/samples/client/petstore/python-experimental/docs/Player.md @@ -0,0 +1,11 @@ +# player.Player + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**enemy_player** | [**Player**](Player.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/python-experimental/petstore_api/__init__.py b/samples/client/petstore/python-experimental/petstore_api/__init__.py index 4b47774e2f..445bf2409a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/__init__.py +++ b/samples/client/petstore/python-experimental/petstore_api/__init__.py @@ -91,6 +91,7 @@ from petstore_api.models.parent import Parent from petstore_api.models.parent_all_of import ParentAllOf from petstore_api.models.parent_pet import ParentPet from petstore_api.models.pet import Pet +from petstore_api.models.player import Player from petstore_api.models.read_only_first import ReadOnlyFirst from petstore_api.models.special_model_name import SpecialModelName from petstore_api.models.string_boolean_map import StringBooleanMap diff --git a/samples/client/petstore/python-experimental/petstore_api/model_utils.py b/samples/client/petstore/python-experimental/petstore_api/model_utils.py index 5deb245853..6d6a88edb7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/model_utils.py +++ b/samples/client/petstore/python-experimental/petstore_api/model_utils.py @@ -54,8 +54,9 @@ class OpenApiModel(object): path_to_item.extend(self._path_to_item) path_to_item.append(name) - if name in self.openapi_types: - required_types_mixed = self.openapi_types[name] + openapi_types = self.openapi_types() + if name in openapi_types: + required_types_mixed = openapi_types[name] elif self.additional_properties_type is None: raise ApiKeyError( "{0} has no key '{1}'".format(type(self).__name__, name), @@ -1181,7 +1182,7 @@ def get_allof_instances(self, model_args, constant_args): # extract a dict of only required keys from fixed_model_args kwargs = {} - var_names = set(allof_class.openapi_types.keys()) + var_names = set(allof_class.openapi_types().keys()) for var_name in var_names: if var_name in fixed_model_args: kwargs[var_name] = fixed_model_args[var_name] @@ -1216,7 +1217,7 @@ def get_oneof_instance(self, model_args, constant_args): # extract a dict of only required keys from fixed_model_args kwargs = {} - var_names = set(oneof_class.openapi_types.keys()) + var_names = set(oneof_class.openapi_types().keys()) for var_name in var_names: if var_name in fixed_model_args: kwargs[var_name] = fixed_model_args[var_name] @@ -1259,7 +1260,7 @@ def get_anyof_instances(self, model_args, constant_args): # extract a dict of only required keys from these_model_vars kwargs = {} - var_names = set(anyof_class.openapi_types.keys()) + var_names = set(anyof_class.openapi_types().keys()) for var_name in var_names: if var_name in fixed_model_args: kwargs[var_name] = fixed_model_args[var_name] @@ -1296,7 +1297,7 @@ def get_var_name_to_model_instances(self, composed_instances): all_instances = [self] all_instances.extend(composed_instances) for instance in all_instances: - for var_name in instance.openapi_types: + for var_name in instance.openapi_types(): if var_name not in var_name_to_model_instances: var_name_to_model_instances[var_name] = [instance] else: diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py index e3bdd37fcc..c9e1d7389d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_any_type.py @@ -45,8 +45,6 @@ class AdditionalPropertiesAnyType(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class AdditionalPropertiesAnyType(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501 + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py index 12f228e9ba..340e638927 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_array.py @@ -45,8 +45,6 @@ class AdditionalPropertiesArray(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class AdditionalPropertiesArray(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501 + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py index ed37ef90c4..78f9ac1bb6 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_boolean.py @@ -45,8 +45,6 @@ class AdditionalPropertiesBoolean(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class AdditionalPropertiesBoolean(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = (bool,) # noqa: E501 + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py index 3f34d95684..2f0d79a799 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py @@ -45,8 +45,6 @@ class AdditionalPropertiesClass(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,25 +57,35 @@ class AdditionalPropertiesClass(ModelNormal): allowed_values = { } - openapi_types = { - 'map_string': ({str: (str,)},), # noqa: E501 - 'map_number': ({str: (float,)},), # noqa: E501 - 'map_integer': ({str: (int,)},), # noqa: E501 - 'map_boolean': ({str: (bool,)},), # noqa: E501 - 'map_array_integer': ({str: ([int],)},), # noqa: E501 - 'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str],)},), # noqa: E501 - 'map_map_string': ({str: ({str: (str,)},)},), # noqa: E501 - 'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)},), # noqa: E501 - 'anytype_1': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 - 'anytype_2': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 - 'anytype_3': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'map_string': ({str: (str,)},), # noqa: E501 + 'map_number': ({str: (float,)},), # noqa: E501 + 'map_integer': ({str: (int,)},), # noqa: E501 + 'map_boolean': ({str: (bool,)},), # noqa: E501 + 'map_array_integer': ({str: ([int],)},), # noqa: E501 + 'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str],)},), # noqa: E501 + 'map_map_string': ({str: ({str: (str,)},)},), # noqa: E501 + 'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)},), # noqa: E501 + 'anytype_1': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'anytype_2': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + 'anytype_3': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py index 653350f6b5..b716a6ec6c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_integer.py @@ -45,8 +45,6 @@ class AdditionalPropertiesInteger(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class AdditionalPropertiesInteger(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = (int,) # noqa: E501 + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py index e6d75b4063..17b717ebf0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_number.py @@ -45,8 +45,6 @@ class AdditionalPropertiesNumber(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class AdditionalPropertiesNumber(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = (float,) # noqa: E501 + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py index a3cb690eb7..8bd9c9e085 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_object.py @@ -45,8 +45,6 @@ class AdditionalPropertiesObject(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class AdditionalPropertiesObject(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501 + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py index 1611d7c640..20180ba810 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/additional_properties_string.py @@ -45,8 +45,6 @@ class AdditionalPropertiesString(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class AdditionalPropertiesString(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = (str,) # noqa: E501 + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/animal.py b/samples/client/petstore/python-experimental/petstore_api/models/animal.py index 106bf5e764..2da7a5923a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/animal.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/animal.py @@ -53,8 +53,6 @@ class Animal(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -67,16 +65,26 @@ class Animal(ModelNormal): allowed_values = { } - openapi_types = { - 'class_name': (str,), # noqa: E501 - 'color': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'class_name': (str,), # noqa: E501 + 'color': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return { diff --git a/samples/client/petstore/python-experimental/petstore_api/models/api_response.py b/samples/client/petstore/python-experimental/petstore_api/models/api_response.py index e7516d6c75..cc3d2cea44 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/api_response.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/api_response.py @@ -45,8 +45,6 @@ class ApiResponse(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,17 +57,27 @@ class ApiResponse(ModelNormal): allowed_values = { } - openapi_types = { - 'code': (int,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'message': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'code': (int,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'message': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py index 7616562253..3c0175acdd 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_of_array_of_number_only.py @@ -45,8 +45,6 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): allowed_values = { } - openapi_types = { - 'array_array_number': ([[float]],), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'array_array_number': ([[float]],), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py index 165e0eed81..28bacd7021 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_of_number_only.py @@ -45,8 +45,6 @@ class ArrayOfNumberOnly(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class ArrayOfNumberOnly(ModelNormal): allowed_values = { } - openapi_types = { - 'array_number': ([float],), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'array_number': ([float],), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/array_test.py b/samples/client/petstore/python-experimental/petstore_api/models/array_test.py index 72418960f5..3c15d79a3d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/array_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/array_test.py @@ -49,8 +49,6 @@ class ArrayTest(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -63,17 +61,27 @@ class ArrayTest(ModelNormal): allowed_values = { } - openapi_types = { - 'array_of_string': ([str],), # noqa: E501 - 'array_array_of_integer': ([[int]],), # noqa: E501 - 'array_array_of_model': ([[read_only_first.ReadOnlyFirst]],), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'array_of_string': ([str],), # noqa: E501 + 'array_array_of_integer': ([[int]],), # noqa: E501 + 'array_array_of_model': ([[read_only_first.ReadOnlyFirst]],), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py b/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py index a25472b19d..8311ed65ba 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/capitalization.py @@ -45,8 +45,6 @@ class Capitalization(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,20 +57,30 @@ class Capitalization(ModelNormal): allowed_values = { } - openapi_types = { - 'small_camel': (str,), # noqa: E501 - 'capital_camel': (str,), # noqa: E501 - 'small_snake': (str,), # noqa: E501 - 'capital_snake': (str,), # noqa: E501 - 'sca_eth_flow_points': (str,), # noqa: E501 - 'att_name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'small_camel': (str,), # noqa: E501 + 'capital_camel': (str,), # noqa: E501 + 'small_snake': (str,), # noqa: E501 + 'capital_snake': (str,), # noqa: E501 + 'sca_eth_flow_points': (str,), # noqa: E501 + 'att_name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat.py b/samples/client/petstore/python-experimental/petstore_api/models/cat.py index fc9ab76fbf..6b4985dc4a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat.py @@ -53,8 +53,6 @@ class Cat(ModelComposed): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -67,17 +65,27 @@ class Cat(ModelComposed): allowed_values = { } - openapi_types = { - 'class_name': (str,), # noqa: E501 - 'declawed': (bool,), # noqa: E501 - 'color': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'class_name': (str,), # noqa: E501 + 'declawed': (bool,), # noqa: E501 + 'color': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py index 4e4c87e90d..00b0cfae65 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/cat_all_of.py @@ -45,8 +45,6 @@ class CatAllOf(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class CatAllOf(ModelNormal): allowed_values = { } - openapi_types = { - 'declawed': (bool,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'declawed': (bool,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/category.py b/samples/client/petstore/python-experimental/petstore_api/models/category.py index 08c3e8aad9..2530a19b2f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/category.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/category.py @@ -45,8 +45,6 @@ class Category(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,16 +57,26 @@ class Category(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (str,), # noqa: E501 - 'id': (int,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'id': (int,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child.py b/samples/client/petstore/python-experimental/petstore_api/models/child.py index 7e5e332f00..8a61f35ba1 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child.py @@ -53,8 +53,6 @@ class Child(ModelComposed): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -67,17 +65,27 @@ class Child(ModelComposed): allowed_values = { } - openapi_types = { - 'radio_waves': (bool,), # noqa: E501 - 'tele_vision': (bool,), # noqa: E501 - 'inter_net': (bool,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'radio_waves': (bool,), # noqa: E501 + 'tele_vision': (bool,), # noqa: E501 + 'inter_net': (bool,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py index 3cb28139b1..f52720359c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_all_of.py @@ -45,8 +45,6 @@ class ChildAllOf(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class ChildAllOf(ModelNormal): allowed_values = { } - openapi_types = { - 'inter_net': (bool,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'inter_net': (bool,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py index 58c0318faf..b329281e9c 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat.py @@ -53,8 +53,6 @@ class ChildCat(ModelComposed): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -67,16 +65,26 @@ class ChildCat(ModelComposed): allowed_values = { } - openapi_types = { - 'pet_type': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pet_type': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py index de70d839cf..1870b3ff31 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_cat_all_of.py @@ -45,8 +45,6 @@ class ChildCatAllOf(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class ChildCatAllOf(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py index 450e6983fc..eaea5cba93 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py @@ -53,8 +53,6 @@ class ChildDog(ModelComposed): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -67,16 +65,26 @@ class ChildDog(ModelComposed): allowed_values = { } - openapi_types = { - 'pet_type': (str,), # noqa: E501 - 'bark': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pet_type': (str,), # noqa: E501 + 'bark': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py index 37d900f2c2..edc47f75b4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_dog_all_of.py @@ -45,8 +45,6 @@ class ChildDogAllOf(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class ChildDogAllOf(ModelNormal): allowed_values = { } - openapi_types = { - 'bark': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'bark': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py index 169d05b513..a038974bb5 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard.py @@ -53,8 +53,6 @@ class ChildLizard(ModelComposed): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -67,16 +65,26 @@ class ChildLizard(ModelComposed): allowed_values = { } - openapi_types = { - 'pet_type': (str,), # noqa: E501 - 'loves_rocks': (bool,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pet_type': (str,), # noqa: E501 + 'loves_rocks': (bool,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py index 6b6f8d9927..00eb136093 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/child_lizard_all_of.py @@ -45,8 +45,6 @@ class ChildLizardAllOf(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class ChildLizardAllOf(ModelNormal): allowed_values = { } - openapi_types = { - 'loves_rocks': (bool,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'loves_rocks': (bool,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/class_model.py b/samples/client/petstore/python-experimental/petstore_api/models/class_model.py index 4f6fd3bca5..f268d8576d 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/class_model.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/class_model.py @@ -45,8 +45,6 @@ class ClassModel(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class ClassModel(ModelNormal): allowed_values = { } - openapi_types = { - '_class': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + '_class': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/client.py b/samples/client/petstore/python-experimental/petstore_api/models/client.py index 398d1b7ce0..1097c624d7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/client.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/client.py @@ -45,8 +45,6 @@ class Client(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class Client(ModelNormal): allowed_values = { } - openapi_types = { - 'client': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'client': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog.py b/samples/client/petstore/python-experimental/petstore_api/models/dog.py index f27e858b4c..54ccf0e390 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog.py @@ -53,8 +53,6 @@ class Dog(ModelComposed): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -67,17 +65,27 @@ class Dog(ModelComposed): allowed_values = { } - openapi_types = { - 'class_name': (str,), # noqa: E501 - 'breed': (str,), # noqa: E501 - 'color': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'class_name': (str,), # noqa: E501 + 'breed': (str,), # noqa: E501 + 'color': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py index 18e9270a4c..316ec102b9 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py @@ -45,8 +45,6 @@ class DogAllOf(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class DogAllOf(ModelNormal): allowed_values = { } - openapi_types = { - 'breed': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'breed': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py index 167f573d45..d997d53fac 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_arrays.py @@ -45,8 +45,6 @@ class EnumArrays(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -67,16 +65,26 @@ class EnumArrays(ModelNormal): }, } - openapi_types = { - 'just_symbol': (str,), # noqa: E501 - 'array_enum': ([str],), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'just_symbol': (str,), # noqa: E501 + 'array_enum': ([str],), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py index b80116abce..bda8183ce7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_class.py @@ -41,8 +41,6 @@ class EnumClass(ModelSimple): and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the allowed value and an allowed value. These dicts store the allowed enum values. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -60,15 +58,25 @@ class EnumClass(ModelSimple): }, } - openapi_types = { - 'value': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py b/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py index c7bef7cc32..5df1bcbc2e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/enum_test.py @@ -49,8 +49,6 @@ class EnumTest(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -81,19 +79,29 @@ class EnumTest(ModelNormal): }, } - openapi_types = { - 'enum_string_required': (str,), # noqa: E501 - 'enum_string': (str,), # noqa: E501 - 'enum_integer': (int,), # noqa: E501 - 'enum_number': (float,), # noqa: E501 - 'outer_enum': (outer_enum.OuterEnum,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'enum_string_required': (str,), # noqa: E501 + 'enum_string': (str,), # noqa: E501 + 'enum_integer': (int,), # noqa: E501 + 'enum_number': (float,), # noqa: E501 + 'outer_enum': (outer_enum.OuterEnum,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/file.py b/samples/client/petstore/python-experimental/petstore_api/models/file.py index eb71f20abb..ecc56b0cd0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/file.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/file.py @@ -45,8 +45,6 @@ class File(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class File(ModelNormal): allowed_values = { } - openapi_types = { - 'source_uri': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'source_uri': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py b/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py index b612ecf317..62a9a4194a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/file_schema_test_class.py @@ -49,8 +49,6 @@ class FileSchemaTestClass(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -63,16 +61,26 @@ class FileSchemaTestClass(ModelNormal): allowed_values = { } - openapi_types = { - 'file': (file.File,), # noqa: E501 - 'files': ([file.File],), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'file': (file.File,), # noqa: E501 + 'files': ([file.File],), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/format_test.py b/samples/client/petstore/python-experimental/petstore_api/models/format_test.py index 7b455ece51..7646127e37 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/format_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/format_test.py @@ -45,8 +45,6 @@ class FormatTest(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,22 +57,6 @@ class FormatTest(ModelNormal): allowed_values = { } - openapi_types = { - 'number': (float,), # noqa: E501 - 'byte': (str,), # noqa: E501 - 'date': (date,), # noqa: E501 - 'password': (str,), # noqa: E501 - 'integer': (int,), # noqa: E501 - 'int32': (int,), # noqa: E501 - 'int64': (int,), # noqa: E501 - 'float': (float,), # noqa: E501 - 'double': (float,), # noqa: E501 - 'string': (str,), # noqa: E501 - 'binary': (file_type,), # noqa: E501 - 'date_time': (datetime,), # noqa: E501 - 'uuid': (str,), # noqa: E501 - } - validations = { ('number',): { 'inclusive_maximum': 543.2, @@ -115,6 +97,32 @@ class FormatTest(ModelNormal): additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'number': (float,), # noqa: E501 + 'byte': (str,), # noqa: E501 + 'date': (date,), # noqa: E501 + 'password': (str,), # noqa: E501 + 'integer': (int,), # noqa: E501 + 'int32': (int,), # noqa: E501 + 'int64': (int,), # noqa: E501 + 'float': (float,), # noqa: E501 + 'double': (float,), # noqa: E501 + 'string': (str,), # noqa: E501 + 'binary': (file_type,), # noqa: E501 + 'date_time': (datetime,), # noqa: E501 + 'uuid': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py b/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py index 26bae108ad..36ec14bf40 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/grandparent.py @@ -45,8 +45,6 @@ class Grandparent(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class Grandparent(ModelNormal): allowed_values = { } - openapi_types = { - 'radio_waves': (bool,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'radio_waves': (bool,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py b/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py index 5d99b80c16..c089ebf9bc 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/grandparent_animal.py @@ -45,8 +45,6 @@ class GrandparentAnimal(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class GrandparentAnimal(ModelNormal): allowed_values = { } - openapi_types = { - 'pet_type': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pet_type': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py b/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py index 593a6280d3..90c4908aa8 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py @@ -45,8 +45,6 @@ class HasOnlyReadOnly(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,16 +57,26 @@ class HasOnlyReadOnly(ModelNormal): allowed_values = { } - openapi_types = { - 'bar': (str,), # noqa: E501 - 'foo': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'bar': (str,), # noqa: E501 + 'foo': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/list.py b/samples/client/petstore/python-experimental/petstore_api/models/list.py index 362ac90e2c..e6816fb51a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/list.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/list.py @@ -45,8 +45,6 @@ class List(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class List(ModelNormal): allowed_values = { } - openapi_types = { - '_123_list': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + '_123_list': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/map_test.py b/samples/client/petstore/python-experimental/petstore_api/models/map_test.py index 475332634a..e6680cc734 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/map_test.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/map_test.py @@ -49,8 +49,6 @@ class MapTest(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -67,18 +65,28 @@ class MapTest(ModelNormal): }, } - openapi_types = { - 'map_map_of_string': ({str: ({str: (str,)},)},), # noqa: E501 - 'map_of_enum_string': ({str: (str,)},), # noqa: E501 - 'direct_map': ({str: (bool,)},), # noqa: E501 - 'indirect_map': (string_boolean_map.StringBooleanMap,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'map_map_of_string': ({str: ({str: (str,)},)},), # noqa: E501 + 'map_of_enum_string': ({str: (str,)},), # noqa: E501 + 'direct_map': ({str: (bool,)},), # noqa: E501 + 'indirect_map': (string_boolean_map.StringBooleanMap,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py index a88a56b5cf..52969b942b 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/mixed_properties_and_additional_properties_class.py @@ -49,8 +49,6 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -63,17 +61,27 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): allowed_values = { } - openapi_types = { - 'uuid': (str,), # noqa: E501 - 'date_time': (datetime,), # noqa: E501 - 'map': ({str: (animal.Animal,)},), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'uuid': (str,), # noqa: E501 + 'date_time': (datetime,), # noqa: E501 + 'map': ({str: (animal.Animal,)},), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py b/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py index 1fabb5e9b5..cdfb0db9d6 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/model200_response.py @@ -45,8 +45,6 @@ class Model200Response(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,16 +57,26 @@ class Model200Response(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (int,), # noqa: E501 - '_class': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (int,), # noqa: E501 + '_class': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/model_return.py b/samples/client/petstore/python-experimental/petstore_api/models/model_return.py index 3466f9d2e6..a145f8e706 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/model_return.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/model_return.py @@ -45,8 +45,6 @@ class ModelReturn(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class ModelReturn(ModelNormal): allowed_values = { } - openapi_types = { - '_return': (int,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + '_return': (int,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/name.py b/samples/client/petstore/python-experimental/petstore_api/models/name.py index 39f9a4719d..e3b0378bab 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/name.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/name.py @@ -45,8 +45,6 @@ class Name(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,18 +57,28 @@ class Name(ModelNormal): allowed_values = { } - openapi_types = { - 'name': (int,), # noqa: E501 - 'snake_case': (int,), # noqa: E501 - '_property': (str,), # noqa: E501 - '_123_number': (int,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (int,), # noqa: E501 + 'snake_case': (int,), # noqa: E501 + '_property': (str,), # noqa: E501 + '_123_number': (int,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/number_only.py b/samples/client/petstore/python-experimental/petstore_api/models/number_only.py index 96c03cef11..6a30356c5e 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/number_only.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/number_only.py @@ -45,8 +45,6 @@ class NumberOnly(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class NumberOnly(ModelNormal): allowed_values = { } - openapi_types = { - 'just_number': (float,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'just_number': (float,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/order.py b/samples/client/petstore/python-experimental/petstore_api/models/order.py index ad4e10f0b0..6e4e8af79f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/order.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/order.py @@ -45,8 +45,6 @@ class Order(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -64,20 +62,30 @@ class Order(ModelNormal): }, } - openapi_types = { - 'id': (int,), # noqa: E501 - 'pet_id': (int,), # noqa: E501 - 'quantity': (int,), # noqa: E501 - 'ship_date': (datetime,), # noqa: E501 - 'status': (str,), # noqa: E501 - 'complete': (bool,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (int,), # noqa: E501 + 'pet_id': (int,), # noqa: E501 + 'quantity': (int,), # noqa: E501 + 'ship_date': (datetime,), # noqa: E501 + 'status': (str,), # noqa: E501 + 'complete': (bool,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py index 6ad00966ea..013e386adf 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_composite.py @@ -49,8 +49,6 @@ class OuterComposite(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -63,17 +61,27 @@ class OuterComposite(ModelNormal): allowed_values = { } - openapi_types = { - 'my_number': (outer_number.OuterNumber,), # noqa: E501 - 'my_string': (str,), # noqa: E501 - 'my_boolean': (bool,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'my_number': (outer_number.OuterNumber,), # noqa: E501 + 'my_string': (str,), # noqa: E501 + 'my_boolean': (bool,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py index 39b104f642..fb040a6785 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_enum.py @@ -41,8 +41,6 @@ class OuterEnum(ModelSimple): and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the allowed value and an allowed value. These dicts store the allowed enum values. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -60,15 +58,25 @@ class OuterEnum(ModelSimple): }, } - openapi_types = { - 'value': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py b/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py index 362a3cf1fc..1ff253f826 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/outer_number.py @@ -41,8 +41,6 @@ class OuterNumber(ModelSimple): and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the allowed value and an allowed value. These dicts store the allowed enum values. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -55,10 +53,6 @@ class OuterNumber(ModelSimple): allowed_values = { } - openapi_types = { - 'value': (float,), # noqa: E501 - } - validations = { ('value',): { 'inclusive_maximum': 2E+1, @@ -68,6 +62,20 @@ class OuterNumber(ModelSimple): additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (float,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent.py b/samples/client/petstore/python-experimental/petstore_api/models/parent.py index d07ca49d4d..4175d7792f 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent.py @@ -53,8 +53,6 @@ class Parent(ModelComposed): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -67,16 +65,26 @@ class Parent(ModelComposed): allowed_values = { } - openapi_types = { - 'radio_waves': (bool,), # noqa: E501 - 'tele_vision': (bool,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'radio_waves': (bool,), # noqa: E501 + 'tele_vision': (bool,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py index 0cfcbda855..1842c83edb 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_all_of.py @@ -45,8 +45,6 @@ class ParentAllOf(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class ParentAllOf(ModelNormal): allowed_values = { } - openapi_types = { - 'tele_vision': (bool,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'tele_vision': (bool,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py index 59b890e891..d98bdc6f65 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/parent_pet.py @@ -61,8 +61,6 @@ class ParentPet(ModelComposed): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -75,15 +73,25 @@ class ParentPet(ModelComposed): allowed_values = { } - openapi_types = { - 'pet_type': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'pet_type': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return { diff --git a/samples/client/petstore/python-experimental/petstore_api/models/pet.py b/samples/client/petstore/python-experimental/petstore_api/models/pet.py index 081be0210e..83b4679eb7 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/pet.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/pet.py @@ -53,8 +53,6 @@ class Pet(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -72,20 +70,30 @@ class Pet(ModelNormal): }, } - openapi_types = { - 'name': (str,), # noqa: E501 - 'photo_urls': ([str],), # noqa: E501 - 'id': (int,), # noqa: E501 - 'category': (category.Category,), # noqa: E501 - 'tags': ([tag.Tag],), # noqa: E501 - 'status': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'photo_urls': ([str],), # noqa: E501 + 'id': (int,), # noqa: E501 + 'category': (category.Category,), # noqa: E501 + 'tags': ([tag.Tag],), # noqa: E501 + 'status': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/player.py b/samples/client/petstore/python-experimental/petstore_api/models/player.py new file mode 100644 index 0000000000..75b3ca3376 --- /dev/null +++ b/samples/client/petstore/python-experimental/petstore_api/models/player.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import +import re # noqa: F401 +import sys # noqa: F401 + +import six # noqa: F401 + +from petstore_api.model_utils import ( # noqa: F401 + ModelComposed, + ModelNormal, + ModelSimple, + date, + datetime, + file_type, + int, + none_type, + str, + validate_get_composed_info, +) + + +class Player(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'name': (str,), # noqa: E501 + 'enemy_player': (Player,), # noqa: E501 + } + + @staticmethod + def discriminator(): + return None + + attribute_map = { + 'name': 'name', # noqa: E501 + 'enemy_player': 'enemyPlayer', # noqa: E501 + } + + @staticmethod + def _composed_schemas(): + return None + + required_properties = set([ + '_data_store', + '_check_type', + '_from_server', + '_path_to_item', + '_configuration', + ]) + + def __init__(self, name, _check_type=True, _from_server=False, _path_to_item=(), _configuration=None, **kwargs): # noqa: E501 + """player.Player - a model defined in OpenAPI + + Args: + name (str): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _from_server (bool): True if the data is from the server + False if the data is from the client (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + enemy_player (Player): [optional] # noqa: E501 + """ + + self._data_store = {} + self._check_type = _check_type + self._from_server = _from_server + self._path_to_item = _path_to_item + self._configuration = _configuration + + self.name = name + for var_name, var_value in six.iteritems(kwargs): + setattr(self, var_name, var_value) diff --git a/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py b/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py index 71ca205291..d2239f9192 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/read_only_first.py @@ -45,8 +45,6 @@ class ReadOnlyFirst(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,16 +57,26 @@ class ReadOnlyFirst(ModelNormal): allowed_values = { } - openapi_types = { - 'bar': (str,), # noqa: E501 - 'baz': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'bar': (str,), # noqa: E501 + 'baz': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py b/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py index 574c3817d7..607ddacbc0 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/special_model_name.py @@ -45,8 +45,6 @@ class SpecialModelName(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,15 +57,25 @@ class SpecialModelName(ModelNormal): allowed_values = { } - openapi_types = { - 'special_property_name': (int,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'special_property_name': (int,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py b/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py index 19b3cd131c..a5425b412a 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/string_boolean_map.py @@ -45,8 +45,6 @@ class StringBooleanMap(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,14 +57,24 @@ class StringBooleanMap(ModelNormal): allowed_values = { } - openapi_types = { - } - validations = { } additional_properties_type = (bool,) # noqa: E501 + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/tag.py b/samples/client/petstore/python-experimental/petstore_api/models/tag.py index 590b234d4d..fe8f0cc354 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/tag.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/tag.py @@ -45,8 +45,6 @@ class Tag(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,17 +57,27 @@ class Tag(ModelNormal): allowed_values = { } - openapi_types = { - 'id': (int,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'full_name': (str,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (int,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'full_name': (str,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py index 71b4719f5d..da0ca9ea98 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_default.py @@ -45,8 +45,6 @@ class TypeHolderDefault(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,21 +57,31 @@ class TypeHolderDefault(ModelNormal): allowed_values = { } - openapi_types = { - 'string_item': (str,), # noqa: E501 - 'number_item': (float,), # noqa: E501 - 'integer_item': (int,), # noqa: E501 - 'bool_item': (bool,), # noqa: E501 - 'array_item': ([int],), # noqa: E501 - 'date_item': (date,), # noqa: E501 - 'datetime_item': (datetime,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'string_item': (str,), # noqa: E501 + 'number_item': (float,), # noqa: E501 + 'integer_item': (int,), # noqa: E501 + 'bool_item': (bool,), # noqa: E501 + 'array_item': ([int],), # noqa: E501 + 'date_item': (date,), # noqa: E501 + 'datetime_item': (datetime,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py index 96b8551dd1..1b8c163986 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/type_holder_example.py @@ -45,8 +45,6 @@ class TypeHolderExample(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -68,19 +66,29 @@ class TypeHolderExample(ModelNormal): }, } - openapi_types = { - 'string_item': (str,), # noqa: E501 - 'number_item': (float,), # noqa: E501 - 'integer_item': (int,), # noqa: E501 - 'bool_item': (bool,), # noqa: E501 - 'array_item': ([int],), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'string_item': (str,), # noqa: E501 + 'number_item': (float,), # noqa: E501 + 'integer_item': (int,), # noqa: E501 + 'bool_item': (bool,), # noqa: E501 + 'array_item': ([int],), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/user.py b/samples/client/petstore/python-experimental/petstore_api/models/user.py index 03b3ef6a5e..62c3bd48a1 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/user.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/user.py @@ -45,8 +45,6 @@ class User(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,22 +57,32 @@ class User(ModelNormal): allowed_values = { } - openapi_types = { - 'id': (int,), # noqa: E501 - 'username': (str,), # noqa: E501 - 'first_name': (str,), # noqa: E501 - 'last_name': (str,), # noqa: E501 - 'email': (str,), # noqa: E501 - 'password': (str,), # noqa: E501 - 'phone': (str,), # noqa: E501 - 'user_status': (int,), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'id': (int,), # noqa: E501 + 'username': (str,), # noqa: E501 + 'first_name': (str,), # noqa: E501 + 'last_name': (str,), # noqa: E501 + 'email': (str,), # noqa: E501 + 'password': (str,), # noqa: E501 + 'phone': (str,), # noqa: E501 + 'user_status': (int,), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py b/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py index a38afa9cfb..8b5096a4bd 100644 --- a/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py +++ b/samples/client/petstore/python-experimental/petstore_api/models/xml_item.py @@ -45,8 +45,6 @@ class XmlItem(ModelNormal): and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. - openapi_types (dict): The key is attribute name - and the value is attribute type. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, @@ -59,43 +57,53 @@ class XmlItem(ModelNormal): allowed_values = { } - openapi_types = { - 'attribute_string': (str,), # noqa: E501 - 'attribute_number': (float,), # noqa: E501 - 'attribute_integer': (int,), # noqa: E501 - 'attribute_boolean': (bool,), # noqa: E501 - 'wrapped_array': ([int],), # noqa: E501 - 'name_string': (str,), # noqa: E501 - 'name_number': (float,), # noqa: E501 - 'name_integer': (int,), # noqa: E501 - 'name_boolean': (bool,), # noqa: E501 - 'name_array': ([int],), # noqa: E501 - 'name_wrapped_array': ([int],), # noqa: E501 - 'prefix_string': (str,), # noqa: E501 - 'prefix_number': (float,), # noqa: E501 - 'prefix_integer': (int,), # noqa: E501 - 'prefix_boolean': (bool,), # noqa: E501 - 'prefix_array': ([int],), # noqa: E501 - 'prefix_wrapped_array': ([int],), # noqa: E501 - 'namespace_string': (str,), # noqa: E501 - 'namespace_number': (float,), # noqa: E501 - 'namespace_integer': (int,), # noqa: E501 - 'namespace_boolean': (bool,), # noqa: E501 - 'namespace_array': ([int],), # noqa: E501 - 'namespace_wrapped_array': ([int],), # noqa: E501 - 'prefix_ns_string': (str,), # noqa: E501 - 'prefix_ns_number': (float,), # noqa: E501 - 'prefix_ns_integer': (int,), # noqa: E501 - 'prefix_ns_boolean': (bool,), # noqa: E501 - 'prefix_ns_array': ([int],), # noqa: E501 - 'prefix_ns_wrapped_array': ([int],), # noqa: E501 - } - validations = { } additional_properties_type = None + @staticmethod + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'attribute_string': (str,), # noqa: E501 + 'attribute_number': (float,), # noqa: E501 + 'attribute_integer': (int,), # noqa: E501 + 'attribute_boolean': (bool,), # noqa: E501 + 'wrapped_array': ([int],), # noqa: E501 + 'name_string': (str,), # noqa: E501 + 'name_number': (float,), # noqa: E501 + 'name_integer': (int,), # noqa: E501 + 'name_boolean': (bool,), # noqa: E501 + 'name_array': ([int],), # noqa: E501 + 'name_wrapped_array': ([int],), # noqa: E501 + 'prefix_string': (str,), # noqa: E501 + 'prefix_number': (float,), # noqa: E501 + 'prefix_integer': (int,), # noqa: E501 + 'prefix_boolean': (bool,), # noqa: E501 + 'prefix_array': ([int],), # noqa: E501 + 'prefix_wrapped_array': ([int],), # noqa: E501 + 'namespace_string': (str,), # noqa: E501 + 'namespace_number': (float,), # noqa: E501 + 'namespace_integer': (int,), # noqa: E501 + 'namespace_boolean': (bool,), # noqa: E501 + 'namespace_array': ([int],), # noqa: E501 + 'namespace_wrapped_array': ([int],), # noqa: E501 + 'prefix_ns_string': (str,), # noqa: E501 + 'prefix_ns_number': (float,), # noqa: E501 + 'prefix_ns_integer': (int,), # noqa: E501 + 'prefix_ns_boolean': (bool,), # noqa: E501 + 'prefix_ns_array': ([int],), # noqa: E501 + 'prefix_ns_wrapped_array': ([int],), # noqa: E501 + } + @staticmethod def discriminator(): return None diff --git a/samples/client/petstore/python-experimental/test/test_player.py b/samples/client/petstore/python-experimental/test/test_player.py new file mode 100644 index 0000000000..b100dd7989 --- /dev/null +++ b/samples/client/petstore/python-experimental/test/test_player.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import petstore_api + + +class TestPlayer(unittest.TestCase): + """Player unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPlayer(self): + """Test Player""" + # we can make a player without an enemy_player property + jane = petstore_api.Player(name="Jane") + # we can make a player with an enemy_player + sally = petstore_api.Player(name="Sally", enemy_player=jane) + # we can make a player with an inline enemy_player + jim = petstore_api.Player( + name="Jim", + enemy_player=petstore_api.Player(name="Sam") + ) + + +if __name__ == '__main__': + unittest.main() From 20c7400d5641a716b27f11cf5d49bce122285c8e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 10 Jan 2020 21:51:59 +0800 Subject: [PATCH 39/82] update samples --- .../php-slim4/lib/Model/InlineObject.php | 63 +++++++++++ .../php-slim4/lib/Model/InlineObject1.php | 64 +++++++++++ .../test/Model/InlineObject1Test.php | 104 ++++++++++++++++++ .../php-slim4/test/Model/InlineObjectTest.php | 104 ++++++++++++++++++ 4 files changed, 335 insertions(+) create mode 100644 samples/server/petstore/php-slim4/lib/Model/InlineObject.php create mode 100644 samples/server/petstore/php-slim4/lib/Model/InlineObject1.php create mode 100644 samples/server/petstore/php-slim4/test/Model/InlineObject1Test.php create mode 100644 samples/server/petstore/php-slim4/test/Model/InlineObjectTest.php diff --git a/samples/server/petstore/php-slim4/lib/Model/InlineObject.php b/samples/server/petstore/php-slim4/lib/Model/InlineObject.php new file mode 100644 index 0000000000..723616e8df --- /dev/null +++ b/samples/server/petstore/php-slim4/lib/Model/InlineObject.php @@ -0,0 +1,63 @@ +assertIsObject($schemaObject); + $this->assertIsArray($schemaArr); + } +} diff --git a/samples/server/petstore/php-slim4/test/Model/InlineObjectTest.php b/samples/server/petstore/php-slim4/test/Model/InlineObjectTest.php new file mode 100644 index 0000000000..46716da936 --- /dev/null +++ b/samples/server/petstore/php-slim4/test/Model/InlineObjectTest.php @@ -0,0 +1,104 @@ +assertIsObject($schemaObject); + $this->assertIsArray($schemaArr); + } +} From 5e5536367bfa98ea065f5b2a1ad42c4156941c65 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 11 Jan 2020 01:01:42 +0800 Subject: [PATCH 40/82] comment out php slim4 in ensure-up-to-date --- bin/utils/ensure-up-to-date | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 561988aa07..023ef246ad 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -45,7 +45,7 @@ declare -a samples=( "${root}/bin/php-symfony-petstore.sh" "${root}/bin/php-lumen-petstore-server.sh" "${root}/bin/php-slim-server-petstore.sh" -"${root}/bin/php-slim4-server-petstore.sh" +#"${root}/bin/php-slim4-server-petstore.sh" "${root}/bin/php-ze-ph-petstore-server.sh" "${root}/bin/openapi3/php-petstore.sh" "${root}/bin/typescript-angularjs-petstore.sh" From 4627c7d5343e97635ce5cfaffb1f8140348b0adc Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 11 Jan 2020 10:48:44 +0800 Subject: [PATCH 41/82] Add Cisco to the user list (#4971) --- README.md | 1 + website/dynamic/users.yml | 15 ++++++++++----- website/static/img/companies/cisco.png | Bin 0 -> 35608 bytes 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 website/static/img/companies/cisco.png diff --git a/README.md b/README.md index 0ae1c63d75..4c0ade373a 100644 --- a/README.md +++ b/README.md @@ -580,6 +580,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [California State University, Northridge](https://www.csun.edu) - [CAM](https://www.cam-inc.co.jp/) - [Camptocamp](https://www.camptocamp.com/en) +- [Cisco](https://www.cisco.com/) - [codecentric AG](https://www.codecentric.de/) - [Commencis](https://www.commencis.com/) - [Crossover Health](https://crossoverhealth.com/) diff --git a/website/dynamic/users.yml b/website/dynamic/users.yml index 909dcddec3..001e9c4699 100644 --- a/website/dynamic/users.yml +++ b/website/dynamic/users.yml @@ -68,16 +68,16 @@ image: "img/companies/camptocamp.png" infoLink: "https://www.camptocamp.com/en" pinned: false +- + caption: Cisco + image: "img/companies/cisco.png" + infoLink: "https://www.cisco.com" + pinned: false - caption: "codecentric AG" image: "img/companies/codecentric.png" infoLink: "https://www.codecentric.de/" pinned: false -- - caption: FiNC Technologies - image: "img/companies/finc-technologies.png" - infoLink: "https://company.finc.com/" - pinned: false - caption: Commencis image: "img/companies/commencis.png" @@ -123,6 +123,11 @@ image: "img/companies/fenergo.png" infoLink: "https://www.fenergo.com/" pinned: false +- + caption: FiNC Technologies + image: "img/companies/finc-technologies.png" + infoLink: "https://company.finc.com/" + pinned: false - caption: "FreshCells" image: "img/companies/freshcells.png" diff --git a/website/static/img/companies/cisco.png b/website/static/img/companies/cisco.png new file mode 100644 index 0000000000000000000000000000000000000000..87b863b7736c9d029a4b9f29ed5cce0e055945c9 GIT binary patch literal 35608 zcmeFZ_d8r)^aeTzLWl%GbkU>tNc3o<_c~g1qeO4fgXoOjiQWaH*NEPtcM>&&L6i~w z9-r@h?q6_!xaB*Zhcl<_v-aL=@BOZKze|LgiX1*JIW7nU!UxMsYk)wHYC#}$@5flc znNE_S2;k2nYe{8E5a?UnlN&Qk;5)6kyoNFepS%LrzMF}hjyTFntQ9=+3L^~9!;LN! zJp5L)E|XNUJwzuT#mn*6g0>V>Lljbe<&0|`N)T0JX$UrQ?x7@Ai6>HfjXVk## zdgWrh;4?Q6i2L<8a-A+C-e0a*R~}ckuz?q!byg@bcCOwsh0qP8FNg6&Vn;ytT2)D; zL#>#K;_vASzeU~smtFWB*CaLw6ho|iExx57Zl+NrY4{zxSH9$F&YTbHBzC+dV7-OG z!gSM55x?tFcHP5~O`M@gNDSaZvXJ>Yp2-=}0M138f|FCxTeB76QwBmb+KLB*i;LKp zv;<{^TA)iT0kH5*AGgvqv5vSxz*U|*tKZ+LXWgk(;}om?F@+`n<1**e^P`MF1A%%S)scU=Rqpwh#@N6vwmvib&e9o zx-d4t%#kVgcXAYh)wVOI)r}wEN*kpJ8)H#?5GYJ}f+Jj7p*odqSa0>z^gwxfh6gDL zdqm6DjQ&Kz!;OQ22;Ux(-m;U-(DL2J=2(G4Uo1u%4HSsfFwUWagroR!nxI$G@EH^fjhK2&dl$T8*jm?s&RbBOif4%he+VgJ1VYXR=mXpU}vRNUKC4 zC%d~fpjj1l)%5`|El{wAI{YFLraEl0x*1;KJDXtftlQ=*V2az5mS%rRNAdP+?7@fo zB9ZfLu7>sc#{wtVrdqmcQXtbA_IB^q73*!(X{K^1M9r5p0%(hg;=1M|QC{UyBxr?T z3bs8x$PhRwh4G~O&kGl2<=o+GGLaeIK?V@WYc8W_`qMm~RXKyXxFi!=GzqyLNcLO& zDUpl#W6ey!zk}@2L4hT3x7Bgj*q|ShDO;ZR|GaD9duGXqz0~2r@48_X#3w>vCd^Uc zuSMXsu;0`FrD~1=Dv|$C3EY;Q9ZzCQ_M9uQ1u+OD!l7uan?}y*_%`G-IvGCT>d}Pa z#c$q!yB%T%EV?qFv*8*y{hkU_0~G{e0WJG_i@)ei$Tuo53vd~$uj~bTw!&MqXsicQ zLr0ii*zo6bLRy&hfzhE_*U*@{6}srzVs8z@HRb==jn4gAshrqO;{9*8x(5qwM#D^H z6Z$oq$)8F%K3rB0xHU^pe$4IJi79K?BZYhPSO9uL7rO2gYFv$^lL~U z7%9zx4O)%^%<9kNZ}ftyLaarB_imRykJKAM8x$b{{N&+dL5|Ph4z295cIV^NcQ@!k_4^oz&e(u=58NxuasA3H5?KILoJ{ZqGZ;~ zmMu%76723T0q2E;I&E1AO1I^Hd^82q`CnAewDpPAVPY<&4SmX5);ESYFkV zBHZ^w_bsSqr#qUKug;S@a5;~T7Op4k|N4Hlr_4Sg?4Gmf{FU<3HmUvlYFzT7nF|uh zIRx2>s}^0lx!3fRAxidAb*O^O%eTJ5={2z#k8X=#2&^*jEoU>-ATaq|Y|coR1yJQQg}4Zgsajwttou1rCb_9CT!bImNe5G4Gt;gt$h|2EV6(fodYtmA#L?qE|} zx({GUnOuk>|85={de-?(P1-Yj>Co25aS=bc4%ZziSY`;^I?n?(v@_&(!(AylpS}$9 z@%tWX!0kJAM@_(9;dHnOwn7L)1;QWhE zdM7E*(1!~Uz^q*-?Hrt#oVdR~Cx4Vx>mIz3=W)^q_pp+AmRE|ijE63FXEZO_`|9fjFA-#?e8iUE9$z6PpK3_yT!(SIF zy(cmojIJj2#Hmzz6@Gu-?azh4#J?&_9D~0ppX;pITgsLPE|aeFvzE{K+b9Ga)Ug7W zv4?`8U+s=|;m2XPV32~%-*O}1Yn)Jx=u(NK__?>jG;kTow`b6Q3g_9dF*UPzfE+;G zDlG1L)H9rFDn3uru!&YYrF$t6!M>MGDWKeLP<#P(b4(Ryo%u<_Hru(IfR`uo8n~ql zPv9OrwJ-O3Ak*TWTAK+{^hEa%EEq^wB|5wGnVB z!PG~KmE4C1W?~cba>g!osI~^X&7ho_Z{aA-JC>D#CAb$PaGhr~3 zkYsPqCv5RkJOQWQWmUiLjX;pflZ6rCv*WE}xd6Spb2py#X@yjlqJSV#AP)pph2Kjj zjt>qEh>Dae-GKBlPPj7a=EE7cH|9)T1FZF`Ix;HJF!g+26Nxj`)4O~_$sa}dT*Wa% z$vA=55E(~0HENlR&suxH81aOnC_H}RO0O;~oLqL>Pg5|f&&)LdbYav6OkV&`*$f(X)p zGd~v?1m~z}C!nfi{yY^EIo?;wg~hVT;S)^068?<1ce#ZSfsj!FdW~CA3xZz24I0rVYqQIU7qlyULmqJ(~As zV~Urd4R{@8hYdz$eDe1R5Z4X-@aAXtcNAB#GR2PKl4uFdI^=iw;H&svI5YLBM~lbU z{-x00Bx^G?@0GB=yWf=aKijnWLr;fZ#lO!NV;FL|LgZ@N`ZtF#d}w=OBNd3`+}b*I zy}MM^aYw3H5DqSWgATjXSxm7S%)CobLKk)crbx%T{!ca8JqQNE!SpDnjIHWKmkw03 zCrsX+i(GGkGudwalz}Sg)GWHp<_~cl&Xx^Qf5x}8uzmgRT_@oq=0s&$IjCw@7OctI zM6{3dBv5W&2;{Br8xUVqI}JkIE$R6>`6>0#GT%U?1n?He-}ow&X)}|I_)Y7s?hd278wH98OLdUu>tR%ZV+;V>II6 zv)kA2*nIbg^%Gl)*qZVUy^i-&erFR__}#vJN}^I!f;v`P6~(3Ta-RPgQcfpGgk4Oh z5N>UMx^{h_sPU}|s6=L8{!%1AwW||-g#?Nb^PP^e9dm^Q_1@<^HK^+MC5)}$3O#pK z%EC&~1uOpAT4dsYK#LkPc74a->-cc^KolHRst09N`=xA=A3GZe#~#FFTgYL1tOqpF zE~lyClNQqt3H|0L5rF-@O9fI?6_P#u7{tvsIck;gq*m;~zHfGwqTO9tQ9%yI{{5r} zAJZgM(B`OdH9@K!h}R3>_V_1)vM4Kod(7W?NCi4r_hpFpR~!U=%4)%FL=}EOqMdw0 zyq;UqY=9H99Hdm(47`RCG;YqwJpP|h<3HZuzr%Q2Agub|qyLAu!Q_{ls@0|gB31{! z%TCA6C?%pT67XGKx`VuEv#3Ug=W%1(T>1V&8b3haKn%RzGuHi;dyQ*i5p;A^=An^C z#gM9D=rk3=X;`M!6_I$}H5>eX{}I5vY-!Bbm3l8xU-#M0km$YbTV}S2ciW5-MNv zjjBdYC= zj9jj((#157Y_2gT0ZKxDuD!I0gXbL>0L|jB!46rhtB{L9!FxH!`x~0nSBiypNJm$r zvTn{A!xO);Z0~iHe+tshR7Ui6fbE>m^6qu2ZsVO(turh()$P;QV?K4bM@PDe8ciys zbg@1x?KMEI5~WnzL<-90CNGPms!nZYXd4b%!jN>+6cC^HT2-rDx&k@R0)TM{MCWCP zW%gfonh|HxZx3?2%nVPP4i1YKU2>_sk6&m*Q^6j_E0b3h4!3&CXLyyh2EOhyn%5yB zx1pmZY-PMkW^Y$kIll_SG}^uL*Fsqz$i}QT?eY%NqLU-VrTidq?*Xm5+tQ_L^Xh(d zfc2h)vqzT0Il;OLK8_dxC;J5qox+uKYwbk=zZNO<6h-kW;I16A1YwtTmmHS7@7U}z zj@gWAKUiClf66O%S4;xH&9QeaOz z&i05U+Hn@MX_S@+1TtOV08n)3BrlkY{FY$TT2Ax&0lf1}oSBIFVL*T5C)?0o1!Y=U zGj$iIn-OwNhq7H*Gy-jGR`0cH{5!4Z1q>OVuPVS32@{7-A``&?y+hQbtNo>#jg@St3__o9L{QxFrVL9^yK_O=axk zAVD<0+vGGpaKEXdw*9f)WvR%nt0EGz*i*x(37l+eHspU(EO&@)fudJ%E$H(*@-1KY z)xcmg(0XT3thz;e#w{UFYGwqcpGG4WZgDmWiLP==0SL-ClA_0G;|#<<;{K2OvS zpwX&k0kmIXai5(SXQ;jxmHSWaVnCqwYXm}$0lv+Gtz33Pv7!JhS&gl{xBw0wR>wC> z@%i_j7Z{k0IxsAg)S0YY)dP-%dGX_#`<-0;N+7J4o5DU##d^ndfbe}W{TyhnvRdC+ zLr6wWZ)*u-B`QY>3$TV{UR1QBCi!gYCRy~(%>CjBwQzqchrx!sc>yNR9I!|`b1nu* z&xMmEx_?ss;-8MYEP#%*cSig|X8xOC2pB60)_Gt*REEe`wjclyH#nl2pLTIv8M_6RDF04cQE4( zP;qHKCl^n)>0jewEC61EkWLOaF3ehYxF|ITwqO3yW!bl}G5a_r89(R`YHM(!hH(nk1iibN*&!cJh>!cB#(VBn*(n0U~!1#jQkz|Q+ z9OHrZlw7sIT&arK$YcU9Rk8Fsmx;zV_$Ii_P+mEXY5^rMIJZ|=^pR`6ZRU%3sM<_> zne9a|zHO64pVzBf@%`pVRg3Zmrq+(Uf(lnRi=;9Z7+Jma_69O9H9!%fkJHM5b^>qES}1`)dBlk zV$=wZxK`5Gn{!76|L6%UtJTtdLxC>!KH*xdH&IjSraZ9nswP4O!cfOQJWSU8W$W~CEC9<%@UC55m(qCQO`V^fw+JzV96}s z)btrB>iY(Msyx#vZ5;>+gqKJPI@ET76>#}H3zsocXCqzt7Ywpzc?Y!|q9eVX@<}vx zx%4sXxHLNSpmEXg67^Pg?S#%t_*uT(z~_GA@zA$AY~w&^WgcaiciUR{28fo(w<}X5 zQytmHzvUS`YrZd%2*1F!vfZ>dnD#JC5JWf2;0_3+Bx^@j!(mSB!(LzcEs?gg^&7-4 zI}pj~pKs~#aJBfLrqiEOmVvk|1kNlU)qtv;&$zu)(4jD3BeuGGbjXH|iEzSAq`XX4 zn#9_x)2fEz@@8Cz-Mw{X1Y@4mq9`d8Jsc!uUFS`$4Qap*w5kC{d9Ay<3=PgHbi*EH0ZuqBBX`4bbaZLd5D@tp3W1Kui>|P z*H<#vfofA8OqU{BXq*WrA9FT-bW71{=u5@I*DoFZY&j=Zvk&T}B&g9c3!3n&ePQ}6 z3{~Asz0PA1gb&M>JCJS&j;vr#arAF5Q18cBtgW=S)bt9@Bk&kGA;8r2+K_ zL4f-WrPsYQZTkMysw(~?_uZ* zX)*TQLWH&pdp1OdDbwiY)coQ*Efo8=Zs9`grnJ13augHj-MKHAmqenp_UFWDyY(PJ z&sP>)*&tW^X5f8kpQ~YY3b62&jcD-Qe{v+iI*sDDe(SXHvMQ$g=T($Zt3VA+7h$0Z zZIr}Qg0-vODCL}aco%gEf^=wuMR+r>YuM%H6=>ectzWXe&o+rc@(dIF-uvc&sj5P? z)I^CS=%&o;__AG)PRZYw_w3knaDxSr=3UX!nY~;$aGpMJ*!bj59ZcY;w=uOO;)wq0 zbb^;nZW0K_f^J+dS1=YrGj|$l7$YRa=BZn@>(G!Vj@g~!HMKM{->zTQQ5uI@p6LC4 zY4MSGEZx6Nk#xt6;@Ea9M?jh|=w@+dv9(`g`}8$?ld4TmzI)x9jO`Gy>;bG&#frq` zqkjXWTs@mY=yy)SBIKQ;em4a*Vx7oOEq6)vaUEjd>9|Bu+5zYU((}{%sgtbaX9Nsp zXSo(mN$w5jK6a^FHSwoM73MzTIFv?U$YmU5XW#YCm4m0t6N32N)`1NI@bF@k{6YWK zXPvc-cf(XuuFC>5Irk;x5A`x}|G*-B1K~w*2@Ms@lj<(qwG6 z^MtPpGrlur6ne??azsPYj2av9DY5QOq>YWbY63)TiTwMqQ|VO1$Y$H)n3YZpVkPSl(V$>mg;w!`+~b{Q+dpG_bx9VMsv=F> z)0`Z`e+FC=J8lu2I=DH9s*Kr4Qt(wE@BELGqj}~Aj}v^4Fpji4wX7=~$5ux3+ygW3 ztG)adq)-AwULI7Hvc11Z;N`UiLHaUIoR|oaKF5xugXkLX0!W}e$K^6`QGze~s_fN1Nn@xw~#-3yp;hPQag z8_T%_qQ5KHu8G(v;62ls=`wsqX?SFROEomq%&EA4YCw>3{bG@o+uh-IF6I3{tasNB zu86G=r=ycY4@IRi{EQN4LONMsvs8N-U&D*f7>7r-^E}Kc<+!G7uh+pIb;cKz6a$-v z)@@12*7ZzQs8}EC<Fppl-98+bADb>D=g2iIfpH6aQ&(VPjJBmHMx*6p0}TV_dBx4~#)*&1 zrcbk%>cn#9ePHR?9A%SEDlS6TK9$AvSiA5_riYy_zzbF;PkdZERHsaP=cy5Fe|tS< ziiMF-unLUy zo>Qo4IG2c@C-ShkDOMKuLhfSJ^?e~n5$~2%=762-A=&XXZ;_gF&68iv>fStoh>V5a zki-^;REMDeYWu$?BGy;PzwL9REwlvH z{&vca1I(ue>wRnkL4-A;*$yVSiN~N8PUufnBhFJ&Mk)tu1ORtn@h0!7rUT-o-yLpD zF~(e?k1-Z?MeI+yhK<|YqP-ma7HgXci*58|n~j=nW_wlrSjyMGqu`dZ^B8lu9o5jK zImH8Wbo{B>Ark+z+OyFw`O%i)%A$)lrM+G1**YwYT&+~x^yH#{)4=5G_{;sqGgVB( z3%=1rZwJK<2FKI`A{aGgP{NGS9u7zL3(v;fF(LUro;Nj??kkfX!R%h4g$Z^FsPszu zPGl^`#`v5Gkvk})WTKhz(B2omRWmhc1YX%MZu#rrNl88d?Mf*n{gEY#1sE)(N7$)G ze;MdGoy!sXH0GTZbphry&8uU~MZ8g`HYT9B_eyhgWr9-TJ9hfOgi(NO&KIt#`0_Ro zINbC4^ZWg1m1f;t!X>MJ@`^FFXG2GH>I`w&p|B0@q0K(7rua{YqU?_TA5>uBeQc(n za*bz0ZasWLs0n$sNP2#x_EKSOXUdlM-G{cPXww`!tt=`q>g>*YhtZskD3S}B-{7|s zO7)D$2GMIxaBAx{Yzx(xd)yvRsn_~JivQV*Jwo%-Gph6P^e13P0O;kc6+i?hASLok z&hPHZm3gnr+Bm?Dna-?GRh+ZRv=`pnuAEfXCp^oSO%AZ-n$1!~NJc$ZO!(LR6WWy~ z6uIkI!hrxRqiNI0_otB}2cFM=3rO>#F2Wez&G8S=9TCUHG25Xk@hyb*1)9QtORPui zWYACJz%m+3{{B)(#lrRVYWxV+(nV6RrtMDIG9jC&0umLks)o2Kb-z0~Ovoq*+K056 zZqF!?Q8L$?ubzJb^X2>ofsI5#!)BN-)?3|V zG-@D2v%K50E7P7*d;S@jRNFaX0~X2F)hq3eR-Wnm84{gdwFS4k(%%}O6Ds*(#vcv` z#I7(uW)@QA{8n9|zf@?cRyQ5lIPVcy`I^PWUmKqeXC`~AQx+>Q{oDmEHnQZ}WWi>M z5Kw@#uRSv!S<=)v)X{etIbE4fRq%;uvr6aJRt=C_k1zD+y9JjSsmFaE5del}Z{03= z3x0X{QiD}ZWJ#M>hKky+gq9kDjp6qp6n<2RG!uUShCzVQ9CiGIxp_I(s<8)l6_)?= zNPD2NizqLvASkrGN>przdaXRf`Yd#NvjCj@KA2@;;Ke~*%V6ELhN@HC(dwDp?X@Jv zBOKMPZ;)?tnjhMH^wNJF5{=%_J#pw&YepRTEC&%h%libBrc@(}>)|T1Nz;U4NPgEM z0h$o;oQt(pfptumb{1qJ^JYFg3C4GSayXrKd)EkW!gBnZ6E%oo^X7qQ$YTJso88Bc z9|P3L!>2A93s9&&e0XF2zkL+gZ`g8QjLun-DG$iyyj&to-_N*!xba3<=|Dd}8j&a( z*Dh&Y!~<<~Tu9#2>-$82mTw(0f+i6%uL+1Blge`&8?p@Js-JcygD3H z{*Mo8)6J99Q!y;QE|}5-OIP#qEOTYv(Q%z25hVKrP~819a8W5;DP@==Y1#% zZbddFcY1SaR6fwu^a%*O$T%LPmpO}q#LWR*1N3@j(}s7_uO3KEAKzsfhVyNY%|BO- zt?Wz*AXx{hSC2rlntrqfw5&s$)^VB~v>^{1v<&#HTEyScv+o?|Z~FhGTFsuVGtSA$ zY@2ZKkJ)K5dXEkinzH0}bv9z@;deMpU1aj}K%ZieHgM7?3Pg+X^>9g)7nu=0v8N&W zQrwYXY;D*7KQee2w%sO&Nb4GUvAspK{=%~XDY*fP7OVzDz&Ot2)NHyLQK8e*7eCv9 z-H2t2aY@fiY;SKoNpd!SMleQvgdZ88B*!V4_!ng%>{XC!qH&bf68{+>KOMA>Y!E4n zMf&$y#ap*~Y3J6wShN&SLXd_0gXVf=J!kC2w9XFz%h4(VwR{8UhXYa;B^TL!+YNH( z*T5+t3rt-=ZJlIcypP_(IRbgk+$GQn-}bfuSZ%yiFRA4xV+W{FKkla7sdn^ufd@5r zP1-)Nl(x8A|Dj)nbX8T!7?C7W0UC09t7SDmh+>q8QF?NmMUMZwLwnJLEzlsjBi*BT zeRb6%=ItIiMw$-zFmk}zdVhZq3)p&CY%Mt|aS=Bo77tdu%55&Fin0d{z5=F_ItM_k zJ$S~K&Lr3n>>7u$_-;SjfixaqZ+|{cKGc39^0@Q0?#wTT-&f5V-k}d#d3{j4_Je)7 zzRx%h?_0qoBce9l6Nc2x$~8ZMh)m`f4J7fNquqSI)b{p*;axG>vSccA>JOqNKn5=; zeT-)D5^%RmbwIJL|C6JsK-T8AT!xx`0T8~u=mAVEupPy$h>Pm|2Zb5PnNs|LnNShn zyW91+>JmACya9cH#2sX&%d;rQzsHE#{-`R{k(_sa)_IQx0BIDDIRWx9$!X5`nf6V6 z^)H)5A&1>{RIT^b^wsBI>jG^^r$?j`Ilv%|cLMSSDj#{YT5vhfTY$$V&T`wdgb>Ey zE__0xH*P-5jE{glgDuJFjWwa-h%Rj_xn_IP#Mcw;%k|1T{^2Xtl|tI%yDxP?C&0`b z_(6Y9dFf}s$HYZq-MXmYybrcsCZ-_)tNi2lz+R)^GhhorExOgZ?=uet^0G|m2q{?? zHPzsVdqm;VWkh6f_rta7e`fFh{r$f!@PBg){8|JiwJjkH_scZ}0(_cYj_e_g6L0H>ngspRmQ%sA!cK!@=hPl^yqgi?A%MaT%F)u0kz_2Oq z>|ck;V*}=IjLS0E<*DNtPEBb)QY2?jOgw}ks6AJqj-DeooT-OAi|g;}1wujyR;w|?=fF<` zpL?!F;v_pKzbyN-F40-jRt#>8Q)*LOQl6rQd64zz{(&7PyX7if47=wlUSzn%DP3eN z`#E~Z{X!t$Zw{;$19XrSOpP4a$a9JuP*&zh|KRA`X6q!B3;Z2!sA%<x1wx#_v_7 z_;jY%E;qHV+&UmcljxbbY*e<`k#9Q|FIO=Out-CaYjG6}N+nnk%Fd^(OvueCixv;T z>2b#;nQENnznU89hpGEwE$dwM*G8S=D~=c4PE9`?qd3}?iHg_r7gOSif0Y5bF4V4o zU{hNCQ(n4Nan3luZL!6*c&p^dQUXQWzDJ@?+ozcHx#r;6{Oid4zg4$c|3LO|PJ#^7 zzLO%M_zVPlh<~Iool|+ptK(ynQqzcgn?+ORl%eLLL;lP={5e8WCjx~=ZcgSd%HP=(V(j<_!p?jEoJ2?_vIaD zCM;i7n87wVUB{<9)2Ndd_j?!Kc=orjibOPWJ(h~7E6*>mt!FL9wDV7teI)x;jF&f` zr|UFBy-ht5eO)wHv`nfWc%}&KV*5Av5e>(I!CRa3r<2FV;N;NP%qh^A6(7cP zgLstpUd4vbG%mmtJxc_oe*{G6mIG&ba!?p)^BFoA2@4LU4Dn-H-I{VqbyPs-m|tn^ zO7Mzi@r3Rnpo)-i*4p0D+sElofemcL7wV(~PngM3kbmmT<~rg`|02;Q2_K(5sTU9q z$|U2<4d2+L$HMl>z{xO~-ztel^hNVNc0&C`o9j?iB^}ei@#8k%bsG{&gF>FZQvIwgSHMe7=D{dCaCoYB0g9hG<)#V7Q7@r8Gtjs;SQWm^S&8D{^|l6L z&Iu^~!su>CyL(i5hnzf$NyxVfd`*~S-C#V05Az4wAy>X@SK&Ec)Lx|MYaQ>ZlDCpO zTj#r7|PQ_fHHxAXQXEul-w++70SbGxPLc!oVZR#YqnSe@bqXB=`0+nIp$I0tdOeR_W>v$W6Hp(fMJSnG_%cwM#C#k)AM zM^zQT#1PK_pc06l{{0?pZQ{x~dGgU-ABT40ncwNJ>+|sxal)s>n1D6r1u6eBAsOaV z{I7ULAO_}#;>p3eKhDo}|I%(*%K~`@)vX>%rTLnpXC5uFOtkbn{)uA7fM|(4zdI3- zUPEx)BH7+3pS*uOSlhB(Xi|8R%aD9b`W9{}O2?W|L>-3VSM%876oSBk#n7`DYERb) zTsVc=&hU9%MH_y3{D3D;Y=KM$UD&^>LqWOX5S+m;TrUWI{HDLQ8JEQPu>lP8@1=;t zb&k41%{qXo085Z>L^;bXU*ljfhv*KIO{KC+Z{fL)Gkcq8WtBfrjHSCmMD zZ#g)9v75RH43z^4(mVBON&}*-t?1%jNd=0OomIYNP!4G_gk|m2eQPkK=woIjlaqXE z0lwh4{!9`ulQf=akB5dvUeQt#;IrW$c6N+_A*H0rt)ew@CCG3AVdrm&`+X&!IM_e3 zp=g%?J?Pc@6*xCJ>21x$nGrD~LOA4f8Ttd$8&HxiHUY}sFca47E#*}WExlSUxI$V5fg#;t-Af=ju0w3>_gn~GOtq5Sf4ItgA z_1-XKM_$(|@!>q?Rsu4?tdl<9bIv0U$1xTuCboRiS^e~9rklQ3z$X|t4ZHd>hY|q9 z8{hNlTO)L)&{NSPWrX?pGms@I>TLWe7FOr4I#y{6o4g{njPEg%nT&ob5I!$AwEroY zSdK>P;0Z$vBW*hONFn2-#Qi`=32Mj!vfsyF_W<{RaMQ3R_ zy}pQjjhNr|!DoB*QvygP(8^%$T*W@)0sB6CW}2p@d+@yM#H{bmW5^a_32RD&I`jX$ z=Q%3#<86VTzjD`CfW%`0dh07d-&Ss4IeJQWUs$;M_%TR6Ij6I!t;8fAiv1Oh-)?<} z1U0k9Qm@(u#X>_1t5`D;5+q;v=L8dDcdjs1A^9;DQ(5MBU!1dqz2WVUN<z z#Lf$Dkq1Z7h8pD*cO^=nmYZ%z0<yayB*@C_Id>eE+8@^2GNK{0Q3980B@iPm=O?h|ID zB?8SJwBE`2XKb8fzcu=Kza3<&&+d+=e+a(dc+&@mz`>qV?M&jO9q6THpnvOla}Zus{${%(Py! zk6e+#>#}rH5Pd;iGwM4(Ud@)bZufCyc}I=X3&{S%1lZfF5-W%YsSbr3MPN1pE2;g+ z(7}7F@)LU;kXK5KyQT}ZZW%hgUgFtItn2*tM$lAuEv~PRwIa$KOca3?mb~~}J+XT3 z^46CK&z=KFUT`@i0aC0EC&Puv(a-{|S?(&}LTxt=(&%LQ=9O(n94#BsW3-GilW^D088 zQ46LRy`Sv0eb>#39sd?fMsp_?%i&f7_%Bz6zqZK6^!K8Jqp{y?A>U)bYumV^#n@~; zU!g^J|D83;+%FED`PO}0uI0PFUsvO7pC5!$676WW1+Obf1#$Fje70_E@pg{|AH5<2 z)iP29-t{WK&6WrCavdPD9g1aUYP-2}+kCFp4(qrg2R`Th%}HdstKeDnyMB%{7*kN^tg*i7*c!Uu8Rd_PhBP45MEQI!R!K-M3o?X)ls~XlSul zAeQaYaPOm*#!w9p#Z~p=-ADLk7T&)i1l1NLr)Gk48J+>P1hBymh@!1AS})t)p?H7c z(MNl__kCK5g~uA%O~Fkg8?3;{)XW<7F|l)8-QfKITKHh5y1viwmx;=hEJlCo-I(aV zGKjrZpxMmIw78Mvl_+>j8e{RpL|nhD;w(J6|8>r1EE4LHy5@V+bfZ^g5rEg}BpDvk zFyMA`8?@V{zWFx7;QS7Udvri&!#^F;Mu=xoUpiIsoi%ZS{+Sm*Wc@37(0tln(SwO_ zut4@L4=T)bDoKVwv$~mH7JROh8CmW?GcBWcObQ`1ifdBb@s?ITzC}yd#;<|`fPBMD zcaEs9Hh=CROW~%#yGiu(*JOwTe-q)K`5B++KEpBf3Kje(0G1=f*$NuDGtol&F(!1I z11Tb>L-y-KCa?oCfCx3THFMDQ%$BANG%E*}`#B|_iM>L@t5NVgdN)=TB2O!aKEz2~ zU+4)y#R4MqA}(TJDjPj_e0Y+}Zi@2nGl;2|-~y1Vmp*kG@d&8w+{V(A)dNLobm0cq ztOZXuM{zibjcKyc0}|f3a|a$=9y}un2H}M;jtsQjyaOO5SvPkp5E|Q--xHZM(smh> zsVI%p;pGKsTkWERO1_yW$ah0q*}&*EPPRi*Iil=d1-;^4 zoS*Rn3_>4dl&Dt?)ap>zPHRTV?FG9KKa6)`w-t>+7Ii zIjXCgXisrI!XO)Woxx9LXo%X{P^V+bNR`#RS|^R#v41(){W`yvFu-`qSQ;JFXwKoF z5Ubfza}2g@{jRyM@>R~iQWzWmX47-W;@33Cn+7qKbLeSJ?(KeYH7n(O%IC?T;xlg; z71L$D2!V^6me190>zNDSX{Sszwi|NZvh=tkH;Kxtx8f9g_WEFMg~rC`!7#@5wtF&t zA1t6Bk(Jq_aVe=Tf8IM95VHO|c*t#TxjuXHw2A;6Fu7y04r2g@!)r~Hn3|-|XGnO< z!SPtrs}Ir~mB_sv6BdN?qv*6^MnAskAL3FBYNlglMeACrU1^3mBcWJ2=~>I`>_sM| zs+3rP$lbSfp9}6JE6;8-gihxQ{`NoU0 z-ts966W0qP!1=RwnVK3(oapvnDEulNPP*gUo05`Jr{=F6PC5X3QXvBj_{cjBBOx6O zijgytdEb>v`t*4pTU*)oJmi}6Rhi&D>_6}?;?hvKsf4Jae6-AbaOfK|qDn^yOljmK|*%%y+El92t{*-gbLLz!hb z2ulb2BchYm7B7KJ{XJ}M7~Zc8RWjI|B6nRj&94!q_(eY^dCL}3OIKfWj^T~)NrdF9Qfh#4df9%|ZPq}XsLi8q%KihreDE5zTN9@vBN zgqSn^$F@NxIS&!zLAIo-@V4~gR%m2qaau#1SAli$XA(cD>g+Gl^w0o`kCzxs_%^2w znVU4XGSuYSWrL~_t=Dl8?+mM7ku#RkJ(k3Qt*iz_C*>$Hgf(#|osp(iCtNzQ*&Z(| zH#M!aRuMd3VOTxY68{ATvSPJ@y{t04+E}w0r-NWruWeN|(D@tmGPM6mX52D970k}# zyWd6zccbIsmV%0jv{u5CIgMSPwGZ@=+u9VgV(U=SeiKr z3Ol);e=%cy>LhUKY5BWmQ+|GbCgprWZz1M0pv%~s%5Auu7w4!(z9{wyYKhg!Gv9iv zry)NVnD9CY_gbK5nohw$T(sXML4V$>O60$j$k8O>u{eXC9M4J{t0H0e-Vk%r$V)*V;o z4Q@)l+$sK5V_k)=*O>)4Zy}N=RBeY&jv~3%abvJ_5;)F( zVqM)OO4y&LvkT5&h&&#znn-uP70=Ldb>$BOj3`drtYGi)Xmtr z0QyO?IoF8?;%q}G$}p>OCO$poHGZeok^QB)nVdJk7HfUYZ)&d8oN{gYH{pFX-0Zr; zmBys8uzEqlcTbYA0E?+v=WODd*(Yj)o1XNGeA;w5rSI_Hm-}*`&eP1Ev-ZqdYk%uo-*LXvk3bi^FZIUDKvadRe`p#Jw4O@DRYWv(^52L zMK^xBgr=-5xB1>THIpKX;Zk-!3!A&&tbg(WBf>B@K;=_nA#za*BvVQtj{>R})v=4U zmvW)MDel{*GC>SIq zP)7Cz*W122&%}k`g&ttQNkDl^TQ3lCW>yYPE-kDohZuA0r61Bad=cW@HT|4U(P`Ef zI^#zgspqItx$Z91`LsX)vQ7~v3Fov&t>7>jTR8rOeWW0OH#GjwTkJFX2c3H%uS*HY7bpulKB&UY2%Wd z-a&h0?svEfsNi4Lkxj=5rTO5v{imAQ+X3>hdA*k?e|~&>JD=12L3or2wF>0x{fo=e z;yWZ|<{ZjQo`B@)_to;bQ0^Z9SnKsEINEboohust zJ@{b6*>o84w}RzGi+3Y+noqY8-5A82@rbj8WPm+b3A@)U+>BXhrlxTya5WTID!$ELo_X9e=A(myHL5gaFW5F@vkE)2A}b zC&~u&SJbqr@(4K+2GHx1$iECPC~4hmaU_wXCf$DH)IpaucOjkG_>lR z7x3ORT21UdgHTRfi86$4clMe7rf0)u%#22xJZ8zKryJ%>(B4mKa{QZ}dJb0%BQ#AdN7h$t^ zoY?jz%rGZFg*_~=j<;&v{p^dY*4MM@$3I}wcZ$`hGFRik@apMmiA*kKSKk67;)Li1 z{`cC!<+p!Sp?P!0Rw2r6&1qqG6k)|iJ@JdQq-dHt zT_+oLmwnkga*e@piF%*j0~<5mr7yGMVfc$X63G;4?>;Ghd(`JS33X6B61*6y1< z$j72#)2hEQP(8mYfvSh#NH7cg_SXP+@4JRAP0hVlxwInIqGJUN>RNKe%1+p#uXfjY z^lMU{*ZRhDX~tilefEYH6#20Z_BFmF3zNq{x2x(kaBm01zk$f^>WUGAlKs1B9Vd_I zMb$Jxt771s?c&esCP{fGr_C)N9AtwH!G~rF;*>nA+p~kAUyOE&b2S`wPr5@Zc}P(c z3^FRu+NB$gJ&cL9bhHZ#{BlNC3=68JGYH(ch}f-xK9OCm(va8D%nR699%gMe@0awSN^aM=gF zU*CFVn<_e6(+l#o@oj!lYJ1a5m zD!?0`*<55@07uW38H?fpyoNP@)Ii=O_kZXTaoHn?@Fx&iGk7LU+7Tz|0{U%ZNOFb# zg}@E1mROat$4cnIk&s_;UPW@MzrjjfgDn63gftyErt z7?DV?hnl`yQ|cwkCzjOY^9xb8`CB=sg*ni32&qitQETb!S!7c2^!c@PBLRysV_}w~ z@y!qL5!$tWcvA-i76DL4x-+v0U*AdcOdH$2YW!|iZS>%a?wm%wefvdwD-L5r%S7Rj z+$r(w;x#|rE?^ATA#~F>7ihP=lw+?uRxS0BarrA3FD0Bc3BvUeUrl~q7f(_*q0LapC~D7 zD6IeNc6eC(VM1g@@0;Z@gCno$Gtwo@j`oC*FGXg%XLoi~5BP6%NSpWn!7@$!-i+Ja zQ4W%cl1%XgNz2Dshz+V9sKIUl12fSK6z!9pm64mG^$63ZTEmeM^w0LP&m;oBy2i6a zd0szYxXx`kY6xMgUy;UIwbJgIx20?t@_?}S3 zOLzq!Vwoukk1+4R`7LaQx`xJ+m&hh^2gPdlFAdQjvzd2BB&l|h?%pRfgV!>U4OJDj zLz%792qe|4eOk7a!_TaKU1J#y0SAcqDmwjrFda#9QZu~4d%?eFNyVC4Z@@G1A0?jD zhbUwNlM|~eZ>4>F;f}R2Zz})EIGN;xbBIt|Lwlw2Y|Y}3ZQd;Jtv1j~>Z(+>I-Ud?N?!_o;%rXP5dB?pz;*^z z^kM)<$@m(Fjg=iMfn0;Sv*x!4OIL!kg-4-=G$Pa7Cen$;8p*n`@28SJ>)nS~cZB&8 ze`jt{ch#Kyb!|R2=?2!)*~*yG4l>KiN^1(pbN&x)Bnq|b55tdj)YN{da9AOplqKV! zeU%g++)sQ~a@UyTQ4c6#Bhm#zFb=eDJOp#N?cOR^7K@ABi!E}TN^_!SnoqWNoEGIKH>)!}&vNBK8F0U4%^e?47K}_i_l+>I*3=wSKqBMCrUh!cklZ)P z@yEP|)~AX3yU$q4QRm%&r_e=Dl%M5QO=?)h)iAZ6_45xV|8D^-B&aXR!LE$5d z>wf75SF7nIFZt=EOHKf)yp-=0CnEC*$d~rms`SwTzMuLO-(hRB_)?Dd$LRtq-C7>= zj2TVh?*eR>sWobWY;*lhw*s~)Q8k&_Mn@=z|G}Zr=T*a8c2tLi!l47^)Ca~izN_Oz zOB<;Ap|AqL_^>hssH>IrO40hVvcx7QzIr|cZN7c+4{zXn2Y#!F@}TnWHH&ayO zEQfH1$*cgj9sdBIgr?KS2WRLwLk~v-AHm#(4`){D7w<~yZGhju`+&$4!@9T9V{(&V zT>sgn>d%%a!aM|yIoK&iE-@0#>X+W)$0nV23^viq>#{q#NA0Tj@i}+VyZ*J2Gf(y2 z_f5QXNK5#A14rLNXaJ| z$Ox&+KU;OAun94D9auZ&6Yk#00JxnR@KgsjQ=s zpFA#phVJx{IrT&1DS#eHKbl!+CVjT?;WW4{FeVmx9d57tAgH-5Zb8=K$0-eS0j8fU z2J)`r1p!0|=rYbX`a{W<<{Obrw>2i-3Yl_6$A0OubGTj3T)^Jqh)l^Eb$7!xWYaMa zuWU)FxBlf`XXh(jRG4|CgPTPIfmV4(%lnT`b5Zw~zf*&SDM89SPc1jbB* zk@BsU6YtE-Eg~#)qG3rTcdF(@~q7Fk|hUIGUpuDYrMEmfKgo;71u%9`~}QFv;+1NhK}Z z{MQwAc(|W-iw?Aq>mc&(2v%RZnwKG+`)JAK10}eaqSIQx#dR5<>9X{KOsr*I6*3y2&=Vv;4B^PA!BEeksy5VRdxvPY=QNcDp+yC_^294p(5NtDgNB3C) z44*Tz?i|EW8SJ0}dThB?m^I=+`t@StO53eBWt;|^bHSWSX#)*_rlRbviwa0v=Qn=a z{jS%{=B#O~Tc+$aKC6h1JjeqY71&xRc^ta!*%Va|Z}ow%zo|#viO$Ur+Dp)O`utr_9&h9yXKq` zsu`X}ZU2BZFCnHzcO~?kjJ#=Ms|W1M-O0Vcs$)p?NfOul*fy*MRugFw@L(9dhq1bV=s#0fySb$Hs}D@5~y#a{BSG@7Gp?3{(%aTf)rr zH&M~bZ%K?z%=MQl9y@#B2q)#892(>$$x<8N)RTSQ?N#21M5rCUf7@6eewI1RJ|abd z#tdn+_-Z(JlQV%m7WaO;lo>AsyY!6wnMWB;1!^xP9XG<2+g3Rmtye_8+%qcPwmx2Q z(p#VgBN(o4Eh+~~`YqFNT?l`0<)4@MZtcsu^7_LO0qXp!C1z&)l;K{`a&ju*L!793 zVFYGW{G(}pI!tX#_Uuz+rk&(|_GqNml%q@T%(7#fz(L6<1^zf@siSs4LsE!bUJmI_ zy7C{v1(GzUp9o=N!weks7eUW;qnW}Yz96aIN7q7o_2@J0Oc1aoK#vzMjZd7^hICyE zuH;h3cJXjYVpii(6O;y@RAet)LwW0g{&(_+yEST5Y%MPd_ICCg%1B?$v^I}UEj$_32CwHPX|Ur$JE2`YQ<_! zHz&nmk6kh+Zm}vTe!pEEG&uafsT`c=oRh$OCD>1r_&X@1`)=QZ&Lkhodh1qydJ@~FvF!2% z#_>yjI6vb|Q~#*=FYSlyG_`qk@y{rOSO0SPLc-zBXNJ6yujU!apSAE0gzGUEBKK1I z8v>h&5Zm(U*6LwIF23U|y}@bKe~#{bCkg%C`=B@)HOfQS!OwINoW@jr(!{HjLv*Db zkl03pNo<^&o~Rx0{A>3XF$5!~s%zGGg$CbaJw)8VITiQ(WCXPYTd#Dm1p0I5`%r|B zmF+4d$f*fcGcG+EOwdI01!F^gEt}WC;@?XPq)+AmD4ywWYVX}#A;)hy{YGDHXH^oS z97j_OeOg2-`nm0SudTj@B@xu|Xv-K(frFXRG>Pbeh3ET4Ko(tu0Khc6=6*%mWQhqF zvD)t_hro-cSEsP)$hGY>p_4mT#kN4w>1p<^;9&Q;?T1?S_-d^264kIPDm1wFSzRodQWGhwu!nt(_J zpQ?J2oAo*(hktMaZ*P<9u_N(%)jYYg(W6C@v@z|(xh83`){B9cI}7(ghPwuw6*`@q z7^ZEMasgADr~O2=fxth7_hLe-10kzFkiKS&SrW+dEsP~NN2c3SkhfGzCQwIg+L{o# zGct*-je}5RU7`0!%L$Qd?^a+}6Bo);S^V9};koM3EXMm-ev{@Pdra^KOaVJ>28vDm zyV5Satmb4jF)?dFqkzZ-xwC~QEbUoTrV}alRg|6MT&3|l$&0jBnVvcKNKm28|GW#* zWs>6>aP$>V%*ox}7pnd5d^GLh-IH_4TO<5I|J$CV*C)1bmU`O(Bc-HF<)%eGESshd zBHB3PTqX@yfSe8ZF#btwqCG4N;#HP%mOt4Pm8nT~2RWq}B9mRedMs{N08LTAbA$&= zP&@FHym{vkE1!JR0>cc14Zi3RG$bWo;pj9m(}M-TTJVpk}Ct znVIbDkwc_T3L+s9;7dgiXw%!+J&Jw85&k@LGF!$2{gyVQ?Vk#>F=Lr=RdPj(u_#6k~F~UWMuxc^Q zuXT?cn`^G1$sWbcw_ZXnrvhOL$#SV@JgTmmKx(566=pZ)ADNhDV z*!1C*tOcam=FglV`gk;X|GVm9w_Mpe6hR!pe@tOx8i%4U9aY6smlUE;8>4CA2-PNg zPHEtLE-BC(6Jnct59!J5%s?NDh5NXzKFZH{dZv)Xu zOpIsOM}rl{e0m@;wxNhi{7s&x{>;CE_mMvNd+efay|Bl}_?{wu_D!M!Jhwv))O9}X zP-F@1`$G3+Vn-02fkJQUl({yAbrX*F7cU6go(5O;>yxu;>P(J0lsSULI`8r>cQK`dmoZ4AA5TP3w|k!*y0-1C;3X6eG)FsF7fK~ zP@JqK#QKWf7g5GSUppxADr~18+sCS+Yqa^Z`1UK1ai;>G2qon)Gk|?!e%gJJVgsF= zxTtH+yNjxM;gx>7Vtj%3bn5GZo@dBn#cE!A18U30kUhltb5ed&;_BDjfJBqWuh#jT z=faXzO38l@ezsS{d?8PkR$v}Fa92b__?{2C`N5V5yY0kd0~+uq25Uhw|k(X*y<6fMOkU~ZR zchOUo&zkZMF;!jNpAU}hz|1a^zM)Sx1j=rsgD*=`>oRH1$)!A>OJ4@$7yfZd+3=Gh z0B2GGQ1Prg5Rv+>$(R>2)qu|=U0wlj&w@zwKBc9JL-p-UCGs3LegE>#1r*p(Oc6K( zVjN6Y<;;LEMtNYnRrKYF`+FHX)=~AP74g0&Upa!e8p=cY7h1uB#SkqD^B-bwW5i9{ zBGI^=4HaG_qdw6;6i;}E!W9_fnr+)E162p2lOKLFX zMm5}-*M<^#6x`J>dRMgDXutgZH3vJ4Ea+`VRqHD_x1W-(&HSDgjv}$779nZr?{r7P+_Y49;)YI&01b-5n zLI^j;P4M$myFM$MNuK^zsenZ@^^9m$04hQ3-&>F?O4hN&wL?gZxNgXyFZ?4@R(vIW zbm1PrJ4dXGD9PUILgz|X?M4>l!Sx(gA$TtKtcklk-?+kWWx0$ceY}T9Ic?~BKIsv& z9D(mgGqHo7uH+m^{i7}#_!ZbHRlT_u9$~>ZfyJ6$Z@|(cQ{fj)|2aoV_(VW`*W!5M z8AgDIbQQBbhejb_v*%wE$eKkq&nFEW1}jE#LjfFa)(z-wkU0yQc{#n0-<-6Z$dkjI zm^9{oy{ma55{w2^Ncu7l&H9PfJLK-=|GH+=W%M0X=e{0=hIFsDIpmA8`}!fiTd_WoA?CR_{lZ z1$X?~mQ7ib{8b9}I<5`J0SM-pRmM8|g*m=!;r!&mq(n$HS^;T#_uRppjC?(>xYd=e zgnFEc%ceNSt|c{p+qs7P**g|oe$#SBjT&>(d@`z2gxF*ixB!6dbOk!k5uElRyNxhO z<86+ady5aF4cc8yN}M|PZz{iiladMC@l4#f3ZxyiDy{Tn)gU8@3l?Iv=!Y?{cEN9D zEjHeul?&iSD3-ALIM1a&e#}YcI%sGEUD&V_@uO}Nwa1i zT4LSXZjRiok!Gz)xlQ^roC1_i*-4_RN0u7&m|-H;Pj1#p+ZH2GyRFiAom=C2Gq5Y1 z7$LmGXrZt<@BF)>XNF8u634Txo+rH|+MYVdSl8J=dpPwo5!JAtMs80h_(P zPnkB=RUamal2YDK@B`&3S~Un>uukPdiu7AGpgpp&jfYmQjTe!WQsSK~(&`%ZZO0oZ z@olt(Lt^+Bgz2Zuq@AugxQk(4;XI(Y?bw9c z&sZhxw_QrTU20!OtHX`{7(j{cM2m-|`Oe}QXO`XA5fR8&z;Pzyws2s$FrHlAJNY)N zYfze<kn!Zv!IrU0Io#-`x*U~BAWtlWCTr|s#~@|wCAnsT3TuQaxE>#C~{fD z)Y~);N-JaR+fRy$wFbuo8k&i19EibcAd%uhzg@(%B~7+C8o5b%awUPtbj+u96n7Q^ zi}sCtagB@a`OH6KKc#U{Q8*8qsJ^~rXS-Zxm@i6>ud1cBHVBdMyDhlxfTpeW3zaa1 z=HjIgEuikzdV3pQ*tF0l*hcZ(kYbTPg6iKVF=Kolq&L?r+~^f%;QGnV}B~bH@zP>zsVB~s&aKe%xL^l{A&Ug~qWM|39Vl|YNG(&U=n`A(+Hz)hgYOB8)j z?0{7=IK3RX%T#bXq>@EK7^upLZUil(Y$y1FP?V)^SZeyggS1d0dQ94^pCpKw(Uz!o z9d=!eyF2~#KVu%%!;LAe(;wlYk+X~1=oKBAl;^!7h-LKWxo3XQM6*lJ&c@7m5JW0< z6c2`&LSOmuy^c&1cQt(Laxxc+80>;&YvC3a(p5+2JO3!gpMtDaG`Z9ya+FQ)@N$-J zf;P)fC4n;>16xcGwTn(k`-DAZxKkAC6@p`jSX<6dI>xKQZ*$a6TKCi?O$SQz`CNc8 zF2Hggi%9gHf*@I&a;l?1P*6%~{YRx0Q0*tLGZP81Fp zO$sBa4o!-8U!r0t-P*`YFMN`qPY|xK=u~(5Bv*NWjGZQLod)Nw4gl#d>w(65Zonar z*KBNCr_KreL0n6yvju`!kq`uv5kQ`I5JLy()%8=0h*d(6UM>fL+Kx9$`M^y;ZnFT-grscNK2EKudR~wH zCQ7rh2gz<;)sXL~R4Bv< z7eYo6+h|KK?mnibeU}rwtII9%88*I0hEDH2K(N!ts8D;w5X<~2WxB{2XfQu|c=B^_ zR;d7E0DbFFcYz?lP0zDD?$7gVee5szol}QENXt#4v%0pV)95|hPlG3YO~iG>&`cJ~ z*vtX8HFTzd|4nSsCmsI6$tix}wAMN4WEM^fy}*;5n#5AA+83ce)*&+Yf9>_xN5PF; zi9w{hU?1fjb&eNg-9slMpm$iV-j&DZwnW=mPXXgZy~e}RZg~dpB`3$kpNr)2meC5ARGX3QUQBK}1NJGw_`U}c&fp4> zg}F&b_pV}v>Ntl-FW2Gb=$Go1x|U4F;8 zQEcV2y5I^JwV~V3>2nwYqL^QHi(ZOx0K&xHx6J%(DwOe3x!PfH^T=gd>&+#b$+JfS z<;7Vi3lN&lq%R*lU>@w_;06*F3P)mguzDp2UX^9NzV^N_Kc&gLkw0ejb;F&+HV17& zdq-Xx3{*ciMW?6yyunHx5~!PGE;OL=sf6S9)@UkYn~dc}+b2r7^c_Hp*H>poqZ=*)K03i(u3*biJ5C%U4fdm6AT zLKU@+{C{RnO~pl*#nnZwzL4s_$6Ky(`Rmkw{k;(K%s^2g^}g=su$}%UbMZEiU?Ui( zoUbLh%;9`cnbx^60z{`IPJyGZ9tw7kO)ZQIO~*VQ*RPU0R1~@54PF6>DGW6O!5eI@ zd49_0W#A%}0=XGYuSy}GOtrY4~bUdpN!(H&Sax~jpwYwy#?{${ErLFe0bDg1VvDjzu%()AD>0uxm0U~ z*lCp9N2}Snm6bGOMVAV*cey@qfGE)N@CGJNi3#8Ejc1j^@#bwgtV-UjOl<(7!0ZH< ziXPX5TpjY0PK{L}D6Z3h^pJ}Cv5uqSzuwWDa3C8OF!D=Le`8!_sZ5vRm2V-X9)WGR zkzHEK%&4N#$>QacRKEa%E;*jTGpppzbkrZhKU3>?Huk3600ZBLmaMW{m+Fd$y1{mC zWqX%teJr(0UsFK!`0}o8BbyFW>yRS3(~MLbe?@5B(q(?9^VvSg5>)n#f@SMLsM!^sKML1Fin!&W$=&Hp1oo+;(pY&%A2-w6h1%27qt+a(-qWubV$= zN97R^{I@3>Qk@0lDfEeWbt7(KKBe7jPreQ!E#Cj=Uqbn%jpLnw|tQ=Fh1&k)Zr0xjuzQ|1*N7L#i-uGmYK5AJp0U$+Z6K4MeG&o@c!r zIOA{8GurB^9JhH`51kVM%+;YzFX9bbw)pws4bQk{A6GBj{&7HnBBOo%LHK#@KcfAt zg{v*lKZ2Sr3gwk@jcTiePF}n4`KTI^$-|erw5Sj50?4SZUM;#5^Z2E|GgM>y+3lIM z9*Lyd;>;3(;uP_he&KepXH}BX6I|EW)|m=`GDPpzZI0xwDJ61 zwR9O%pZoa{z&D08)vl>zDXp)$pR>i@ibQR|C(QK)TVC%T`Q)YgB!k89%eF4aF)hvD zx&Ku2GcLAEuksZDj)q=Vb98#I7IzRm?tmR?^zyvAnZNQG%YjOG44~UH16FK{XUKUv zn?R0x{S54~%|dRqlTW3Y&$)s$joq}u^!Ri@)h-hFAQ>g6b|*qBwmRqV;lgIfj4ani z8iPf0FfSKah|`)BVwv$(<&xnfAyh5J*#jUmWZZB}%DRH|kH8%~AaXu9YgA(J%n_WA z@euOL2uAW;JZK!fuqTgHcX?22xz^USIhkRtKo-!}X)+&G)vMUF)tqc|a@ymkL%FoK z(2KutxWbMYbbacj4A_>5lZyEb`a8*=2=eYaJ=-A^UJK264d-vIO{c=#OHLPm@%vf`+v( zj5}LOHhC^4R#tj8ap1QIW3swoB8dC*goJ>K-cYD&vK$u3hx*jnM! zTP!R?mG_uX%3=Zjb8>>kV!$L~2&jCGpvHodHs0`^^xjW}(?5CKgGgRy*)(u!i{D!d zKl)or=JQD!T382lvw#T;hH{t11glrVct`WJZNvMUgtFN%Wfa9Q0v$u`I!+@drU#3p zJy|F4armJN7EaH19!?4~{VtG-e+LMhLODBn3V55Jeo(qOQgd73M!DrpTHrpvz7~E& zMHNHL9c-%T8_@H^x?~iU1||IFezsq96@RAs00S@VOpQe&2eG*H)A)W? z^&FWSD)i{(F)pS%O)K57&=SN;$=zR!mYo1z5ianYrLzExPArx|(9b_)J_YwWY4WOp z`$gkR8-$0>_}%V=6g)eC6*PlIls#2RV2th|1!+_sN(6MDpqA|V3U}f* z_kl0E*`c|s!ntpK1leRn2%68LjBSVQ!o)p5Iui$=s69Yc(qi=^nn3UmCZyVxYKewG z2=(iXv)nY%mb`1?6P$QdC|zoZ zY1?H2%^(s*jpdi1XOs3WR{!hjkyLPQ3}&z+py6?zQ~23UgNSt~3PI3U7L=SUqv=?n zF319i?uUsU(EACkMQffjhBPE)Kg_JWv(C3C1ap4 z$SsY5dwAN$#cb6FB`dpx1N_`4sOz~?6RuDY>~du7$O-8gdHH2t6@m`2A%JwwGlMMG z%M&jJ9s|1EjOFW$$9Z?JIFq5$IP`?ScJ@l{ype^O=HF3_Ri;M39VY{X?Pd8!PAz@MUyuPt1nf)M5543sTk*ox*c~w zWkc%8<@q_MW-Hf!Noz^|c!PxUC6Gn<*@7X?Q$=YeT*GeiXDjC zrQ&dJbFOtFkC2jb-MC_l7}dA>9o^FubYY8kml?TFUL_ZGpX%>-&!wKee+?h8e#QRf z3U@JN#D=Sf@ZFW^;`{1DJF!uYCU2Bq%lh$4Cxcr&1nZec#MXaErRY3fU+f765UO`v zz1Uv-iehK2^|7GKX6@t^NoN%yrJVA<=Ju=P@hR2!sqU{Rv!L*hF_o~{{3ogr(o+B^ zINS}3mQzA|6Nj9G_V(p1Il{wX`j5tsDc)bT>1o^pwMAu@k<2 z7!^LC;Vnb-+$;_a9Wb}|9a*eANBN68BGAWwzV)>}08j%6)z@%+?`exnNKruPRw((=<5qi&j%-{-eXE*sah=zYcHjILnAy=5L_ zvcQ1idJVdR5&$30}|QHYp{W zvSc;F43y3f+{TgFACrH4Yb3p9Rzv-7@WYSg4XfaX254<7GlwQ}=>7X=CyofJIs9Bi9{oeOA2KaQBV z_(sJ)mKxPg84`(rRI?lE({4Kj)VQso(oJEPW(gW&RCD*$NOiWQGVBuxNH>gEl@09& zbH+xs^yBMX{uzw_N>4RdVcJIHV8HYUbAY$f~x0StV%Fljr!`6#ou~lQDvGB$#fQ%{l;7JS7 zd3n}iG4_cncy<#+nME)YH=OLbRt`AwlwC%B=bFyP60cf$dZS!XY?~N@rLbJwxD6$5 ziS5e_2W%5k;fv*I+GW_aRA4yCl+&*?{D^);&#zgbp)XhaluDYi%P`yKJqmJ~?K}%v z>p!GDu7rPRY0Er?yiM%;(zyJ-Nk_hzYYLKj?fMqUb^6YlQMY0*#+x|YCT{heLLQ&b ziU&Eb4*UA*&KF7JOv$v83T~42ZM94AIm3e&JNV1gY*kU_3BaEpD@jKBo#ZaCK*dH$ z$uhFEmETdISNek#@{j_lNHRmzQv;^kYh>PM@k3tc52wh}MN_zay5)MZ!Ds$_rHW z0W&;{sQcxrou}(5%V3-j?5D$DGQ+syav+;I4Sc}!+qXImjlro*y}z)^3iw&J^Im`a z-w8aoDNos7sh1IQa{9^~{Mr@=h9hc-)ya91bWmHa+SwrDifS5D8XOub`^imwLHOee zvrPfP_sMsI-!-(}5^n3Mh~sKkL+c~lmY@3s?zmBl4KBdK$GjxnM2 zYF@pMj3-uQeDqd`Y^zr#78Q;)in7ca+%1jzSF)>qAnri7$m07vH`${8yy4AKjKwu^ zbxP~K>|Y)d1bY*T$V}i;leU=Ya^UprkBbPLU0mF_yt11tQiF$UmLIRA_XlJeeq~&q z^wB;K&t3F`cp6nj;?X##@WPsx`Q-F^P0=yu6%0E)iNm^emDUCyf6aeXz&Xj$+^}YC{A=;Lw^h?+Rl|telJbi0bvR!zVt-)#hl`V{KSJ7jx?X2_rM*RV0Sg>B$_HE5*Qd@9geqL# z{#{f%rfIQz@R!}dWf0LC0-UqM!Ya|TiNM?Ub6dqg>aMy^87U_-&V9>O?^!)-4ExX# z)Dj%V@FD6LYJ!&m>c_V&fdg4z!L08dotNgM8o3vleVM#9SZBKG8WX!v+{}>E*~n{; zO+)^Qq^eMjgJ*5{J}tD9#ODO#`7;|4rdKZl9#mr;7<%tuJBJ1JN!rpY<;B#sMPNsJ zEq*%ugHw}~@n#@~^B}}LmIj3RZ@NGJ)%}VieN#5Lv`5ipW;=JS&ZLK7loD`5lCQ4Hpf$+h!C@qqw~ldBT_IX|Up z{Kuk(6GfW18VRsn+tf&a!!2ycr}NaE%vBH{tX<=4%8}W*l3@qPY@cq)M z`g(KUuo@dYG%YY6I;4aEMF=WN$|?>7R~OWKLC^T@1hF(*c@ra)mCX~HWZZ=n*Wexj zeO&!;D$e&lNoIerR_WsJcmFyj%|DH7(Z8V|+i}?8y*>H0+#Ki>?X94tYb@{+L8dQe z;S7yI`>FP%>*zYyset$3(>jL>72-E>Nv_%a4=EZqQPYL{IdINvaCS}Y5$(U{Gi9g6 z;ncF>Pm>ffMh^_2ox2JlXN+$ScTLP5ZNF7Tj8;tDqTxAcB<`Z!r)SHBbJE296<@&} z{O5W#6%Svi8|U-I?dx|yGfB68_ltzoTVYmDS3G-D`s5nrRd)N(pKI}J{$9&>`h{9o zdXf%nC)@s)Af`3oZeM?@FRNb??dwZ3hHB;5bj5#mXk0Hsv{Onb)HJK6chgF+k@Ncz zSScqxNw`p{>)>qbF|$g%ihx6a>^JaoE??t%eB@BGij-5=!k-4qe69JG#OCncgD&H_ zufV5I37Hp|_D!iQ(t>UAn%j&t^Bf>UP5S+9^CLo-^noke+eOQss+haM4#Lvm6qhM3 zFFYO_p_$0KfRC0;)1eUmY=h1LPOXI5;jYPdB{MN)CWk>4y)ki4!98aFO-w`S_P)?+ zt-u?WD9w{Efdk^;pvuasvGRY#Sdf36l)d$9kgumBC+e;6_gmdOd%M=_d787)N!)*L zej=3N_>Bv=O6A~3b8geG()Tah*%yyh$R!#He1RW6YZE*YG^%OjA84+t_N$^4qvLZW z{KN2hH~gekQJ=$}4fiO@VA$u3xIsf>!{vNQiCLb1N4)7a(%)xt4MS%h%Yn4}w$YH( zc3G9JY8pLUww=r=F6@Yw4ZDe1827;FEuB9ZymaLY-`R_G-$gvEgKdk4g%C)!W%TcF zbX}YOQn7ZA6I6z|Al(blIibagq$V}Tazon?M4Yb?Yp-TqpD$4CqaBSz!RtOXf6gKp zX9|<0K2)oEyU4;nScB!iZn4BRkHk(&-t^+-eHVvyn;s$)K?zh1NZFcZ+aF-1jOUs( z{#iijKYn^NMA++<;`dAD+9DSD4y)?fq@%6otnQ-XKXO|-ec})Rju{HfRY+Yqp1Kg3FsZ_LO}gBvk zNHQaP%8z^dw!cs=)QOharJ3yDo;l)@CV${zfaF3(4> zj55vB7qhxEM#!bgC-A0Pa`7MzzfLk$X}%a;)i^`F`C!QgyJ+jzw206sa)|#&qkmDR zN&$!j598-vr0Q#1ACbN(F5(tpC+}4RP*!#P^YwIes5&#RWuFQpJA8*T67OJt*^JoL zr@lLO;xD{s8uR0mySU!h!4&mrM#*mg5Ue_85{o@k^|D{?Ob#P zhx%^ckfH4zd{&@ILJQ%8=GtZ4i`RR?)g5oo#umem9mZEozKd0SMt$vkkh%H-Aztr% z{HVQ*=>-xyQ8xkPmY`qlZ6oEzy)q$O)m-cI0INN3rPjL!{JPrb9|g=>30}OD<$n7s zWR5n^gW{;FT#_BBC%fM|s^xsUZ|J?g36<6UoQP&$VtP_TQ5F^p7Va_&L%mg3n@EXgfGfl(jOf z8XRE^JRXXl?@kQ)=1;%flcq#&KdI|LycqJgV!QM{UenXyLH3)`Ax$cJn;z_E7KHXp zVEmM&nKWbz93-xaL+H6ZoyY>&}W>Dl$nhSXR4njf>U*^kAsF;)+Z z-3a5aJi)A=A+!V%v^35i)SZnDoK5(Q98JIv0w+7iTNZX+77iX|P7XdUUOosH6FWN} nJA0KHHMp_w{|vCPGqy1G`2Pniqhu6=0SM3!^5T{6^#lJ0m#-Bh literal 0 HcmV?d00001 From 78bf3adc4a470d6d0e3945d40d6e7fe6b2230e5f Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sat, 11 Jan 2020 16:20:47 -0500 Subject: [PATCH 42/82] [core] Initial FeatureSet structures and definitions (#3614) [core] Initial FeatureSet structures and definitions Add default feature set to DefaultCodegen Initial FeatureSet definitions for: * ada * android * apache2 * asciidoc * aspnetcore * avro * bash * c * clojure * cpp-pistache-server * cpp-qt5-client * cpp-qt5-qhttpengine-server * cpp-restbed-server * cpp-restsdk * cpp-tizen * csharp * csharp-nancyfx * csharp-netcore * cwiki * dart * eiffel * elixir * elm * erlang * flash * fsharp-functions * go Client/Server * graphql-nodejs-express-server * graphql-schema * groovy * haskell * haskell-http-client * java * jmeter * kotlin * kotlin vertx * kotlin-server * kotlin-spring * lua * mysql * nim * nodejs * nodejs-express * objc * ocaml * openapi * openapi-yaml * perl * php * php-laravel * php-lumen * php-silex * php-slim * php-symfony * php-ze-ph * powershell * protobuf * protobuf-schema * python * python-aiohttp * python-blueplanet * python-experimental * r * ror * ruby * ruby * ruby-sinatra * rust * scala-akka * scala-finch * scala-gatling * scala-http-client * scala-lagom * scala-play * scalatra * scalaz * spring * static docs * swift * typescript --- .../openapitools/codegen/meta/FeatureSet.java | 530 ++++++++++++++++++ .../codegen/meta/GeneratorMetadata.java | 72 ++- .../features/ClientModificationFeature.java | 42 ++ .../meta/features/DataTypeFeature.java | 240 ++++++++ .../meta/features/DocumentationFeature.java | 42 ++ .../codegen/meta/features/GlobalFeature.java | 149 +++++ .../meta/features/ParameterFeature.java | 77 +++ .../meta/features/SchemaSupportFeature.java | 70 +++ .../meta/features/SecurityFeature.java | 77 +++ .../meta/features/WireFormatFeature.java | 50 ++ .../meta/features/annotations/OAS2.java | 27 + .../meta/features/annotations/OAS3.java | 27 + .../annotations/ToolingExtension.java | 27 + .../openapitools/codegen/CodegenConfig.java | 5 + .../openapitools/codegen/DefaultCodegen.java | 63 +++ .../languages/AbstractJavaCodegen.java | 22 + .../AbstractTypeScriptClientCodegen.java | 21 + .../codegen/languages/AdaCodegen.java | 34 ++ .../codegen/languages/AdaServerCodegen.java | 32 ++ .../languages/AndroidClientCodegen.java | 32 ++ .../languages/Apache2ConfigCodegen.java | 18 +- .../AsciidocDocumentationCodegen.java | 11 + .../languages/AspNetCoreServerCodegen.java | 32 ++ .../codegen/languages/AvroSchemaCodegen.java | 16 + .../codegen/languages/BashClientCodegen.java | 26 + .../languages/CLibcurlClientCodegen.java | 26 + .../languages/CSharpClientCodegen.java | 27 + .../languages/CSharpDotNet2ClientCodegen.java | 5 + .../languages/CSharpNancyFXServerCodegen.java | 20 + .../languages/CSharpNetCoreClientCodegen.java | 26 + .../languages/ClojureClientCodegen.java | 21 + .../languages/ConfluenceWikiCodegen.java | 18 + .../languages/CppPistacheServerCodegen.java | 24 +- .../languages/CppQt5AbstractCodegen.java | 20 + .../CppQt5QHttpEngineServerCodegen.java | 5 + .../languages/CppRestSdkClientCodegen.java | 25 +- .../languages/CppRestbedServerCodegen.java | 20 + .../languages/CppTizenClientCodegen.java | 24 + .../codegen/languages/DartClientCodegen.java | 56 +- .../languages/DartJaguarClientCodegen.java | 26 + .../languages/EiffelClientCodegen.java | 28 + .../languages/ElixirClientCodegen.java | 24 + .../codegen/languages/ElmClientCodegen.java | 23 + .../languages/ErlangClientCodegen.java | 23 + .../languages/ErlangProperCodegen.java | 26 + .../languages/ErlangServerCodegen.java | 23 + .../codegen/languages/FlashClientCodegen.java | 25 + .../FsharpFunctionsServerCodegen.java | 26 +- .../languages/FsharpGiraffeServerCodegen.java | 4 + .../codegen/languages/GoClientCodegen.java | 28 + .../codegen/languages/GoGinServerCodegen.java | 22 + .../codegen/languages/GoServerCodegen.java | 22 + .../GraphQLNodeJSExpressServerCodegen.java | 22 + .../languages/GraphQLSchemaCodegen.java | 21 + .../languages/GroovyClientCodegen.java | 23 + .../languages/HaskellHttpClientCodegen.java | 27 + .../languages/HaskellServantCodegen.java | 23 + .../languages/JMeterClientCodegen.java | 26 + .../codegen/languages/JavaClientCodegen.java | 6 +- .../languages/JavaInflectorServerCodegen.java | 5 + .../languages/JavaJAXRSSpecServerCodegen.java | 17 +- .../languages/JavaJerseyServerCodegen.java | 5 + .../languages/JavaMSF4JServerCodegen.java | 6 + .../languages/JavaPKMSTServerCodegen.java | 5 + .../languages/JavaPlayFrameworkCodegen.java | 6 + .../JavaResteasyEapServerCodegen.java | 6 +- .../languages/JavaResteasyServerCodegen.java | 6 +- .../languages/JavaUndertowServerCodegen.java | 5 + .../languages/JavaVertXServerCodegen.java | 5 + .../languages/JavascriptClientCodegen.java | 7 +- .../JavascriptFlowtypedClientCodegen.java | 8 +- .../languages/KotlinClientCodegen.java | 29 + .../languages/KotlinServerCodegen.java | 24 + .../languages/KotlinSpringServerCodegen.java | 23 + .../languages/KotlinVertxServerCodegen.java | 23 +- .../codegen/languages/LuaClientCodegen.java | 24 + .../codegen/languages/MysqlSchemaCodegen.java | 16 + .../codegen/languages/NimClientCodegen.java | 24 +- .../languages/NodeJSExpressServerCodegen.java | 22 +- .../languages/NodeJSServerCodegen.java | 19 + .../codegen/languages/OCamlClientCodegen.java | 23 + .../codegen/languages/ObjcClientCodegen.java | 25 + .../codegen/languages/OpenAPIGenerator.java | 13 + .../languages/OpenAPIYamlGenerator.java | 13 + .../codegen/languages/PerlClientCodegen.java | 26 + .../codegen/languages/PhpClientCodegen.java | 17 + .../languages/PhpLaravelServerCodegen.java | 16 + .../languages/PhpLumenServerCodegen.java | 16 + .../languages/PhpSilexServerCodegen.java | 16 + .../languages/PhpSlimServerCodegen.java | 16 + .../languages/PhpSymfonyServerCodegen.java | 16 + ...endExpressivePathHandlerServerCodegen.java | 17 + .../languages/PowerShellClientCodegen.java | 23 + .../languages/ProtobufSchemaCodegen.java | 11 +- .../PythonAbstractConnexionServerCodegen.java | 6 + .../PythonAiohttpConnexionServerCodegen.java | 27 + .../PythonBluePlanetServerCodegen.java | 26 + .../languages/PythonClientCodegen.java | 24 + .../PythonClientExperimentalCodegen.java | 25 + .../codegen/languages/RClientCodegen.java | 28 + .../codegen/languages/RubyClientCodegen.java | 30 +- .../languages/RubyOnRailsServerCodegen.java | 21 + .../languages/RubySinatraServerCodegen.java | 21 + .../codegen/languages/RustClientCodegen.java | 28 + .../codegen/languages/RustServerCodegen.java | 29 + .../languages/ScalaAkkaClientCodegen.java | 28 +- .../languages/ScalaFinchServerCodegen.java | 20 + .../languages/ScalaGatlingCodegen.java | 25 + .../languages/ScalaHttpClientCodegen.java | 23 + .../languages/ScalaLagomServerCodegen.java | 19 + .../ScalaPlayFrameworkServerCodegen.java | 25 +- .../languages/ScalatraServerCodegen.java | 20 + .../languages/ScalazClientCodegen.java | 20 + .../codegen/languages/SpringCodegen.java | 28 + .../codegen/languages/StaticDocCodegen.java | 12 + .../languages/StaticHtml2Generator.java | 12 + .../languages/StaticHtmlGenerator.java | 12 + .../codegen/languages/Swift3Codegen.java | 18 + .../codegen/languages/Swift4Codegen.java | 23 + .../codegen/languages/SwiftClientCodegen.java | 18 + .../TypeScriptAngularClientCodegen.java | 9 +- .../TypeScriptAxiosClientCodegen.java | 7 +- .../TypeScriptFetchClientCodegen.java | 5 + .../TypeScriptInversifyClientCodegen.java | 6 + .../TypeScriptJqueryClientCodegen.java | 8 +- .../TypeScriptRxjsClientCodegen.java | 8 +- .../protobuf/ProtobufSchemaCodegenTest.java | 37 ++ .../resources/2_0/petstore-vendor-mime.yaml | 18 +- ...ith-fake-endpoints-models-for-testing.yaml | 18 +- ...ith-fake-endpoints-models-for-testing.yaml | 18 +- ...ith-fake-endpoints-models-for-testing.yaml | 18 +- ...ith-fake-endpoints-models-for-testing.yaml | 18 +- .../csharp-netcore/OpenAPIClient/README.md | 2 +- .../OpenAPIClient/docs/FakeApi.md | 8 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 24 +- .../OpenAPIClientCore/README.md | 2 +- .../OpenAPIClientCore/docs/FakeApi.md | 8 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 24 +- .../petstore/csharp/OpenAPIClient/README.md | 2 +- .../csharp/OpenAPIClient/docs/FakeApi.md | 8 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 24 +- .../petstore/dart2/openapi/doc/ApiResponse.md | 17 + .../petstore/dart2/openapi/doc/Category.md | 16 + .../petstore/dart2/openapi/doc/Order.md | 20 + .../client/petstore/dart2/openapi/doc/Pet.md | 20 + .../petstore/dart2/openapi/doc/PetApi.md | 379 +++++++++++++ .../petstore/dart2/openapi/doc/StoreApi.md | 186 ++++++ .../client/petstore/dart2/openapi/doc/Tag.md | 16 + .../client/petstore/dart2/openapi/doc/User.md | 22 + .../petstore/dart2/openapi/doc/UserApi.md | 349 ++++++++++++ .../elixir/lib/openapi_petstore/api/fake.ex | 4 +- .../go-experimental/go-petstore/README.md | 2 +- .../go-petstore/api/openapi.yaml | 16 +- .../go-experimental/go-petstore/api_fake.go | 4 +- .../go-petstore/docs/FakeApi.md | 6 +- .../petstore/go/go-petstore-withXml/README.md | 2 +- .../go/go-petstore-withXml/api/openapi.yaml | 16 +- .../go/go-petstore-withXml/api_fake.go | 4 +- .../go/go-petstore-withXml/docs/FakeApi.md | 6 +- .../client/petstore/go/go-petstore/README.md | 2 +- .../petstore/go/go-petstore/api/openapi.yaml | 16 +- .../petstore/go/go-petstore/api_fake.go | 4 +- .../petstore/go/go-petstore/docs/FakeApi.md | 6 +- .../lib/OpenAPIPetstore/API/Fake.hs | 4 +- .../petstore/haskell-http-client/openapi.yaml | 16 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/google-api-client/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 8 +- .../petstore/java/jersey1/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/jersey2-java6/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 8 +- .../java/jersey2-java8/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 8 +- .../petstore/java/jersey2/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 8 +- .../petstore/java/native/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 12 +- .../petstore/java/okhttp-gson/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 12 +- .../java/rest-assured/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 8 +- .../petstore/java/resteasy/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/resttemplate-withXml/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 8 +- .../java/resttemplate/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 8 +- .../org/openapitools/client/api/FakeApi.java | 6 +- .../java/retrofit2-play24/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/retrofit2-play25/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/retrofit2-play26/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../petstore/java/retrofit2/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../petstore/java/retrofit2rx/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../java/retrofit2rx2/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../petstore/java/vertx/docs/FakeApi.md | 6 +- .../openapitools/client/api/FakeApiImpl.java | 4 +- .../client/api/rxjava/FakeApi.java | 8 +- .../petstore/java/webclient/docs/FakeApi.md | 6 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../client/petstore/javascript-es6/README.md | 2 +- .../petstore/javascript-es6/docs/FakeApi.md | 6 +- .../javascript-es6/src/api/FakeApi.js | 4 +- .../petstore/javascript-promise-es6/README.md | 2 +- .../javascript-promise-es6/docs/FakeApi.md | 6 +- .../javascript-promise-es6/src/api/FakeApi.js | 8 +- .../petstore/javascript-promise/README.md | 2 +- .../javascript-promise/docs/FakeApi.md | 6 +- .../javascript-promise/src/api/FakeApi.js | 8 +- samples/client/petstore/javascript/README.md | 2 +- .../petstore/javascript/docs/FakeApi.md | 6 +- .../petstore/javascript/src/api/FakeApi.js | 4 +- samples/client/petstore/perl/README.md | 2 +- samples/client/petstore/perl/docs/FakeApi.md | 6 +- .../perl/lib/WWW/OpenAPIClient/FakeApi.pm | 4 +- .../petstore/php/OpenAPIClient-php/README.md | 2 +- .../php/OpenAPIClient-php/docs/Api/FakeApi.md | 6 +- .../php/OpenAPIClient-php/lib/Api/FakeApi.php | 8 +- .../test/Api/FakeApiTest.php | 2 +- .../client/petstore/python-asyncio/README.md | 2 +- .../petstore/python-asyncio/docs/FakeApi.md | 8 +- .../petstore_api/api/fake_api.py | 8 +- .../petstore/python-experimental/README.md | 2 +- .../python-experimental/docs/FakeApi.md | 10 +- .../petstore_api/api/fake_api.py | 4 +- .../client/petstore/python-tornado/README.md | 2 +- .../petstore/python-tornado/docs/FakeApi.md | 8 +- .../petstore_api/api/fake_api.py | 8 +- samples/client/petstore/python/README.md | 2 +- .../client/petstore/python/docs/FakeApi.md | 8 +- .../python/petstore_api/api/fake_api.py | 8 +- .../client/petstore/ruby-faraday/README.md | 2 +- .../petstore/ruby-faraday/docs/FakeApi.md | 8 +- .../ruby-faraday/lib/petstore/api/fake_api.rb | 8 +- samples/client/petstore/ruby/README.md | 2 +- samples/client/petstore/ruby/docs/FakeApi.md | 8 +- .../ruby/lib/petstore/api/fake_api.rb | 8 +- .../petstore/ruby/spec/api/fake_api_spec.rb | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../public/openapi.json | 4 +- .../java/org/openapitools/api/FakeApi.java | 6 +- .../api/impl/FakeApiServiceImpl.java | 4 +- .../org/openapitools/api/FakeApiTest.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../src/main/openapi/openapi.yaml | 16 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 16 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../lib/app/Http/Controllers/FakeApi.php | 2 +- .../petstore/php-lumen/lib/routes/web.php | 4 +- samples/server/petstore/php-slim/README.md | 2 +- .../php-slim/lib/Api/AbstractFakeApi.php | 4 +- samples/server/petstore/php-slim4/README.md | 2 +- .../php-slim4/lib/Api/AbstractFakeApi.php | 4 +- .../php-ze-ph/src/App/Handler/Fake.php | 2 +- .../README.md | 2 +- .../api/openapi.yaml | 16 +- .../docs/fake_api.md | 6 +- .../examples/server_lib/server.rs | 2 +- .../src/lib.rs | 6 +- .../java/org/openapitools/api/FakeApi.java | 6 +- .../java/org/openapitools/api/FakeApi.java | 6 +- .../java/org/openapitools/api/FakeApi.java | 6 +- .../openapitools/api/FakeApiController.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 6 +- .../openapitools/api/FakeApiController.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 6 +- .../org/openapitools/api/FakeApiDelegate.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 6 +- .../openapitools/api/FakeApiController.java | 4 +- .../org/openapitools/api/FakeApiDelegate.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 6 +- .../java/org/openapitools/api/FakeApi.java | 6 +- .../org/openapitools/api/FakeApiDelegate.java | 4 +- .../src/main/resources/openapi.yaml | 16 +- .../java/org/openapitools/api/FakeApi.java | 6 +- .../openapitools/virtualan/api/FakeApi.java | 6 +- .../java/org/openapitools/api/FakeApi.java | 6 +- 291 files changed, 5116 insertions(+), 583 deletions(-) create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java create mode 100644 modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/protobuf/ProtobufSchemaCodegenTest.java create mode 100644 samples/client/petstore/dart2/openapi/doc/ApiResponse.md create mode 100644 samples/client/petstore/dart2/openapi/doc/Category.md create mode 100644 samples/client/petstore/dart2/openapi/doc/Order.md create mode 100644 samples/client/petstore/dart2/openapi/doc/Pet.md create mode 100644 samples/client/petstore/dart2/openapi/doc/PetApi.md create mode 100644 samples/client/petstore/dart2/openapi/doc/StoreApi.md create mode 100644 samples/client/petstore/dart2/openapi/doc/Tag.md create mode 100644 samples/client/petstore/dart2/openapi/doc/User.md create mode 100644 samples/client/petstore/dart2/openapi/doc/UserApi.md diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java new file mode 100644 index 0000000000..3279eb9737 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java @@ -0,0 +1,530 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta; + +import org.openapitools.codegen.meta.features.*; + +import java.util.Arrays; +import java.util.EnumSet; +import java.util.stream.Collectors; + +/** + * Defines the feature set for a target generator. + */ +@SuppressWarnings({"unused", "WeakerAccess"}) +public class FeatureSet { + public static FeatureSet UNSPECIFIED = FeatureSet.newBuilder().build(); + + private EnumSet clientModificationFeatures; + private EnumSet dataTypeFeatures; + private EnumSet documentationFeatures; + private EnumSet globalFeatures; + private EnumSet schemaSupportFeatures; + private EnumSet parameterFeatures; + private EnumSet securityFeatures; + private EnumSet wireFormatFeatures; + + private FeatureSet(Builder builder) { + if (builder != null) { + clientModificationFeatures = builder.clientModificationFeatures; + dataTypeFeatures = builder.dataTypeFeatures; + documentationFeatures = builder.documentationFeatures; + schemaSupportFeatures = builder.schemaSupportFeatures; + globalFeatures = builder.globalFeatures; + parameterFeatures = builder.parameterFeatures; + securityFeatures = builder.securityFeatures; + wireFormatFeatures = builder.wireFormatFeatures; + } + } + + public Builder modify() { + return FeatureSet.newBuilder(this); + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newBuilder(FeatureSet copy) { + Builder builder = new Builder(); + if (copy != null) { + builder.clientModificationFeatures = copy.getClientModificationFeatures(); + builder.dataTypeFeatures = copy.getDataTypeFeatures(); + builder.documentationFeatures = copy.getDocumentationFeatures(); + builder.schemaSupportFeatures = copy.getSchemaSupportFeatures(); + builder.globalFeatures = copy.getGlobalFeatures(); + builder.parameterFeatures = copy.getParameterFeatures(); + builder.securityFeatures = copy.getSecurityFeatures(); + builder.wireFormatFeatures = copy.getWireFormatFeatures(); + } + return builder; + } + + /** + * Returns the set of client modification features supported by the generator. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getClientModificationFeatures() { + if (clientModificationFeatures != null) { + return EnumSet.copyOf(clientModificationFeatures); + } else { + return EnumSet.noneOf(ClientModificationFeature.class); + } + } + + /** + * Returns the set of common data types supported by the generator + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getDataTypeFeatures() { + if (dataTypeFeatures != null) { + return EnumSet.copyOf(dataTypeFeatures); + } else { + return EnumSet.noneOf(DataTypeFeature.class); + } + } + + /** + * Returns the documentation type available in generated output. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getDocumentationFeatures() { + if (documentationFeatures != null) { + return EnumSet.copyOf(documentationFeatures); + } else { + return EnumSet.noneOf(DocumentationFeature.class); + } + } + + /** + * Returns special circumstances handled by the generator. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getSchemaSupportFeatures() { + if (schemaSupportFeatures != null) { + return EnumSet.copyOf(schemaSupportFeatures); + } else { + return EnumSet.noneOf(SchemaSupportFeature.class); + } + } + + /** + * Returns the spec features supported "globally" for a document (shared across all operations and/or models). + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getGlobalFeatures() { + if (globalFeatures != null) { + return EnumSet.copyOf(globalFeatures); + } else { + return EnumSet.noneOf(GlobalFeature.class); + } + } + + /** + * Returns the types of parameters supported by endpoints in the generated code. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getParameterFeatures() { + if (parameterFeatures != null) { + return EnumSet.copyOf(parameterFeatures); + } else { + return EnumSet.noneOf(ParameterFeature.class); + } + } + + /** + * Returns the security features supported in the generated code. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getSecurityFeatures() { + if (securityFeatures != null) { + return EnumSet.copyOf(securityFeatures); + } else { + return EnumSet.noneOf(SecurityFeature.class); + } + } + + /** + * Returns the wire format options officially supported by the generated code. + * + * @return A new copy of the defined feature set. Changes to this instance are not promoted. + */ + public EnumSet getWireFormatFeatures() { + if (wireFormatFeatures != null) { + return EnumSet.copyOf(wireFormatFeatures); + } else { + return EnumSet.noneOf(WireFormatFeature.class); + } + } + + /** + * {@code FeatureSet} builder static inner class. + */ + public static final class Builder { + private EnumSet clientModificationFeatures; + private EnumSet dataTypeFeatures; + private EnumSet documentationFeatures; + private EnumSet schemaSupportFeatures; + private EnumSet globalFeatures; + private EnumSet parameterFeatures; + private EnumSet securityFeatures; + private EnumSet wireFormatFeatures; + + private Builder() { + this.clientModificationFeatures = EnumSet.noneOf(ClientModificationFeature.class); + this.dataTypeFeatures = EnumSet.noneOf(DataTypeFeature.class); + this.documentationFeatures = EnumSet.noneOf(DocumentationFeature.class); + this.schemaSupportFeatures = EnumSet.noneOf(SchemaSupportFeature.class); + this.parameterFeatures = EnumSet.noneOf(ParameterFeature.class); + this.securityFeatures = EnumSet.noneOf(SecurityFeature.class); + this.globalFeatures = EnumSet.noneOf(GlobalFeature.class); + this.wireFormatFeatures = EnumSet.noneOf(WireFormatFeature.class); + } + + /** + * Sets the {@code clientModificationFeatures} and returns a reference to this Builder so that the methods can be chained together. + * + * @param clientModificationFeatures the {@code clientModificationFeatures} to set + * @return a reference to this Builder + */ + public Builder clientModificationFeatures(EnumSet clientModificationFeatures) { + if (clientModificationFeatures != null) { + this.clientModificationFeatures = clientModificationFeatures; + } else { + this.clientModificationFeatures = EnumSet.noneOf(ClientModificationFeature.class); + } + return this; + } + + /** + * Includes the defined {@link ClientModificationFeature} to the new/existing set of supported features. + * + * @param clientModificationFeature One or more {@code clientModificationFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeClientModificationFeatures(ClientModificationFeature... clientModificationFeature) { + this.clientModificationFeatures.addAll(Arrays.stream(clientModificationFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link ClientModificationFeature} from the set of supported features. + * + * @param clientModificationFeature One or more {@code clientModificationFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeClientModificationFeatures(ClientModificationFeature... clientModificationFeature) { + this.clientModificationFeatures.removeAll(Arrays.stream(clientModificationFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code dataTypeFeatures} and returns a reference to this Builder so that the methods can be chained together. + * + * @param dataTypeFeatures the {@code dataTypeFeatures} to set + * @return a reference to this Builder + */ + public Builder dataTypeFeatures(EnumSet dataTypeFeatures) { + if (dataTypeFeatures != null) { + this.dataTypeFeatures = dataTypeFeatures; + } else { + this.dataTypeFeatures = EnumSet.noneOf(DataTypeFeature.class); + } + return this; + } + + /** + * Includes the defined {@link DataTypeFeature} to the new/existing set of supported features. + * + * @param dataTypeFeature One or more {@code dataTypeFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeDataTypeFeatures(DataTypeFeature... dataTypeFeature) { + this.dataTypeFeatures.addAll(Arrays.stream(dataTypeFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link DataTypeFeature} from the set of supported features. + * + * @param dataTypeFeature One or more {@code dataTypeFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeDataTypeFeatures(DataTypeFeature... dataTypeFeature) { + this.dataTypeFeatures.removeAll(Arrays.stream(dataTypeFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code documentationFeature} and returns a reference to this Builder so that the methods can be chained together. + * + * @param documentationFeatures the {@code documentationFeature} to set + * @return a reference to this Builder + */ + public Builder documentationFeatures(EnumSet documentationFeatures) { + if (documentationFeatures != null) { + this.documentationFeatures = documentationFeatures; + } else { + this.documentationFeatures = EnumSet.noneOf(DocumentationFeature.class); + } + return this; + } + + /** + * Includes the defined {@link DocumentationFeature} to the new/existing set of supported features. + * + * @param documentationFeature One or more {@code documentationFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeDocumentationFeatures(DocumentationFeature... documentationFeature) { + this.documentationFeatures.addAll(Arrays.stream(documentationFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link DocumentationFeature} from the set of supported features. + * + * @param documentationFeature One or more {@code documentationFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeDocumentationFeatures(DocumentationFeature... documentationFeature) { + this.documentationFeatures.removeAll(Arrays.stream(documentationFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code schemaSupportFeature} and returns a reference to this Builder so that the methods can be chained together. + * + * @param schemaSupportFeatures the {@code schemaSupportFeature} to set + * @return a reference to this Builder + */ + public Builder schemaSupportFeatures(EnumSet schemaSupportFeatures) { + if (schemaSupportFeatures != null) { + this.schemaSupportFeatures = schemaSupportFeatures; + } else { + this.schemaSupportFeatures = EnumSet.noneOf(SchemaSupportFeature.class); + } + return this; + } + + /** + * Includes the defined {@link SchemaSupportFeature} to the new/existing set of supported features. + * + * @param schemaSupportFeature One or more {@code schemaSupportFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeSchemaSupportFeatures(SchemaSupportFeature... schemaSupportFeature) { + this.schemaSupportFeatures.addAll(Arrays.stream(schemaSupportFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link SchemaSupportFeature} from the set of supported features. + * + * @param schemaSupportFeature One or more {@code schemaSupportFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeSchemaSupportFeatures(SchemaSupportFeature... schemaSupportFeature) { + this.schemaSupportFeatures.removeAll(Arrays.stream(schemaSupportFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code parameterFeature} and returns a reference to this Builder so that the methods can be chained together. + * + * @param parameterFeatures the {@code parameterFeature} to set + * @return a reference to this Builder + */ + public Builder parameterFeatures(EnumSet parameterFeatures) { + if (parameterFeatures != null) { + this.parameterFeatures = parameterFeatures; + } else { + this.parameterFeatures = EnumSet.noneOf(ParameterFeature.class); + } + return this; + } + + /** + * Includes the defined {@link ParameterFeature} to the new/existing set of supported features. + * + * @param parameterFeature One or more {@code parameterFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeParameterFeatures(ParameterFeature... parameterFeature) { + this.parameterFeatures.addAll(Arrays.stream(parameterFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link ParameterFeature} from the set of supported features. + * + * @param parameterFeature One or more {@code parameterFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeParameterFeatures(ParameterFeature... parameterFeature) { + this.parameterFeatures.removeAll(Arrays.stream(parameterFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code securityFeature} and returns a reference to this Builder so that the methods can be chained together. + * + * @param securityFeatures the {@code securityFeatures} to set + * @return a reference to this Builder + */ + public Builder securityFeatures(EnumSet securityFeatures) { + if (securityFeatures != null) { + this.securityFeatures = securityFeatures; + } else { + this.securityFeatures = EnumSet.noneOf(SecurityFeature.class); + } + return this; + } + + /** + * Includes the defined {@link SecurityFeature} to the new/existing set of supported features. + * + * @param securityFeature One or more {@code securityFeature} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeSecurityFeatures(SecurityFeature... securityFeature) { + this.securityFeatures.addAll(Arrays.stream(securityFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link SecurityFeature} from the set of supported features. + * + * @param securityFeature One or more {@code securityFeature} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeSecurityFeatures(SecurityFeature... securityFeature) { + this.securityFeatures.removeAll(Arrays.stream(securityFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code globalFeatures} and return a reference to this Builder so that the methods can be chained together. + * + * @param globalFeatures the {@code globalFeatures} to set + * @return a reference to this Builder + */ + public Builder globalFeatures(EnumSet globalFeatures) { + if (globalFeatures != null) { + this.globalFeatures = globalFeatures; + } else { + this.globalFeatures = EnumSet.noneOf(GlobalFeature.class); + } + return this; + } + + /** + * Includes the defined {@link GlobalFeature} to the new/existing set of supported features. + * + * @param globalFeature One or more {@code globalFeatures} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeGlobalFeatures(GlobalFeature... globalFeature) { + this.globalFeatures.addAll(Arrays.stream(globalFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link GlobalFeature} from the set of supported features. + * + * @param globalFeature One or more {@code globalFeatures} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeGlobalFeatures(GlobalFeature... globalFeature) { + this.globalFeatures.removeAll(Arrays.stream(globalFeature).collect(Collectors.toList())); + return this; + } + + /** + * Sets the {@code wireFormatFeatures} and return a reference to this Builder so that the methods can be chained together. + * + * @param wireFormatFeatures the {@code wireFormatFeatures} to set + * @return a reference to this Builder + */ + public Builder wireFormatFeatures(EnumSet wireFormatFeatures) { + if (wireFormatFeatures != null) { + this.wireFormatFeatures = wireFormatFeatures; + } else { + this.wireFormatFeatures = EnumSet.noneOf(WireFormatFeature.class); + } + return this; + } + + /** + * Includes the defined {@link WireFormatFeature} to the new/existing set of supported features. + * + * @param wireFormatFeature One or more {@code wireFormatFeatures} to ensure are included in the set. + * + * @return a reference to this Builder + */ + public Builder includeWireFormatFeatures(WireFormatFeature... wireFormatFeature) { + this.wireFormatFeatures.addAll(Arrays.stream(wireFormatFeature).collect(Collectors.toList())); + return this; + } + + /** + * Excludes the defined {@link WireFormatFeature} from the set of supported features. + * + *

                                                            + * This option should only be used if something is overtly broken or not possible in a generator. Please log a warning if invoking this method. + *

                                                            + * + * @param wireFormatFeature One or more {@code wireFormatFeatures} to ensure are excluded from the set. + * + * @return a reference to this Builder + */ + public Builder excludeWireFormatFeatures(WireFormatFeature... wireFormatFeature) { + this.wireFormatFeatures.removeAll(Arrays.stream(wireFormatFeature).collect(Collectors.toList())); + return this; + } + + /** + * Returns a {@code FeatureSet} built from the parameters previously set. + * + * @return a {@code FeatureSet} built with parameters of this {@code FeatureSet.Builder} + */ + public FeatureSet build() { + return new FeatureSet(this); + } + } +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java index 4bd538a231..aa8aee1091 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java @@ -16,16 +16,29 @@ package org.openapitools.codegen.meta; +import org.openapitools.codegen.meta.features.*; + +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; + /** * Represents metadata about a generator. */ +@SuppressWarnings("WeakerAccess") public class GeneratorMetadata { private Stability stability; + private Map libraryFeatures; + private FeatureSet featureSet; private String generationMessage; private GeneratorMetadata(Builder builder) { - stability = builder.stability; - generationMessage = builder.generationMessage; + if (builder != null) { + stability = builder.stability; + generationMessage = builder.generationMessage; + libraryFeatures = builder.libraryFeatures; + featureSet = builder.featureSet; + } } /** @@ -37,18 +50,13 @@ public class GeneratorMetadata { return new Builder(); } - /** - * Creates a new builder object for {@link GeneratorMetadata}, accepting another instance from which to copy properties. - * - * @param copy An existing instance to copy defaults from - * - * @return A new builder instance, with values preset to those of 'copy'. - */ public static Builder newBuilder(GeneratorMetadata copy) { Builder builder = new Builder(); if (copy != null) { builder.stability = copy.getStability(); builder.generationMessage = copy.getGenerationMessage(); + builder.libraryFeatures = copy.getLibraryFeatures(); + builder.featureSet = copy.getFeatureSet(); } return builder; } @@ -71,12 +79,32 @@ public class GeneratorMetadata { return stability; } + /** + * Returns the feature set supported by the generator. + * + * @return The set of available features. + */ + public FeatureSet getFeatureSet() { + return featureSet; + } + + /** + * Returns the list of features supported by generator libraries. + * + * @return A map of library name to feature set for that library. + */ + public Map getLibraryFeatures() { + return libraryFeatures; + } + /** * {@code GeneratorMetadata} builder static inner class. */ public static final class Builder { private Stability stability; private String generationMessage; + private FeatureSet featureSet = FeatureSet.UNSPECIFIED; + private Map libraryFeatures = new HashMap<>(); private Builder() { } @@ -92,6 +120,32 @@ public class GeneratorMetadata { return this; } + /** + * Sets the {@code featureSet} and returns a reference to this Builder so that the methods can be chained together. + * + * @param featureSet the {@code featureSet} to set + * @return a reference to this Builder + */ + public Builder featureSet(FeatureSet featureSet) { + if (featureSet != null) { + this.featureSet = featureSet; + } else { + this.featureSet = FeatureSet.UNSPECIFIED; + } + return this; + } + + /** + * Sets the {@code libraryFeatures} and returns a reference to this Builder so that the methods can be chained together. + * + * @param libraryFeatures the {@code libraryFeatures} to set + * @return a reference to this Builder + */ + public Builder libraryFeatures(Map libraryFeatures) { + this.libraryFeatures = libraryFeatures; + return this; + } + /** * Sets the {@code generationMessage} and returns a reference to this Builder so that the methods can be chained together. * diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java new file mode 100644 index 0000000000..de5cba65a1 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java @@ -0,0 +1,42 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.ToolingExtension; + +/** + * Defines a general set of modifications supported by a generated client. + */ +public enum ClientModificationFeature { + /** + * Supports defining a custom overall base path in generated client output. + */ + @ToolingExtension + BasePath, + + /** + * Supports customizing authorizations in generated client output. + */ + @ToolingExtension + Authorizations, + + /** + * Supports customizing the user agent in generated client output. + */ + @ToolingExtension + UserAgent +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java new file mode 100644 index 0000000000..bfb7477a20 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java @@ -0,0 +1,240 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; +import org.openapitools.codegen.meta.features.annotations.ToolingExtension; + +/** + * Defines common data types supported by a generator. + * Some of these features are defined in specs, and some are specific to the tool. + * + * Where data types are listed as tool-specific, this either indicates that the data type is common enough that it is an officially + * supported custom data type by the toolset (see {@link DataTypeFeature#Decimal}), or that the consideration of a special type isn't + * explicitly mentioned by the specification(s) but differs enough across languages that it warrants a special callout (see {@link DataTypeFeature#ArrayOfModel}). + */ +public enum DataTypeFeature { + /** + * Supports a generator-specific support usually via type=string's format property (e.g. email, uuid, etc), should be documented in generator README. + * + *

                                                            Loosely described in OpenAPI Specification(s). Generally means a custom "format" option applied to a string-typed property.

                                                            + */ + @OAS2 @OAS3 + Custom, + + /** + * Supports integer/int32 + */ + @OAS2 @OAS3 + Int32, + + /** + * Supports integer/int64 + */ + @OAS2 @OAS3 + Int64, + + /** + * Supports number/float + */ + @OAS2 @OAS3 + Float, + + /** + * Supports number/double + */ + @OAS2 @OAS3 + Double, + + /** + * Supports number/decimal (a special case for some languages) + * + *

                                                            Decimal is not a type defined by OAS 2.0 specification

                                                            + */ + @ToolingExtension + Decimal, + + /** + * Supports string + */ + @OAS2 @OAS3 + String, + + /** + * Supports string/byte: base64 encoded + */ + @OAS2 @OAS3 + Byte, + + /** + * Supports string/binary: any collection of octets + */ + @OAS2 @OAS3 + Binary, + + /** + * Supports boolean + */ + @OAS2 @OAS3 + Boolean, + + /** + * Supports string/date: full-date RFC3339 + * + * @see RFC3339 + */ + @OAS2 @OAS3 + Date, + + /** + * Supports string/date-time: date-time RFC3339 + * + * @see RFC3339 + */ + @OAS2 @OAS3 + DateTime, + + /** + * Supports string/password: A hint to UIs to obscure input. + * + * + *

                                                            + * This should be used as an indicator for password best practices, such as assigning a variable to + * a character array rather than string, avoiding logging the variable in clear text, and masking the value + * in any user inputs. See OWASP for best practices. + *

                                                            + */ + @OAS2 @OAS3 + Password, + + + /** + * Supports file inputs (e.g. multipart support). + * + *

                                                            OAS 3.x defines files differently.

                                                            + *

                                                            + * OAS 3.x does not have an explicit "file" type and instead relies on ContentType or response types. + * That's not to say a generator doesn't support files, only that there's no direct + * "file" type defined in the spec document. + *

                                                            + *

                                                            + * NOTE: The default workflow may provide an "isFile" helper or synthesize the assumptions around files in the case of OAS 3.x. + *

                                                            + */ + @OAS2 + File, + + /** + * Supports arrays of data + */ + @OAS2 @OAS3 + Array, + + /** + * Supports map of data + */ + @ToolingExtension + Maps, + + /** + * Supports specifying the format of the array if type array is used (one of: csv, ssv, tsv, pipes). + * + *

                                                            + * For multi support, check {@link DataTypeFeature#CollectionFormatMulti}. OAS 3.x removes collectionFormat in favor of Style properties. + *

                                                            + */ + @OAS2 + CollectionFormat, + + /** + * Supports collection format=multi. + * + *

                                                            + * This is special cased because it is not as easily implemented as a delimiter as with CollectionFormat. + * OAS 3.x removes collectionFormat for style properties. + *

                                                            + */ + @OAS2 + CollectionFormatMulti, + + /** + * Supports enum properties + */ + @OAS2 @OAS3 + Enum, + + /** + * Supports an array of enum + */ + @ToolingExtension + ArrayOfEnum, + + /** + * Supports an array of models + */ + @ToolingExtension + ArrayOfModel, + + /** + * Supports an array of arrays (primitives) + */ + @ToolingExtension + ArrayOfCollectionOfPrimitives, + + /** + * Supports an array of arrays (models) + */ + @ToolingExtension + ArrayOfCollectionOfModel, + + /** + * Supports an array of arrays (enums) + */ + @ToolingExtension + ArrayOfCollectionOfEnum, + + /** + * Supports a map of enums + */ + @ToolingExtension + MapOfEnum, + + /** + * Supports a map of models + */ + @ToolingExtension + MapOfModel, + + /** + * Supports a map of arrays (primitives) + */ + @ToolingExtension + MapOfCollectionOfPrimitives, + + /** + * Supports a map of arrays (models) + */ + @ToolingExtension + MapOfCollectionOfModel, + + /** + * Supports a map of arrays (enums) + */ + @ToolingExtension + MapOfCollectionOfEnum +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java new file mode 100644 index 0000000000..5bedfa40ef --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java @@ -0,0 +1,42 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.ToolingExtension; + +/** + * Defines the documentation type available in generated output. + */ +public enum DocumentationFeature { + /** + * Generated output includes a README. + */ + @ToolingExtension + Readme, + + /** + * Generated output includes documentation for all generated models. + */ + @ToolingExtension + Model, + + /** + * Generated output includes documentation for all generated APIs. + */ + @ToolingExtension + Api; +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java new file mode 100644 index 0000000000..9120619d9c --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java @@ -0,0 +1,149 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; + +/** + * Defines a set of globally available features. That is, support of these are often defined at the top-level of the spec, or + * defines general support of a feature (e.g. Examples, XMLStructureDefinitions). + */ +public enum GlobalFeature { + /** + * Supports specifying the host or ip of the target system. If not defined, this should fall back to the + * host/ip (and optional port) of the server which delivered the spec document. + */ + @OAS2 @OAS3 + Host, + + /** + * Supports providing an API prefix, appended to the host. + * + *

                                                            OAS 3.x supports this indirectly via servers with template variables.

                                                            + */ + @OAS2 @OAS3 + BasePath, + + /** + * Supports passing information about the target server to the client. + * + *

                                                            + * Information passed to generated code should be explicitly documented in a generator's README. + *

                                                            + */ + @OAS2 @OAS3 + Info, + + /** + * Supports customization of the scheme "http", "https", "ws", "wss". + * + *

                                                            + * If a generator only supports partial schemes, please choose the PartialSchemes option. + *

                                                            + * + *

                                                            OAS 3.x supports this indirectly via servers with template variables.

                                                            + */ + @OAS2 @OAS3 + Schemes, + + /** + * Supports fewer than all schemes supported by OpenAPI Specification. + * + *

                                                            + * Support should be explicitly documented in a generator's README. + *

                                                            + * + *

                                                            OAS 3.x supports this indirectly via servers with template variables.

                                                            + */ + @OAS2 @OAS3 + PartialSchemes, + + /** + * Supports a globally defined array of consumable MimeTypes. + * + *

                                                            Global support is undefined in OAS 3.x.

                                                            + */ + @OAS2 + Consumes, + + /** + * Supports a globally defined array of produced MimeTypes. + * + *

                                                            Global support is undefined in OAS 3.x.

                                                            + */ + @OAS2 + Produces, + + /** + * Exposes external documentation defined in the specification document to generated code. + */ + @OAS2 @OAS3 + ExternalDocumentation, + + /** + * Allows the ability to provide example input/output structures, usually in JSON format. + */ + @OAS2 @OAS3 + Examples, + + /** + * Differs from supporting the MimeType.XML feature, in that this option indicates whether XML structures can be defined by spec document and honored by the caller. + */ + @OAS2 @OAS3 + XMLStructureDefinitions, + + /** + * Supports targeting one or more servers. + * + *

                                                            + * That is, server is not hard-coded (although there may be a default). + * This option is valid only for "servers" without open-ended values. + *

                                                            + */ + @OAS3 + MultiServer, + + /** + * Supports targeting one or more servers, PLUS the ability to provide values for templated server parts + */ + @OAS3 + ParameterizedServer, + + /** + * Supports OAS 3.x "style" for parameters. + * + *

                                                            + * NOTE: This option is more relevant for documentation generators which support HTML stylesheets, but may be used + * to determine structural characteristics of a property (as with OAS 3.x lack of collectionFormat). + *

                                                            + */ + @OAS3 + ParameterStyling, + + /** + * Supports OAS 3.x callbacks. + */ + @OAS3 + Callbacks, + + /** + * Supports OAS 3.x link objects, but does *NOT* suggest generated clients auto-follow links. + */ + @OAS3 + LinkObjects +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java new file mode 100644 index 0000000000..07f9225a0f --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java @@ -0,0 +1,77 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; + +/** + * Defines parameters supported by endpoints in the generated code. + */ +public enum ParameterFeature { + /** + * Supports path parameters. + */ + @OAS2 @OAS3 + Path, + + /** + * Supports query parameters. + */ + @OAS2 @OAS3 + Query, + + /** + * Supports header parameters. + */ + @OAS2 @OAS3 + Header, + + /** + * Supports body parameters. + * + *

                                                            + * OAS 3.x specification supports this structurally rather than as an "in" parameter. + *

                                                            + */ + @OAS2 + Body, + + /** + * Supports form encoded parameters. + * + * OAS 3.x specification supports this structurally via content types rather than as an "in" parameter. + */ + @OAS2 + FormUnencoded, + + /** + * Supports multipart parameters. + * + *

                                                            OAS 3.x specification supports this structurally via content types rather than as an "in" parameter.

                                                            + */ + @OAS2 + FormMultipart, + + /** + * Supports Cookie parameters. + * + *

                                                            Not defined in OAS 2.0 and no tooling extensions currently supported for OAS 2.0 support.

                                                            + */ + @OAS3 + Cookie +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java new file mode 100644 index 0000000000..e9351638c6 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java @@ -0,0 +1,70 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; + +/** + * Defines special circumstances handled by the generator. + */ +public enum SchemaSupportFeature { + /** + * Support of simple schemas (those which define properties directly). + */ + @OAS2 @OAS3 + Simple, + + /** + * Support of complex schemas (those which refer to the properties of another model). + * + *

                                                            In OpenAPI Specification, this indicates support of AllOf/OneOf.

                                                            + */ + @OAS2 @OAS3 + Composite, + + /** + * Support for polymorphic classes. + * + *

                                                            + * This suggests Composite support, but may not always be the case and is therefore separate. + *

                                                            + * + *

                                                            In OpenAPI Specification, this indicates support of AllOf with a discriminator property on the derived schema.

                                                            + */ + @OAS2 @OAS3 + Polymorphism, + + /** + * Support for a union type. + * + *

                                                            + * This means that a single "Type" in generated code may refer to one of any type in a set of 2 or more types. + * + * This is defined as a union as "OneOf" support is not explicitly limited to physical boundaries in OpenAPI Specification. The + * implementation of such a type is easily represented dynamically (a JSON object), but requires explicit language support and + * potentially a custom implementation (typed instances). + * + * Note that a generator may support "Unions" very loosely by returning an Object/Any/ref/interface{} type, leaving onus + * on type determination to the consumer. This does *NOT* suggest generated code implements a "Union Type". + *

                                                            + * + *

                                                            This suggests support of OneOf in OpenAPI Specification with a discriminator.

                                                            + */ + @OAS3 + Union +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java new file mode 100644 index 0000000000..592d3e0122 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java @@ -0,0 +1,77 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; + +/** + * Defines security features supported in the generated code. + */ +public enum SecurityFeature { + /** + * Supports header-based basic http auth. + */ + @OAS2 @OAS3 + BasicAuth, + + /** + * Supports header-based api-key http auth. + */ + @OAS2 @OAS3 + ApiKey, + + /** + * Supports openid connect based http auth. Implies a requirement on openIdConnectUrl. + */ + @OAS3 + OpenIDConnect, + + /** + * Supports header-based bearer auth (e.g. header + bearer format). + */ + @OAS3 + BearerToken, + + /** + * Supports authorization via OAuth2 implicit flow. + */ + @OAS2 @OAS3 + OAuth2_Implicit, + + /** + * Supports authorization via OAuth2 password flow. + */ + @OAS2 @OAS3 + OAuth2_Password, + + /** + * Supports authorization via OAuth2 client credentials flow ("application" in OAS 2.0). + * + *

                                                            In OAS 2.0, this is called "application" flow.

                                                            + */ + @OAS2 @OAS3 + OAuth2_ClientCredentials, + + /** + * Supports authorization via OAuth2 flow ("accessCode" in OAS 2.0). + * + *

                                                            In OAS 2.0, this is called "accessCode" flow.

                                                            + */ + @OAS2 @OAS3 + OAuth2_AuthorizationCode +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java new file mode 100644 index 0000000000..0de757355f --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java @@ -0,0 +1,50 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features; + +import org.openapitools.codegen.meta.features.annotations.OAS2; +import org.openapitools.codegen.meta.features.annotations.OAS3; +import org.openapitools.codegen.meta.features.annotations.ToolingExtension; + +/** + * Defines wire formats explicitly defined in spec or supported by the tool. + */ +public enum WireFormatFeature { + /** + * Supports JSON transfer + */ + @OAS2 @OAS3 + JSON, + + /** + * Supports XML transfer + */ + @OAS2 @OAS3 + XML, + + /** + * Supports protocol buffer transfer + */ + @ToolingExtension + PROTOBUF, + + /** + * Supports other mime types or wire formats for transfer, to be documented by generators. + */ + @OAS2 @OAS3 + Custom +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java new file mode 100644 index 0000000000..1f233021f1 --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java @@ -0,0 +1,27 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface OAS2 { +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java new file mode 100644 index 0000000000..78542ffcea --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java @@ -0,0 +1,27 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface OAS3 { +} diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java new file mode 100644 index 0000000000..e592b915dd --- /dev/null +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java @@ -0,0 +1,27 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.meta.features.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface ToolingExtension { +} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 69e5cc53cd..5b587db411 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.security.SecurityScheme; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.oas.models.servers.ServerVariable; import org.openapitools.codegen.api.TemplatingEngineAdapter; +import org.openapitools.codegen.meta.FeatureSet; import org.openapitools.codegen.meta.GeneratorMetadata; import java.io.File; @@ -283,4 +284,8 @@ public interface CodegenConfig { boolean isStrictSpecBehavior(); void setStrictSpecBehavior(boolean strictSpecBehavior); + + FeatureSet getFeatureSet(); + + void setFeatureSet(FeatureSet featureSet); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index df595d68f0..d157cb808e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -47,8 +47,10 @@ import org.openapitools.codegen.CodegenDiscriminator.MappedModel; import org.openapitools.codegen.api.TemplatingEngineAdapter; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.examples.ExampleGenerator; +import org.openapitools.codegen.meta.FeatureSet; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.serializer.SerializerUtils; import org.openapitools.codegen.templating.MustacheEngineAdapter; import org.openapitools.codegen.templating.mustache.CamelCaseLambda; @@ -73,6 +75,54 @@ import static org.openapitools.codegen.utils.StringUtils.*; public class DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultCodegen.class); + public static FeatureSet DefaultFeatureSet; + + static { + DefaultFeatureSet = FeatureSet.newBuilder() + .includeDataTypeFeatures( + DataTypeFeature.Int32, DataTypeFeature.Int64, DataTypeFeature.Float, DataTypeFeature.Double, + DataTypeFeature.Decimal, DataTypeFeature.String, DataTypeFeature.Byte, DataTypeFeature.Binary, + DataTypeFeature.Boolean, DataTypeFeature.Date, DataTypeFeature.DateTime, DataTypeFeature.Password, + DataTypeFeature.File, DataTypeFeature.Array, DataTypeFeature.Maps, DataTypeFeature.CollectionFormat, + DataTypeFeature.CollectionFormatMulti, DataTypeFeature.Enum, DataTypeFeature.ArrayOfEnum, DataTypeFeature.ArrayOfModel, + DataTypeFeature.ArrayOfCollectionOfPrimitives, DataTypeFeature.ArrayOfCollectionOfModel, DataTypeFeature.ArrayOfCollectionOfEnum, + DataTypeFeature.MapOfEnum, DataTypeFeature.MapOfModel, DataTypeFeature.MapOfCollectionOfPrimitives, + DataTypeFeature.MapOfCollectionOfModel, DataTypeFeature.MapOfCollectionOfEnum + // Custom types are template specific + ) + .includeDocumentationFeatures( + DocumentationFeature.Api, DocumentationFeature.Model + // README is template specific + ) + .includeGlobalFeatures( + GlobalFeature.Host, GlobalFeature.BasePath, GlobalFeature.Info, GlobalFeature.PartialSchemes, + GlobalFeature.Consumes, GlobalFeature.Produces, GlobalFeature.ExternalDocumentation, GlobalFeature.Examples, + GlobalFeature.Callbacks + // TODO: xml structures, styles, link objects, parameterized servers, full schemes for OAS 2.0 + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Simple, SchemaSupportFeature.Composite, + SchemaSupportFeature.Polymorphism + // Union (OneOf) not 100% yet. + ) + .includeParameterFeatures( + ParameterFeature.Path, ParameterFeature.Query, ParameterFeature.Header, ParameterFeature.Body, + ParameterFeature.FormUnencoded, ParameterFeature.FormMultipart, ParameterFeature.Cookie + ) + .includeSecurityFeatures( + SecurityFeature.BasicAuth, SecurityFeature.ApiKey, SecurityFeature.BearerToken, + SecurityFeature.OAuth2_Implicit, SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_ClientCredentials, SecurityFeature.OAuth2_AuthorizationCode + // OpenIDConnect not yet supported + ) + .includeWireFormatFeatures( + WireFormatFeature.JSON, WireFormatFeature.XML + // PROTOBUF and Custom are generator specific + ) + .build(); + } + + protected FeatureSet featureSet; protected GeneratorMetadata generatorMetadata; protected String inputSpec; protected String outputFolder = ""; @@ -1112,6 +1162,9 @@ public class DefaultCodegen implements CodegenConfig { if (codegenType == null) { codegenType = CodegenType.OTHER; } + + featureSet = DefaultFeatureSet; + generatorMetadata = GeneratorMetadata.newBuilder() .stability(Stability.STABLE) .generationMessage(String.format(Locale.ROOT, "OpenAPI Generator: %s (%s)", getName(), codegenType.toValue())) @@ -5393,4 +5446,14 @@ public class DefaultCodegen implements CodegenConfig { public void setStrictSpecBehavior(final boolean strictSpecBehavior) { this.strictSpecBehavior = strictSpecBehavior; } + + @Override + public FeatureSet getFeatureSet() { + return this.featureSet; + } + + @Override + public void setFeatureSet(final FeatureSet featureSet) { + this.featureSet = featureSet == null ? DefaultFeatureSet : featureSet; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 7bc938a681..854420d9e7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -30,6 +30,7 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -96,6 +97,27 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code public AbstractJavaCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + supportsInheritance = true; modelTemplateFiles.put("model.mustache", ".java"); apiTemplateFiles.put("api.mustache", ".java"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 0676c8f241..a9fb88098d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -62,6 +63,26 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp public AbstractTypeScriptClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + // clear import mapping (from default generator) as TS does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java index 0099e79098..f61d173b07 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java @@ -24,6 +24,7 @@ import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import java.io.File; import java.io.IOException; @@ -54,6 +55,39 @@ public class AdaCodegen extends AbstractAdaCodegen implements CodegenConfig { @Override public void processOpts() { super.processOpts(); + + // TODO: Ada maintainer review. + featureSet = getFeatureSet().modify() + .excludeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures( + WireFormatFeature.XML, + WireFormatFeature.PROTOBUF + ) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Header, + ParameterFeature.Cookie + ) + .includeClientModificationFeatures(ClientModificationFeature.BasePath) + .build(); + if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) { packageName = (String) additionalProperties.get(CodegenConstants.PACKAGE_NAME); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java index 0ee5bb6c43..1e08cf6365 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java @@ -23,6 +23,7 @@ import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import java.io.File; import java.io.IOException; @@ -33,6 +34,37 @@ public class AdaServerCodegen extends AbstractAdaCodegen implements CodegenConfi public AdaServerCodegen() { super(); + + // TODO: Ada maintainer review. + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures( + WireFormatFeature.XML, + WireFormatFeature.PROTOBUF + ) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BearerToken + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Header, + ParameterFeature.Cookie + ) + .includeClientModificationFeatures(ClientModificationFeature.BasePath) + .build(); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java index ec2661e445..f64275f047 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,6 +59,36 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi public AndroidClientCodegen() { super(); + + // TODO: Android client maintainer review. + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures( + WireFormatFeature.PROTOBUF + ) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BearerToken + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures(ClientModificationFeature.BasePath) + .build(); + outputFolder = "generated-code/android"; modelTemplateFiles.put("model.mustache", ".java"); apiTemplateFiles.put("api.mustache", ".java"); @@ -65,6 +96,7 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi apiPackage = "org.openapitools.client.api"; modelPackage = "org.openapitools.client.model"; + setReservedWordsLowerCase( Arrays.asList( // local variable names used in API methods (endpoints) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java index 0c717499ab..d8083c08d2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java @@ -18,10 +18,9 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; +import java.util.*; public class Apache2ConfigCodegen extends DefaultCodegen implements CodegenConfig { @@ -45,6 +44,19 @@ public class Apache2ConfigCodegen extends DefaultCodegen implements CodegenConfi public Apache2ConfigCodegen() { super(); + + // TODO: Apache2 maintainer review. + featureSet = getFeatureSet().modify() + .parameterFeatures(EnumSet.of(ParameterFeature.Path)) + .securityFeatures(EnumSet.of(SecurityFeature.BasicAuth)) + .dataTypeFeatures(EnumSet.noneOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.noneOf(WireFormatFeature.class)) + .documentationFeatures(EnumSet.noneOf(DocumentationFeature.class)) + .globalFeatures(EnumSet.noneOf(GlobalFeature.class)) + .schemaSupportFeatures(EnumSet.noneOf(SchemaSupportFeature.class)) + .clientModificationFeatures(EnumSet.noneOf(ClientModificationFeature.class)) + .build(); + apiTemplateFiles.put("apache-config.mustache", ".conf"); embeddedTemplateDir = templateDir = "apache2"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java index 22c5771002..d60f60a9df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java @@ -24,9 +24,11 @@ import java.io.Writer; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -184,6 +186,15 @@ public class AsciidocDocumentationCodegen extends DefaultCodegen implements Code public AsciidocDocumentationCodegen() { super(); + // TODO: Asciidoc maintainer review. + featureSet = getFeatureSet().modify() + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .documentationFeatures(EnumSet.noneOf(DocumentationFeature.class)) + .globalFeatures(EnumSet.noneOf(GlobalFeature.class)) + .schemaSupportFeatures(EnumSet.noneOf(SchemaSupportFeature.class)) + .clientModificationFeatures(EnumSet.noneOf(ClientModificationFeature.class)) + .build(); + LOGGER.trace("start asciidoc codegen"); outputFolder = "generated-code" + File.separator + "asciidoc"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index 445cfd7bcd..494040b8bf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; @@ -87,6 +88,37 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { public AspNetCoreServerCodegen() { super(); + // TODO: AspnetCore community review + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures(WireFormatFeature.PROTOBUF) + .includeSecurityFeatures( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken + ) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + getName(); modelTemplateFiles.put("model.mustache", ".cs"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java index 9ea0d8a7dd..180be0df3d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java @@ -20,11 +20,13 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashSet; import java.util.Map; @@ -41,6 +43,20 @@ public class AvroSchemaCodegen extends DefaultCodegen implements CodegenConfig { .stability(Stability.BETA) .build(); + // TODO: Avro maintainer review. + featureSet = getFeatureSet().modify() + .parameterFeatures(EnumSet.noneOf(ParameterFeature.class)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .wireFormatFeatures(EnumSet.noneOf(WireFormatFeature.class)) + .documentationFeatures(EnumSet.noneOf(DocumentationFeature.class)) + .globalFeatures(EnumSet.noneOf(GlobalFeature.class)) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .clientModificationFeatures(EnumSet.noneOf(ClientModificationFeature.class)) + .build(); + outputFolder = "generated-code/avro-schema"; modelTemplateFiles.put("model.mustache", ".avsc"); // Force the model package to the package name so import can be fully qualified diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java index 7965641d64..4e521f04a1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java @@ -29,6 +29,7 @@ import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -101,6 +102,31 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { public BashClientCodegen() { super(); + // TODO: Bash maintainer review + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.of( + DocumentationFeature.Readme + )) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey + )) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeWireFormatFeatures( + WireFormatFeature.JSON, + WireFormatFeature.XML, + WireFormatFeature.Custom + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .build(); + setReservedWordsLowerCase( Arrays.asList( "case", diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java index bd14a843e6..c6e540a9b4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -49,6 +50,31 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf public CLibcurlClientCodegen() { super(); + // TODO: c maintainer review + // Assumes that C community considers api/model header files as documentation. + // Generator supports Basic, OAuth, and API key explicitly. Bearer is excluded although clients are able to set headers directly. + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures( + DocumentationFeature.Readme + ) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeWireFormatFeatures( + WireFormatFeature.JSON, + WireFormatFeature.XML + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .build(); + modelPackage = "models"; apiPackage = "api"; outputFolder = "generated-code" + File.separator + "C-libcurl"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 99232bc47b..47a9c22df8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -22,6 +22,7 @@ import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -78,6 +79,32 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen { public CSharpClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + supportsInheritance = true; modelTemplateFiles.put("model.mustache", ".cs"); apiTemplateFiles.put("api.mustache", ".cs"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java index d3cd3a7306..4f73f6d7e0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java @@ -24,6 +24,7 @@ import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,6 +41,10 @@ public class CSharpDotNet2ClientCodegen extends AbstractCSharpCodegen { public CSharpDotNet2ClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.DEPRECATED) .build(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java index c95fdcde9b..8d1b4cc091 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java @@ -22,6 +22,7 @@ import com.google.common.collect.*; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; @@ -66,6 +67,25 @@ public class CSharpNancyFXServerCodegen extends AbstractCSharpCodegen { private boolean asyncServer = false; public CSharpNancyFXServerCodegen() { + super(); + + featureSet = getFeatureSet().modify() + .excludeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + getName(); apiTemplateFiles.put("api.mustache", ".cs"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 20013cdf8e..4556749168 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -21,6 +21,7 @@ import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -83,6 +84,31 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { public CSharpNetCoreClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + // mapped non-nullable type without ? typeMapping = new HashMap(); typeMapping.put("string", "string"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java index 7f8527cec8..f7ca751bc2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -56,6 +57,26 @@ public class ClojureClientCodegen extends DefaultCodegen implements CodegenConfi public ClojureClientCodegen() { super(); + + // TODO: Clojure maintainer review + featureSet = getFeatureSet().modify() + .excludeDocumentationFeatures( + DocumentationFeature.Readme + ) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .build(); + outputFolder = "generated-code" + File.separator + "clojure"; modelTemplateFiles.put("spec.mustache", ".clj"); apiTemplateFiles.put("api.mustache", ".clj"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java index 545fc55308..e1633b8d2e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.util.*; @@ -33,6 +34,23 @@ public class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConf public ConfluenceWikiCodegen() { super(); + + // TODO: ConfluenceWiki maintainer review + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.noneOf(DocumentationFeature.class)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeParameterFeatures(ParameterFeature.Cookie) + .includeWireFormatFeatures( + WireFormatFeature.JSON, + WireFormatFeature.XML, + WireFormatFeature.Custom + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union + ) + .build(); + outputFolder = "docs"; embeddedTemplateDir = templateDir = "confluenceWikiDocs"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java index 3de0cbf5b9..ef0ef650d7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java @@ -22,17 +22,15 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.servers.Server; -import io.swagger.v3.oas.models.OpenAPI; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; -import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; -import java.net.URL; import static org.openapitools.codegen.utils.StringUtils.*; @@ -67,6 +65,26 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen { public CppPistacheServerCodegen() { super(); + + // TODO: cpp-pistache-server maintainer review + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + if (StringUtils.isEmpty(modelNamePrefix)) { modelNamePrefix = PREFIX; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java index 7ab3d8bfef..22150b58bf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java @@ -9,6 +9,7 @@ import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenParameter; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -29,6 +30,25 @@ public class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen public CppQt5AbstractCodegen() { super(); + + featureSet = getFeatureSet().modify() + .excludeWireFormatFeatures(WireFormatFeature.PROTOBUF) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // set modelNamePrefix as default for QHttpEngine Server if (StringUtils.isEmpty(modelNamePrefix)) { modelNamePrefix = PREFIX; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java index a462164107..01d0536f9c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java @@ -23,6 +23,7 @@ import io.swagger.v3.oas.models.servers.Server; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.URLPathUtils; import java.io.File; @@ -43,6 +44,10 @@ public class CppQt5QHttpEngineServerCodegen extends CppQt5AbstractCodegen implem public CppQt5QHttpEngineServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + // set the output folder here outputFolder = "generated-code/cpp-qt5-qhttpengine-server"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java index 25be57289d..c26eafc126 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java @@ -26,12 +26,12 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.util.*; import static com.google.common.base.Strings.isNullOrEmpty; -import static org.openapitools.codegen.utils.StringUtils.*; public class CppRestSdkClientCodegen extends AbstractCppCodegen { @@ -79,6 +79,29 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen { public CppRestSdkClientCodegen() { super(); + // TODO: cpp-restsdk maintainer review + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.OAuth2_Implicit, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + apiPackage = "org.openapitools.client.api"; modelPackage = "org.openapitools.client.model"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java index 5fbfb127a1..db8ee00a19 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.LoggerFactory; @@ -44,6 +45,25 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { public CppRestbedServerCodegen() { super(); + // TODO: cpp-restbed-server maintainer review + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + apiPackage = "org.openapitools.server.api"; modelPackage = "org.openapitools.server.model"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java index f22e668550..7d7f25a3a6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java @@ -23,10 +23,12 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; @@ -39,6 +41,28 @@ public class CppTizenClientCodegen extends AbstractCppCodegen implements Codegen public CppTizenClientCodegen() { super(); + + // TODO: cpp-tizen maintainer review + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.BearerToken + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.MultiServer + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = ""; modelTemplateFiles.put("model-header.mustache", ".h"); modelTemplateFiles.put("model-body.mustache", ".cpp"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index 4f6d03b4ca..f57f18a963 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,37 +37,6 @@ import java.util.*; import static org.openapitools.codegen.utils.StringUtils.camelize; import static org.openapitools.codegen.utils.StringUtils.underscore; -// import static org.openapitools.codegen.utils.StringUtils.camelize; -// import static org.openapitools.codegen.utils.StringUtils.underscore; - -// import java.io.BufferedReader; -// import java.io.File; -// import java.io.FileInputStream; -// import java.io.InputStreamReader; -// import java.nio.charset.Charset; -// import java.util.ArrayList; -// import java.util.Arrays; -// import java.util.HashMap; -// import java.util.HashSet; -// import java.util.List; -// import java.util.Map; -// import java.util.Set; - -// import javax.xml.validation.Schema; - -// import org.apache.commons.io.FilenameUtils; -// import org.openapitools.codegen.CodegenConfig; -// import org.openapitools.codegen.CodegenConstants; -// import org.openapitools.codegen.CodegenModel; -// import org.openapitools.codegen.CodegenProperty; -// import org.openapitools.codegen.CodegenType; -// import org.openapitools.codegen.DefaultCodegen; -// import org.openapitools.codegen.utils.ModelUtils; -// import org.openapitools.codegen.utils.StringUtils; -// import org.slf4j.LoggerFactory; - -// import io.swagger.v3.oas.models.media.ArraySchema; - public class DartClientCodegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(DartClientCodegen.class); @@ -96,6 +66,30 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig { public DartClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + // clear import mapping (from default generator) as dart does not use it at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java index 88cf8535b4..6f1f1b2a37 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java @@ -17,6 +17,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import io.swagger.v3.oas.models.media.*; @@ -56,6 +57,31 @@ public class DartJaguarClientCodegen extends DartClientCodegen { public DartJaguarClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + browserClient = false; outputFolder = "generated-code/dart-jaguar"; embeddedTemplateDir = templateDir = "dart-jaguar"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java index 8f7125ae3d..55550123a8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java @@ -21,10 +21,12 @@ import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; import java.util.Locale; import java.util.UUID; @@ -58,6 +60,32 @@ public class EiffelClientCodegen extends AbstractEiffelCodegen { public EiffelClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + uuid = UUID.randomUUID(); uuidTest = UUID.randomUUID(); outputFolder = "generated-code/Eiffel"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java index 165ec84281..9e5a56cb25 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java @@ -26,6 +26,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.responses.ApiResponse; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,6 +61,29 @@ public class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig public ElixirClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.BasicAuth + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + // set the output folder here outputFolder = "generated-code/elixir"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java index 15bfcb0103..6bb00f2458 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java @@ -23,6 +23,7 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -69,6 +70,28 @@ public class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { public ElmClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + outputFolder = "generated-code/elm"; modelTemplateFiles.put("model.mustache", ".elm"); templateDir = "elm"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java index f924229a17..763bbfae6f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java @@ -21,6 +21,7 @@ import com.samskivert.mustache.Mustache; import com.samskivert.mustache.Template; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.templating.mustache.JoinWithCommaLambda; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,6 +57,28 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig public ErlangClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of(SecurityFeature.ApiKey)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + outputFolder = "generated-code/erlang"; modelTemplateFiles.put("model.mustache", ".erl"); apiTemplateFiles.put("api.mustache", ".erl"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java index 011501670b..29eda6a0f7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java @@ -21,6 +21,7 @@ import com.samskivert.mustache.Template; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,6 +59,31 @@ public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig public ErlangProperCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + outputFolder = "generated-code/erlang"; modelTemplateFiles.put("model.mustache", ".erl"); apiTemplateFiles.put("api.mustache", "_api.erl"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java index d9c280cfc6..e9986d000b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java @@ -18,11 +18,13 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -41,6 +43,27 @@ public class ErlangServerCodegen extends DefaultCodegen implements CodegenConfig public ErlangServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // set the output folder here outputFolder = "generated-code/erlang-server"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java index ec5a866705..fa4d9d1d65 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java @@ -20,12 +20,14 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashMap; import java.util.Locale; @@ -44,6 +46,29 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig public FlashClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + modelPackage = "org.openapitools.client.model"; apiPackage = "org.openapitools.client.api"; outputFolder = "generated-code" + File.separatorChar + "flash"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java index c82a819bd9..496cad4086 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java @@ -29,6 +29,7 @@ import java.util.*; import org.apache.commons.lang3.StringUtils; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,6 +53,29 @@ public class FsharpFunctionsServerCodegen extends AbstractFSharpCodegen { public FsharpFunctionsServerCodegen() { super(); + // TODO: There's a README.mustache, but it doesn't seem to be referenced… + featureSet = getFeatureSet().modify() +// .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling, + GlobalFeature.BasePath, + GlobalFeature.Host + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) .build(); @@ -115,8 +139,6 @@ public class FsharpFunctionsServerCodegen extends AbstractFSharpCodegen { supportingFiles.add(new SupportingFile("host.json", "", "host.json")); supportingFiles.add(new SupportingFile("local.settings.json", "", "local.settings.json")); supportingFiles.add(new SupportingFile("Project.fsproj.mustache", projectFolder, packageName + ".fsproj")); - - } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java index c3f172713b..d62461e57f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java @@ -25,6 +25,7 @@ import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,6 +61,9 @@ public class FsharpGiraffeServerCodegen extends AbstractFSharpCodegen { public FsharpGiraffeServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java index 9e5080cf1f..4b926fd3ef 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java @@ -21,10 +21,12 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; public class GoClientCodegen extends AbstractGoCodegen { @@ -42,6 +44,32 @@ public class GoClientCodegen extends AbstractGoCodegen { public GoClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + outputFolder = "generated-code/go"; modelTemplateFiles.put("model.mustache", ".go"); apiTemplateFiles.put("api.mustache", ".go"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java index 46509d8b55..576931f440 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java @@ -20,11 +20,13 @@ import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -40,6 +42,26 @@ public class GoGinServerCodegen extends AbstractGoCodegen { public GoGinServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // set the output folder here outputFolder = "generated-code/go"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java index e37f80bf40..c0ecbb7a9a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java @@ -23,11 +23,13 @@ import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenParameter; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -45,6 +47,26 @@ public class GoServerCodegen extends AbstractGoCodegen { public GoServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // set the output folder here outputFolder = "generated-code/go"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java index fbf8e0b7cb..11cf0bb20c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java @@ -20,11 +20,13 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; public class GraphQLNodeJSExpressServerCodegen extends AbstractGraphQLCodegen implements CodegenConfig { @@ -48,6 +50,26 @@ public class GraphQLNodeJSExpressServerCodegen extends AbstractGraphQLCodegen im public GraphQLNodeJSExpressServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + packageName = "openapi3graphql-server"; packageVersion = "1.0.0"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java index bb135be8f2..a003ecc576 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java @@ -20,9 +20,12 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.EnumSet; + public class GraphQLSchemaCodegen extends AbstractGraphQLCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(GraphQLSchemaCodegen.class); @@ -42,6 +45,24 @@ public class GraphQLSchemaCodegen extends AbstractGraphQLCodegen implements Code public GraphQLSchemaCodegen() { super(); + + featureSet = getFeatureSet().modify() +// .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + outputFolder = "generated-code/graphql-schema"; modelTemplateFiles.put("model.mustache", ".graphql"); apiTemplateFiles.put("api.mustache", ".graphql"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java index ecae95083c..804aef64e7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java @@ -18,8 +18,10 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import java.io.File; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -31,6 +33,27 @@ public class GroovyClientCodegen extends AbstractJavaCodegen { public GroovyClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + // avoid importing the following as models languageSpecificPrimitives.add("Date"); languageSpecificPrimitives.add("ArrayList"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java index 35195ca1dc..40b630906d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java @@ -27,6 +27,7 @@ import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -145,6 +146,32 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC public HaskellHttpClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + this.prependFormOrBodyParameters = true; // override the mapping to keep the original mapping in Haskell diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java index 8a0d098009..3d49225891 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -79,6 +80,28 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf public HaskellServantCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // override the mapping to keep the original mapping in Haskell specialCharReplacements.put("-", "Dash"); specialCharReplacements.put(">", "GreaterThan"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java index 9a00ca8704..da504db4ca 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java @@ -25,10 +25,12 @@ import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.DefaultCodegen; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashSet; public class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig { @@ -73,6 +75,30 @@ public class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig public JMeterClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + // set the output folder here outputFolder = "generated-code/JMeterClientCodegen"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index 3138fae2a2..ef591c7b30 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -23,8 +23,8 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.GzipFeatures; import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.templating.mustache.CaseFormatLambda; -import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -106,6 +106,10 @@ public class JavaClientCodegen extends AbstractJavaCodegen public JavaClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code" + File.separator + "java"; embeddedTemplateDir = templateDir = "Java"; invokerPackage = "org.openapitools.client"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java index d44daedd70..a1ef139f6d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java @@ -22,6 +22,7 @@ import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.config.GlobalSettings; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,6 +41,10 @@ public class JavaInflectorServerCodegen extends AbstractJavaCodegen { public JavaInflectorServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + sourceFolder = "src/gen/java"; apiTestTemplateFiles.clear(); // TODO: add test template embeddedTemplateDir = templateDir = "JavaInflector"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java index bb969ae172..f954285d8e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java @@ -17,23 +17,19 @@ package org.openapitools.codegen.languages; -import static org.openapitools.codegen.utils.StringUtils.camelize; - import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.Schema; - import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.CodegenModel; -import org.openapitools.codegen.CodegenOperation; -import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; +import static org.openapitools.codegen.utils.StringUtils.camelize; + public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { public static final String INTERFACE_ONLY = "interfaceOnly"; @@ -59,6 +55,11 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { public JavaJAXRSSpecServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + invokerPackage = "org.openapitools.api"; artifactId = "openapi-jaxrs-server"; outputFolder = "generated-code/JavaJaxRS-Spec"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java index be6467cb9b..0ee67836a4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.Operation; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.util.*; @@ -40,6 +41,10 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen { public JavaJerseyServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code/JavaJaxRS-Jersey"; apiTemplateFiles.put("apiService.mustache", ".java"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java index b7a16a6178..a39440ef40 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.Operation; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.util.ArrayList; import java.util.HashMap; @@ -37,6 +38,11 @@ public class JavaMSF4JServerCodegen extends AbstractJavaJAXRSServerCodegen { public JavaMSF4JServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code/JavaJaxRS-MSF4J"; apiTemplateFiles.put("apiService.mustache", ".java"); apiTemplateFiles.put("apiServiceImpl.mustache", ".java"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java index e23d9237d0..be0ccd395f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.PathItem; import io.swagger.v3.oas.models.tags.Tag; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.URLPathUtils; import java.io.File; @@ -53,6 +54,10 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen { public JavaPKMSTServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + groupId = "com.prokarma"; artifactId = "pkmst-microservice"; embeddedTemplateDir = templateDir = "java-pkmst"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java index 93dccdd8fe..99da073cc8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.io.File; import java.util.List; @@ -53,6 +54,11 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea public JavaPlayFrameworkCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code/javaPlayFramework"; apiTestTemplateFiles.clear(); embeddedTemplateDir = templateDir = "JavaPlayFramework"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java index 17e8966007..26864dd1a6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java @@ -24,6 +24,7 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.JbossFeature; import org.openapitools.codegen.languages.features.SwaggerFeatures; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.io.File; import java.util.ArrayList; @@ -38,9 +39,12 @@ public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen protected boolean useSwaggerFeature = false; public JavaResteasyEapServerCodegen() { - super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + artifactId = "openapi-jaxrs-resteasy-eap-server"; useBeanValidation = true; outputFolder = "generated-code/JavaJaxRS-Resteasy-eap"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java index af97dc3c20..dda2731b01 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java @@ -22,6 +22,7 @@ import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.JbossFeature; +import org.openapitools.codegen.meta.features.DocumentationFeature; import java.io.File; import java.util.ArrayList; @@ -34,9 +35,12 @@ public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen im protected boolean generateJbossDeploymentDescriptor = true; public JavaResteasyServerCodegen() { - super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + artifactId = "openapi-jaxrs-resteasy-server"; outputFolder = "generated-code/JavaJaxRS-Resteasy"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java index afa273f285..64575cf08a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import org.apache.commons.lang3.BooleanUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.config.GlobalSettings; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,6 +42,10 @@ public class JavaUndertowServerCodegen extends AbstractJavaCodegen { public JavaUndertowServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + embeddedTemplateDir = templateDir = "java-undertow-server"; invokerPackage = "org.openapitools.handler"; artifactId = "openapi-undertow-server"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java index d0e1cf14c0..36a9df5ad4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java @@ -24,6 +24,7 @@ import io.swagger.v3.oas.models.PathItem.HttpMethod; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.URLPathUtils; import java.io.File; @@ -58,6 +59,10 @@ public class JavaVertXServerCodegen extends AbstractJavaCodegen { public JavaVertXServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + // set the output folder here outputFolder = "generated-code" + File.separator + "javaVertXServer"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index ce6b34343e..4e9d82ccdb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -17,7 +17,6 @@ package org.openapitools.codegen.languages; -import com.google.common.base.Strings; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; @@ -26,6 +25,7 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -92,6 +92,11 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo public JavascriptClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code/js"; modelTemplateFiles.put("model.mustache", ".js"); modelTestTemplateFiles.put("model_test.mustache", ".js"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java index 21fd8ea4f8..182b9bbacd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java @@ -19,14 +19,12 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; -import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.parser.util.SchemaTypeUtil; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; -import java.text.SimpleDateFormat; import java.util.*; import static org.openapitools.codegen.utils.StringUtils.dashize; @@ -39,6 +37,10 @@ public class JavascriptFlowtypedClientCodegen extends AbstractTypeScriptClientCo public JavascriptFlowtypedClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + // clear import mapping (from default generator) as TS does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 85bffe3f05..92c85c4038 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -25,6 +25,7 @@ import org.openapitools.codegen.CodegenParameter; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import java.io.File; import java.util.HashMap; @@ -95,6 +96,34 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen { public KotlinClientCodegen() { super(); + /* + * OAuth flows supported _only_ by client explicitly setting bearer token. The "flows" are not supported. + */ + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .excludeWireFormatFeatures(WireFormatFeature.XML, WireFormatFeature.PROTOBUF) + .excludeSecurityFeatures( + SecurityFeature.OpenIDConnect, + SecurityFeature.OAuth2_Password, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Implicit + ) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures(ClientModificationFeature.BasePath) + .build(); + artifactId = "kotlin-client"; packageName = "org.openapitools.client"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java index de4b755c2b..10883a7149 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java @@ -23,11 +23,13 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -58,6 +60,28 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen { public KotlinServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + artifactId = "kotlin-server"; packageName = "org.openapitools.server"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index f5ca516d50..5957f20752 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -26,6 +26,7 @@ import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -84,6 +85,28 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen public KotlinSpringServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + reservedWords.addAll(VARIABLE_RESERVED_WORDS); outputFolder = "generated-code/kotlin-spring"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java index 36fddf1812..fe583b862e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java @@ -21,11 +21,12 @@ import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; -import java.util.Locale; +import java.util.EnumSet; public class KotlinVertxServerCodegen extends AbstractKotlinCodegen { @@ -53,6 +54,26 @@ public class KotlinVertxServerCodegen extends AbstractKotlinCodegen { public KotlinVertxServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf( + SecurityFeature.class + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) .build(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java index fd647aaa2e..70e280accc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -55,6 +56,29 @@ public class LuaClientCodegen extends DefaultCodegen implements CodegenConfig { public LuaClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/lua"; modelTemplateFiles.put("model.mustache", ".lua"); apiTemplateFiles.put("api.mustache", ".lua"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java index 788a981f75..22ec3f631f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java @@ -17,6 +17,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -61,6 +62,21 @@ public class MysqlSchemaCodegen extends DefaultCodegen implements CodegenConfig public MysqlSchemaCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.noneOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .clientModificationFeatures(EnumSet.noneOf(ClientModificationFeature.class)) + .build(); // clear import mapping (from default generator) as mysql does not use import directives importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java index 939f7e6249..71dee2f682 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.StringSchema; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.StringUtils; import org.slf4j.Logger; @@ -31,7 +32,6 @@ import java.io.File; import java.util.*; import static org.openapitools.codegen.utils.StringUtils.camelize; -import static org.openapitools.codegen.utils.StringUtils.underscore; public class NimClientCodegen extends DefaultCodegen implements CodegenConfig { static Logger LOGGER = LoggerFactory.getLogger(NimClientCodegen.class); @@ -56,6 +56,28 @@ public class NimClientCodegen extends DefaultCodegen implements CodegenConfig { public NimClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) .build(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java index 9b9dd6ce40..4208321258 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java @@ -28,6 +28,7 @@ import io.swagger.v3.oas.models.info.Info; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,7 +37,6 @@ import java.io.File; import java.net.URL; import java.util.*; import java.util.Map.Entry; -import java.util.regex.Pattern; import static org.openapitools.codegen.utils.StringUtils.*; @@ -55,6 +55,26 @@ public class NodeJSExpressServerCodegen extends DefaultCodegen implements Codege public NodeJSExpressServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.BETA) .build(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java index 108aa7a788..c697ce827c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java @@ -30,6 +30,7 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,6 +61,24 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig public NodeJSServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // mark the generator as deprecated in the documentation generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.DEPRECATED) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java index feffa95ddd..f383324352 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -72,6 +73,28 @@ public class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig public OCamlClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + + outputFolder = "generated-code/ocaml"; modelTemplateFiles.put("model.mustache", ".ml"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java index 510d0c15a5..6b3d9c086c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,6 +64,30 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { public ObjcClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + supportsInheritance = true; outputFolder = "generated-code" + File.separator + "objc"; modelTemplateFiles.put("model-header.mustache", ".h"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java index ae97d9dbce..0025801666 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java @@ -23,11 +23,13 @@ import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.serializer.SerializerUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; public class OpenAPIGenerator extends DefaultCodegen implements CodegenConfig { @@ -35,6 +37,17 @@ public class OpenAPIGenerator extends DefaultCodegen implements CodegenConfig { public OpenAPIGenerator() { super(); + + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.allOf(DocumentationFeature.class)) + .dataTypeFeatures(EnumSet.allOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.allOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.allOf(SecurityFeature.class)) + .globalFeatures(EnumSet.allOf(GlobalFeature.class)) + .parameterFeatures(EnumSet.allOf(ParameterFeature.class)) + .schemaSupportFeatures(EnumSet.allOf(SchemaSupportFeature.class)) + .build(); + embeddedTemplateDir = templateDir = "openapi"; outputFolder = "generated-code/openapi"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java index 02481665a5..42225f848a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java @@ -18,6 +18,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.templating.mustache.OnChangeLambda; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -28,6 +29,7 @@ import com.samskivert.mustache.Mustache.Lambda; import io.swagger.v3.oas.models.Operation; import java.util.ArrayList; +import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -40,6 +42,17 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi public OpenAPIYamlGenerator() { super(); + + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.allOf(DocumentationFeature.class)) + .dataTypeFeatures(EnumSet.allOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.allOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.allOf(SecurityFeature.class)) + .globalFeatures(EnumSet.allOf(GlobalFeature.class)) + .parameterFeatures(EnumSet.allOf(ParameterFeature.class)) + .schemaSupportFeatures(EnumSet.allOf(SchemaSupportFeature.class)) + .build(); + embeddedTemplateDir = templateDir = "openapi-yaml"; outputFolder = "generated-code/openapi-yaml"; cliOptions.add(CliOption.newString(OUTPUT_NAME, "Output filename").defaultValue(outputFile)); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java index 7036c71507..cdd8a10fad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java @@ -22,12 +22,14 @@ import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.regex.Matcher; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -49,6 +51,30 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { public PerlClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + // add multiple inheritance support (beta) supportsMultipleInheritance = true; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java index d871b1cf39..d18ce438ec 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java @@ -22,12 +22,14 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.ArrayList; import java.util.Collections; +import java.util.EnumSet; import java.util.List; public class PhpClientCodegen extends AbstractPhpCodegen { @@ -37,6 +39,21 @@ public class PhpClientCodegen extends AbstractPhpCodegen { public PhpClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + // clear import mapping (from default generator) as php does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java index 47a5b9a08e..ee6f6467b9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import java.io.File; import java.util.*; @@ -65,6 +66,21 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen { public PhpLaravelServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + embeddedTemplateDir = templateDir = "php-laravel"; variableNamingConvention = "camelCase"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java index e2fd0eec18..a26e4e8bed 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import java.io.File; import java.util.*; @@ -61,6 +62,21 @@ public class PhpLumenServerCodegen extends AbstractPhpCodegen { public PhpLumenServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + embeddedTemplateDir = templateDir = "php-lumen"; /* diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java index 983ed07181..7bfdd01e9b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -38,6 +39,21 @@ public class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConf public PhpSilexServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + invokerPackage = camelize("OpenAPIServer"); String packageName = "OpenAPIServer"; modelPackage = "lib" + File.separator + "models"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java index dac4cd5774..edda290c64 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java @@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,6 +49,21 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen { public PhpSlimServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) .stability(Stability.DEPRECATED) .build(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java index d6025d2bb2..890431b956 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -80,6 +81,21 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg public PhpSymfonyServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + // clear import mapping (from default generator) as php does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java index 337978615f..9356873fc0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java @@ -25,6 +25,7 @@ import io.swagger.v3.oas.models.media.*; import io.swagger.v3.oas.models.parameters.Parameter; import io.swagger.v3.oas.models.parameters.QueryParameter; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -57,6 +58,22 @@ public class PhpZendExpressivePathHandlerServerCodegen extends AbstractPhpCodege public PhpZendExpressivePathHandlerServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .build(); + //no point to use double - http://php.net/manual/en/language.types.float.php , especially because of PHP 7+ float type declaration typeMapping.put("double", "float"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java index 24983cef3b..925fdb7065 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ProcessUtils; import org.slf4j.Logger; @@ -49,6 +50,28 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo public PowerShellClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "powershell"; modelTemplateFiles.put("model.mustache", ".ps1"); apiTemplateFiles.put("api.mustache", ".ps1"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java index 93b7faf09e..3af77bee7d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java @@ -19,13 +19,15 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; -import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.DocumentationFeature; +import org.openapitools.codegen.meta.features.SecurityFeature; +import org.openapitools.codegen.meta.features.WireFormatFeature; import org.openapitools.codegen.utils.ProcessUtils; import org.openapitools.codegen.utils.ModelUtils; @@ -67,6 +69,13 @@ public class ProtobufSchemaCodegen extends DefaultCodegen implements CodegenConf .stability(Stability.BETA) .build(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .includeWireFormatFeatures(WireFormatFeature.PROTOBUF) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.PROTOBUF)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .build(); + outputFolder = "generated-code/protobuf-schema"; modelTemplateFiles.put("model.mustache", ".proto"); apiTemplateFiles.put("api.mustache", ".proto"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java index 5b6e133cac..46ab49f8f4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java @@ -32,6 +32,7 @@ import io.swagger.v3.oas.models.security.SecurityScheme; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -63,6 +64,11 @@ public class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme public PythonAbstractConnexionServerCodegen(String templateDirectory, boolean fixBodyNameValue) { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + fixBodyName = fixBodyNameValue; modelPackage = "models"; testPackage = "test"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java index eac3c6b0b2..e083e39496 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java @@ -16,14 +16,41 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.EnumSet; + public class PythonAiohttpConnexionServerCodegen extends PythonAbstractConnexionServerCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(PythonAiohttpConnexionServerCodegen.class); public PythonAiohttpConnexionServerCodegen() { super("python-aiohttp", true); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + testPackage = "tests"; embeddedTemplateDir = templateDir = "python-aiohttp"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java index f45a2f6510..a0908990e2 100755 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java @@ -17,10 +17,12 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; public class PythonBluePlanetServerCodegen extends PythonAbstractConnexionServerCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(PythonBluePlanetServerCodegen.class); @@ -30,6 +32,30 @@ public class PythonBluePlanetServerCodegen extends PythonAbstractConnexionServer public PythonBluePlanetServerCodegen() { super("python-blueplanet", true); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + testPackage = "tests"; embeddedTemplateDir = templateDir = "python-blueplanet"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index ef410594ec..99943b209b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -24,6 +24,7 @@ import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,6 +59,29 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig public PythonClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // clear import mapping (from default generator) as python does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 1467060a88..5d8d9089db 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -29,6 +29,7 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.examples.ExampleGenerator; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; @@ -50,8 +51,32 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { public PythonClientExperimentalCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + // this may set datatype right for additional properties instantiationTypes.put("map", "dict"); + languageSpecificPrimitives.add("file_type"); languageSpecificPrimitives.add("none_type"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index c451a5166a..378421c1ad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -23,6 +23,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -69,6 +70,33 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { public RClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + outputFolder = "generated-code/r"; modelTemplateFiles.put("model.mustache", ".R"); apiTemplateFiles.put("api.mustache", ".R"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index ad1e947978..992cebfc57 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -22,13 +22,14 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.parameters.Parameter; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; -import java.util.Iterator; +import java.util.EnumSet; import java.util.Locale; import java.util.Map; @@ -69,6 +70,33 @@ public class RubyClientCodegen extends AbstractRubyCodegen { public RubyClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.BearerToken, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + supportsInheritance = true; // clear import mapping (from default generator) as ruby does not use it diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java index 25a9eed5da..1bec9edbd6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java @@ -22,11 +22,13 @@ import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.text.SimpleDateFormat; +import java.util.EnumSet; import java.util.Locale; import java.util.Map; @@ -71,6 +73,25 @@ public class RubyOnRailsServerCodegen extends AbstractRubyCodegen { public RubyOnRailsServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "rails5"; apiPackage = "app/controllers"; apiTemplateFiles.put("controller.mustache", ".rb"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java index 0bac873423..9326ea91e6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java @@ -20,10 +20,12 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.util.EnumSet; import java.util.Map; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -40,6 +42,25 @@ public class RubySinatraServerCodegen extends AbstractRubyCodegen { public RubySinatraServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + apiPackage = "lib"; outputFolder = "generated-code" + File.separator + "sinatra"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index cdac07896c..6991f272bf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.StringUtils; import org.slf4j.Logger; @@ -62,6 +63,33 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig { public RustClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + outputFolder = "generated-code/rust"; modelTemplateFiles.put("model.mustache", ".rs"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index 92d66ddee8..c9535fe926 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -30,6 +30,7 @@ import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.URLPathUtils; import org.slf4j.Logger; @@ -74,6 +75,34 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { public RustServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism, + SchemaSupportFeature.Union, + SchemaSupportFeature.Composite + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + + // Show the generation timestamp by default hideGenerationTimestamp = Boolean.FALSE; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java index 749ffeadd4..7fca9da3c8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java @@ -17,7 +17,6 @@ package org.openapitools.codegen.languages; -import com.google.common.base.CaseFormat; import com.samskivert.mustache.Mustache; import com.samskivert.mustache.Template; import io.swagger.v3.oas.models.media.ArraySchema; @@ -25,6 +24,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.security.SecurityScheme; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,6 +56,32 @@ public class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements Code public ScalaAkkaClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath, + ClientModificationFeature.UserAgent + ) + .build(); + outputFolder = "generated-code/scala-akka"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java index 64696f6896..fa2c969c16 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java @@ -20,6 +20,7 @@ package org.openapitools.codegen.languages; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -35,6 +36,25 @@ public class ScalaFinchServerCodegen extends DefaultCodegen implements CodegenCo public ScalaFinchServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/finch"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java index 47af557626..6cb7812228 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java @@ -28,6 +28,7 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -77,6 +78,30 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen public ScalaGatlingCodegen() { super(); + // Although the generator supports authorization, it's done via manual header modification and it's done + // globally. This means it doesn't _technically_ support auth per OpenAPI Spec (which would allow, for example, a different API key per operation), + // so it's not listed here as supported. + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + sourceFolder = "src" + File.separator + "gatling" + File.separator + "scala"; // set the output folder here diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java index 433519a710..5ab68b7f6c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java @@ -21,11 +21,13 @@ import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashMap; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -53,6 +55,27 @@ public class ScalaHttpClientCodegen extends AbstractScalaCodegen implements Code .stability(Stability.DEPRECATED) .build(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .includeClientModificationFeatures( + ClientModificationFeature.BasePath + ) + .build(); + outputFolder = "generated-code/scala-http-client"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java index 2d331b2d31..e196cf9fec 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java @@ -19,6 +19,7 @@ package org.openapitools.codegen.languages; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -38,6 +39,24 @@ public class ScalaLagomServerCodegen extends AbstractScalaCodegen implements Cod public ScalaLagomServerCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/scala-lagom-server"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java index 22bcbf8f61..ccc65a54b2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java @@ -22,16 +22,14 @@ import com.samskivert.mustache.Mustache.Lambda; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.templating.mustache.IndentedLambda; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -59,6 +57,25 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem public ScalaPlayFrameworkServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "scala-play-server"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java index 91176fbf25..3aeba0eb1f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java @@ -18,6 +18,7 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import java.util.*; @@ -29,6 +30,25 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg public ScalatraServerCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/scalatra"; modelTemplateFiles.put("model.mustache", ".scala"); apiTemplateFiles.put("api.mustache", ".scala"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java index e385ccca20..db65acdf6c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java @@ -23,6 +23,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,6 +33,7 @@ import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.util.Arrays; +import java.util.EnumSet; import java.util.HashMap; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -42,6 +44,24 @@ public class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen public ScalazClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/scalaz"; embeddedTemplateDir = templateDir = "scalaz"; apiPackage = "org.openapitools.client.api"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 9c1cee2685..7f1eaf47a5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -26,6 +26,7 @@ import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; import org.openapitools.codegen.languages.features.OptionalFeatures; import org.openapitools.codegen.languages.features.PerformBeanValidationFeatures; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.templating.mustache.SplitStringLambda; import org.openapitools.codegen.templating.mustache.TrimWhitespaceLambda; import org.openapitools.codegen.utils.URLPathUtils; @@ -101,6 +102,33 @@ public class SpringCodegen extends AbstractJavaCodegen public SpringCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom)) + .securityFeatures(EnumSet.of( + SecurityFeature.OAuth2_Implicit, + SecurityFeature.OAuth2_AuthorizationCode, + SecurityFeature.OAuth2_ClientCredentials, + SecurityFeature.OAuth2_Password, + SecurityFeature.ApiKey, + SecurityFeature.BasicAuth + )) + .excludeGlobalFeatures( + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code/javaSpring"; embeddedTemplateDir = templateDir = "JavaSpring"; apiPackage = "org.openapitools.api"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java index 8a097acde9..0ec8faff99 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java @@ -18,8 +18,10 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import java.io.File; +import java.util.EnumSet; public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig { protected String invokerPackage = "org.openapitools.client"; @@ -31,6 +33,16 @@ public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig { public StaticDocCodegen() { super(); + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.allOf(DocumentationFeature.class)) + .dataTypeFeatures(EnumSet.allOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.allOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.allOf(SecurityFeature.class)) + .globalFeatures(EnumSet.allOf(GlobalFeature.class)) + .parameterFeatures(EnumSet.allOf(ParameterFeature.class)) + .schemaSupportFeatures(EnumSet.allOf(SchemaSupportFeature.class)) + .build(); + // clear import mapping (from default generator) as this generator does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java index c1daf315ea..b763eb2308 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java @@ -27,6 +27,7 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.Markdown; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; @@ -52,6 +53,17 @@ public class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi public StaticHtml2Generator() { super(); + + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.allOf(DocumentationFeature.class)) + .dataTypeFeatures(EnumSet.allOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.allOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.allOf(SecurityFeature.class)) + .globalFeatures(EnumSet.allOf(GlobalFeature.class)) + .parameterFeatures(EnumSet.allOf(ParameterFeature.class)) + .schemaSupportFeatures(EnumSet.allOf(SchemaSupportFeature.class)) + .build(); + outputFolder = "docs"; embeddedTemplateDir = templateDir = "htmlDocs2"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java index 7386270d3f..326ecc83c5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java @@ -24,6 +24,7 @@ import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.Markdown; import org.openapitools.codegen.utils.ModelUtils; @@ -39,6 +40,17 @@ public class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig public StaticHtmlGenerator() { super(); + + featureSet = getFeatureSet().modify() + .documentationFeatures(EnumSet.allOf(DocumentationFeature.class)) + .dataTypeFeatures(EnumSet.allOf(DataTypeFeature.class)) + .wireFormatFeatures(EnumSet.allOf(WireFormatFeature.class)) + .securityFeatures(EnumSet.allOf(SecurityFeature.class)) + .globalFeatures(EnumSet.allOf(GlobalFeature.class)) + .parameterFeatures(EnumSet.allOf(ParameterFeature.class)) + .schemaSupportFeatures(EnumSet.allOf(SchemaSupportFeature.class)) + .build(); + outputFolder = "docs"; embeddedTemplateDir = templateDir = "htmlDocs"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java index 61a5e654fd..741afe492d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java @@ -26,6 +26,7 @@ import org.apache.commons.lang3.text.WordUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -75,6 +76,23 @@ public class Swift3Codegen extends DefaultCodegen implements CodegenConfig { .stability(Stability.DEPRECATED) .build(); + featureSet = getFeatureSet().modify() + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "swift"; modelTemplateFiles.put("model.mustache", ".swift"); apiTemplateFiles.put("api.mustache", ".swift"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index 54b8588257..1815b649ec 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -24,6 +24,7 @@ import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.text.WordUtils; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -76,6 +77,28 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { */ public Swift4Codegen() { super(); + + featureSet = getFeatureSet().modify() + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.of( + SecurityFeature.BasicAuth, + SecurityFeature.ApiKey, + SecurityFeature.OAuth2_Implicit + )) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .includeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "swift"; modelTemplateFiles.put("model.mustache", ".swift"); apiTemplateFiles.put("api.mustache", ".swift"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java index 7f3b529988..33f991ef53 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java @@ -27,6 +27,7 @@ import org.apache.commons.lang3.text.WordUtils; import org.openapitools.codegen.*; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; +import org.openapitools.codegen.meta.features.*; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -94,6 +95,23 @@ public class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig .stability(Stability.DEPRECATED) .build(); + featureSet = getFeatureSet().modify() + .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON)) + .securityFeatures(EnumSet.noneOf(SecurityFeature.class)) + .excludeGlobalFeatures( + GlobalFeature.XMLStructureDefinitions, + GlobalFeature.Callbacks, + GlobalFeature.LinkObjects, + GlobalFeature.ParameterStyling + ) + .excludeSchemaSupportFeatures( + SchemaSupportFeature.Polymorphism + ) + .excludeParameterFeatures( + ParameterFeature.Cookie + ) + .build(); + outputFolder = "generated-code" + File.separator + "swift"; modelTemplateFiles.put("model.mustache", ".swift"); apiTemplateFiles.put("api.mustache", ".swift"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index 832152b892..b7fdfe07ae 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -17,10 +17,9 @@ package org.openapitools.codegen.languages; -import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.Schema; -import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.SemVer; import org.slf4j.Logger; @@ -28,7 +27,6 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; -import java.util.regex.Pattern; import static org.apache.commons.lang3.StringUtils.capitalize; import static org.openapitools.codegen.utils.StringUtils.*; @@ -71,6 +69,11 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode public TypeScriptAngularClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + this.outputFolder = "generated-code/typescript-angular"; supportsMultipleInheritance = true; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index 3976629470..633a8ff3ce 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -17,7 +17,6 @@ package org.openapitools.codegen.languages; -import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.apache.commons.lang3.StringUtils; @@ -26,9 +25,9 @@ import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenOperation; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; -import java.text.SimpleDateFormat; import java.util.*; public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodegen { @@ -45,6 +44,10 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege public TypeScriptAxiosClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + // clear import mapping (from default generator) as TS does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java index 966fe26218..baee47295d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -47,6 +48,10 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege public TypeScriptFetchClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + // clear import mapping (from default generator) as TS does not use it // at the moment importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java index 1fbe90664d..3b1c5d4dab 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java @@ -22,6 +22,7 @@ import io.swagger.v3.oas.models.media.FileSchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; @@ -42,6 +43,11 @@ public class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCo public TypeScriptInversifyClientCodegen() { super(); + + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + this.outputFolder = "generated-code/typescript-inversify"; embeddedTemplateDir = templateDir = "typescript-inversify"; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java index b0a84d0796..a45e24be95 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java @@ -22,14 +22,12 @@ import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenModel; import org.openapitools.codegen.SupportingFile; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Locale; public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(TypeScriptJqueryClientCodegen.class); @@ -42,6 +40,10 @@ public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodeg public TypeScriptJqueryClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + modelTemplateFiles.put("model.mustache", ".ts"); apiTemplateFiles.put("api.mustache", ".ts"); typeMapping.put("Date", "Date"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java index 93a25c21f4..f9a396008d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java @@ -21,15 +21,13 @@ import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; +import org.openapitools.codegen.meta.features.DocumentationFeature; import org.openapitools.codegen.utils.ModelUtils; import java.io.File; -import java.text.SimpleDateFormat; import java.util.TreeSet; -import java.util.Date; import java.util.List; import java.util.ArrayList; -import java.util.Locale; import java.util.Map; public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen { @@ -42,6 +40,10 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen public TypeScriptRxjsClientCodegen() { super(); + featureSet = getFeatureSet().modify() + .includeDocumentationFeatures(DocumentationFeature.Readme) + .build(); + outputFolder = "generated-code/typescript-rxjs"; embeddedTemplateDir = templateDir = "typescript-rxjs"; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/protobuf/ProtobufSchemaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/protobuf/ProtobufSchemaCodegenTest.java new file mode 100644 index 0000000000..dd49e3f440 --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/protobuf/ProtobufSchemaCodegenTest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.protobuf; + +import org.openapitools.codegen.languages.ProtobufSchemaCodegen; +import org.openapitools.codegen.meta.FeatureSet; +import org.openapitools.codegen.meta.features.WireFormatFeature; +import org.testng.Assert; +import org.testng.annotations.Test; + +import static org.testng.Assert.*; + +public class ProtobufSchemaCodegenTest { + + @Test + public void testFeatureSet() { + final ProtobufSchemaCodegen codegen = new ProtobufSchemaCodegen(); + FeatureSet featureSet = codegen.getFeatureSet(); + + Assert.assertTrue(featureSet.getWireFormatFeatures().contains(WireFormatFeature.PROTOBUF)); + Assert.assertEquals(featureSet.getWireFormatFeatures().size(), 1); + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-vendor-mime.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-vendor-mime.yaml index 324e57a634..7720a848b9 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-vendor-mime.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-vendor-mime.yaml @@ -665,16 +665,14 @@ paths: post: tags: - fake - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - description: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + summary: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" + description: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" operationId: testEndpointParameters consumes: - application/xml; charset=utf-8 diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml index 02c9e70300..f6b78265d2 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -695,16 +695,14 @@ paths: post: tags: - fake - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - description: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + summary: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" + description: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" operationId: testEndpointParameters consumes: - application/x-www-form-urlencoded diff --git a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml index ee41ff46ba..1805ab7e94 100644 --- a/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml @@ -702,16 +702,14 @@ paths: post: tags: - fake - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - description: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + summary: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" + description: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" operationId: testEndpointParameters consumes: - application/x-www-form-urlencoded diff --git a/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml index 18ccb6b5d7..3850646ac2 100644 --- a/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml @@ -690,16 +690,14 @@ paths: post: tags: - fake - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - description: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + summary: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" + description: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" operationId: testEndpointParameters consumes: - application/x-www-form-urlencoded diff --git a/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml index fbab84749f..b899ea00ed 100644 --- a/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml @@ -689,16 +689,14 @@ paths: post: tags: - fake - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - description: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + summary: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" + description: "Fake endpoint for testing various parameters\n + 假端點\n + 偽のエンドポイント\n + 가짜 엔드 포인트" operationId: testEndpointParameters consumes: - application/x-www-form-urlencoded diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md index eb8098a2e3..877eda7028 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md @@ -99,7 +99,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md index 2eaab420f3..eeb5fe39b1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -567,9 +567,9 @@ No authorization required # **TestEndpointParameters** > void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example ```csharp @@ -608,7 +608,7 @@ namespace Example try { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } catch (ApiException e) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index fba1d11ee1..a3052b97a2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -198,10 +198,10 @@ namespace Org.OpenAPITools.Api /// ApiResponse of ModelClient ApiResponse TestClientModelWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -222,10 +222,10 @@ namespace Org.OpenAPITools.Api void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -563,10 +563,10 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse (ModelClient) System.Threading.Tasks.Task> TestClientModelAsyncWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -587,10 +587,10 @@ namespace Org.OpenAPITools.Api System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1779,7 +1779,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1803,7 +1803,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1932,7 +1932,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1957,7 +1957,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md index fd42741e8d..222ac2d0d6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md @@ -111,7 +111,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md index 2eaab420f3..eeb5fe39b1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -567,9 +567,9 @@ No authorization required # **TestEndpointParameters** > void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example ```csharp @@ -608,7 +608,7 @@ namespace Example try { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } catch (ApiException e) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs index fba1d11ee1..a3052b97a2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/FakeApi.cs @@ -198,10 +198,10 @@ namespace Org.OpenAPITools.Api /// ApiResponse of ModelClient ApiResponse TestClientModelWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -222,10 +222,10 @@ namespace Org.OpenAPITools.Api void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -563,10 +563,10 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse (ModelClient) System.Threading.Tasks.Task> TestClientModelAsyncWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -587,10 +587,10 @@ namespace Org.OpenAPITools.Api System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1779,7 +1779,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1803,7 +1803,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1932,7 +1932,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -1957,7 +1957,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None diff --git a/samples/client/petstore/csharp/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md index 5f55053b6f..2e2e37841c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp/OpenAPIClient/README.md @@ -114,7 +114,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index a295fe0554..edffb58d3c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -616,9 +616,9 @@ No authorization required > void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = null, int int32 = null, long int64 = null, float _float = null, string _string = null, System.IO.Stream binary = null, DateTime date = null, DateTime dateTime = null, string password = null, string callback = null) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -658,7 +658,7 @@ namespace Example try { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } catch (ApiException e) diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs index bc14d5e90f..8739ddfa49 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs @@ -195,10 +195,10 @@ namespace Org.OpenAPITools.Api /// ApiResponse of ModelClient ApiResponse TestClientModelWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -219,10 +219,10 @@ namespace Org.OpenAPITools.Api void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -553,10 +553,10 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse (ModelClient) System.Threading.Tasks.Task> TestClientModelAsyncWithHttpInfo (ModelClient body); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -577,10 +577,10 @@ namespace Org.OpenAPITools.Api System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int integer = default(int), int int32 = default(int), long int64 = default(long), float _float = default(float), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), string password = default(string), string callback = default(string)); /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2020,7 +2020,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2044,7 +2044,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2139,7 +2139,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None @@ -2164,7 +2164,7 @@ namespace Org.OpenAPITools.Api } /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call /// None diff --git a/samples/client/petstore/dart2/openapi/doc/ApiResponse.md b/samples/client/petstore/dart2/openapi/doc/ApiResponse.md new file mode 100644 index 0000000000..92422f0f44 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/doc/ApiResponse.md @@ -0,0 +1,17 @@ +# openapi.model.ApiResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] [default to null] +**type** | **String** | | [optional] [default to null] +**message** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart2/openapi/doc/Category.md b/samples/client/petstore/dart2/openapi/doc/Category.md new file mode 100644 index 0000000000..cc0d1633b5 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/doc/Category.md @@ -0,0 +1,16 @@ +# openapi.model.Category + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart2/openapi/doc/Order.md b/samples/client/petstore/dart2/openapi/doc/Order.md new file mode 100644 index 0000000000..310ce6c65b --- /dev/null +++ b/samples/client/petstore/dart2/openapi/doc/Order.md @@ -0,0 +1,20 @@ +# openapi.model.Order + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**petId** | **int** | | [optional] [default to null] +**quantity** | **int** | | [optional] [default to null] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] [default to null] +**status** | **String** | Order Status | [optional] [default to null] +**complete** | **bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart2/openapi/doc/Pet.md b/samples/client/petstore/dart2/openapi/doc/Pet.md new file mode 100644 index 0000000000..191e1fc66a --- /dev/null +++ b/samples/client/petstore/dart2/openapi/doc/Pet.md @@ -0,0 +1,20 @@ +# openapi.model.Pet + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**category** | [**Category**](Category.md) | | [optional] [default to null] +**name** | **String** | | [default to null] +**photoUrls** | **List<String>** | | [default to []] +**tags** | [**List<Tag>**](Tag.md) | | [optional] [default to []] +**status** | **String** | pet status in the store | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart2/openapi/doc/PetApi.md b/samples/client/petstore/dart2/openapi/doc/PetApi.md new file mode 100644 index 0000000000..7b5de3894a --- /dev/null +++ b/samples/client/petstore/dart2/openapi/doc/PetApi.md @@ -0,0 +1,379 @@ +# openapi.api.PetApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image + + +# **addPet** +> addPet(body) + +Add a new pet to the store + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = PetApi(); +var body = Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.addPet(body); +} catch (e) { + print("Exception when calling PetApi->addPet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +> deletePet(petId, apiKey) + +Deletes a pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = PetApi(); +var petId = 789; // int | Pet id to delete +var apiKey = apiKey_example; // String | + +try { + api_instance.deletePet(petId, apiKey); +} catch (e) { + print("Exception when calling PetApi->deletePet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| Pet id to delete | [default to null] + **apiKey** | **String**| | [optional] [default to null] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +> List findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = PetApi(); +var status = []; // List | Status values that need to be considered for filter + +try { + var result = api_instance.findPetsByStatus(status); + print(result); +} catch (e) { + print("Exception when calling PetApi->findPetsByStatus: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [default to []] + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +> List findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = PetApi(); +var tags = []; // List | Tags to filter by + +try { + var result = api_instance.findPetsByTags(tags); + print(result); +} catch (e) { + print("Exception when calling PetApi->findPetsByTags: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**List<String>**](String.md)| Tags to filter by | [default to []] + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +> Pet getPetById(petId) + +Find pet by ID + +Returns a single pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +var api_instance = PetApi(); +var petId = 789; // int | ID of pet to return + +try { + var result = api_instance.getPetById(petId); + print(result); +} catch (e) { + print("Exception when calling PetApi->getPetById: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to return | [default to null] + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +> updatePet(body) + +Update an existing pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = PetApi(); +var body = Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.updatePet(body); +} catch (e) { + print("Exception when calling PetApi->updatePet: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +> updatePetWithForm(petId, name, status) + +Updates a pet in the store with form data + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = PetApi(); +var petId = 789; // int | ID of pet that needs to be updated +var name = name_example; // String | Updated name of the pet +var status = status_example; // String | Updated status of the pet + +try { + api_instance.updatePetWithForm(petId, name, status); +} catch (e) { + print("Exception when calling PetApi->updatePetWithForm: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet that needs to be updated | [default to null] + **name** | **String**| Updated name of the pet | [optional] [default to null] + **status** | **String**| Updated status of the pet | [optional] [default to null] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +> ApiResponse uploadFile(petId, additionalMetadata, file) + +uploads an image + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +var api_instance = PetApi(); +var petId = 789; // int | ID of pet to update +var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +var file = BINARY_DATA_HERE; // MultipartFile | file to upload + +try { + var result = api_instance.uploadFile(petId, additionalMetadata, file); + print(result); +} catch (e) { + print("Exception when calling PetApi->uploadFile: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **int**| ID of pet to update | [default to null] + **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null] + **file** | **MultipartFile**| file to upload | [optional] [default to null] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/dart2/openapi/doc/StoreApi.md b/samples/client/petstore/dart2/openapi/doc/StoreApi.md new file mode 100644 index 0000000000..1cc37e2a47 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/doc/StoreApi.md @@ -0,0 +1,186 @@ +# openapi.api.StoreApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = StoreApi(); +var orderId = orderId_example; // String | ID of the order that needs to be deleted + +try { + api_instance.deleteOrder(orderId); +} catch (e) { + print("Exception when calling StoreApi->deleteOrder: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | [default to null] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +> Map getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +var api_instance = StoreApi(); + +try { + var result = api_instance.getInventory(); + print(result); +} catch (e) { + print("Exception when calling StoreApi->getInventory: $e\n"); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**Map** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = StoreApi(); +var orderId = 789; // int | ID of pet that needs to be fetched + +try { + var result = api_instance.getOrderById(orderId); + print(result); +} catch (e) { + print("Exception when calling StoreApi->getOrderById: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **int**| ID of pet that needs to be fetched | [default to null] + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +> Order placeOrder(body) + +Place an order for a pet + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = StoreApi(); +var body = Order(); // Order | order placed for purchasing the pet + +try { + var result = api_instance.placeOrder(body); + print(result); +} catch (e) { + print("Exception when calling StoreApi->placeOrder: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/dart2/openapi/doc/Tag.md b/samples/client/petstore/dart2/openapi/doc/Tag.md new file mode 100644 index 0000000000..ded7b32ac3 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/doc/Tag.md @@ -0,0 +1,16 @@ +# openapi.model.Tag + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**name** | **String** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart2/openapi/doc/User.md b/samples/client/petstore/dart2/openapi/doc/User.md new file mode 100644 index 0000000000..3761b70cf0 --- /dev/null +++ b/samples/client/petstore/dart2/openapi/doc/User.md @@ -0,0 +1,22 @@ +# openapi.model.User + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [default to null] +**username** | **String** | | [optional] [default to null] +**firstName** | **String** | | [optional] [default to null] +**lastName** | **String** | | [optional] [default to null] +**email** | **String** | | [optional] [default to null] +**password** | **String** | | [optional] [default to null] +**phone** | **String** | | [optional] [default to null] +**userStatus** | **int** | User Status | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/dart2/openapi/doc/UserApi.md b/samples/client/petstore/dart2/openapi/doc/UserApi.md new file mode 100644 index 0000000000..1ee5f6fced --- /dev/null +++ b/samples/client/petstore/dart2/openapi/doc/UserApi.md @@ -0,0 +1,349 @@ +# openapi.api.UserApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user + + +# **createUser** +> createUser(body) + +Create user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var body = User(); // User | Created user object + +try { + api_instance.createUser(body); +} catch (e) { + print("Exception when calling UserApi->createUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md)| Created user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(body) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var body = [List<User>()]; // List | List of user object + +try { + api_instance.createUsersWithArrayInput(body); +} catch (e) { + print("Exception when calling UserApi->createUsersWithArrayInput: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +> createUsersWithListInput(body) + +Creates list of users with given input array + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var body = [List<User>()]; // List | List of user object + +try { + api_instance.createUsersWithListInput(body); +} catch (e) { + print("Exception when calling UserApi->createUsersWithListInput: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**List<User>**](User.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var username = username_example; // String | The name that needs to be deleted + +try { + api_instance.deleteUser(username); +} catch (e) { + print("Exception when calling UserApi->deleteUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | [default to null] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var username = username_example; // String | The name that needs to be fetched. Use user1 for testing. + +try { + var result = api_instance.getUserByName(username); + print(result); +} catch (e) { + print("Exception when calling UserApi->getUserByName: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | [default to null] + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var username = username_example; // String | The user name for login +var password = password_example; // String | The password for login in clear text + +try { + var result = api_instance.loginUser(username, password); + print(result); +} catch (e) { + print("Exception when calling UserApi->loginUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | [default to null] + **password** | **String**| The password for login in clear text | [default to null] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); + +try { + api_instance.logoutUser(); +} catch (e) { + print("Exception when calling UserApi->logoutUser: $e\n"); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +> updateUser(username, body) + +Updated user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +var api_instance = UserApi(); +var username = username_example; // String | name that need to be deleted +var body = User(); // User | Updated user object + +try { + api_instance.updateUser(username, body); +} catch (e) { + print("Exception when calling UserApi->updateUser: $e\n"); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | [default to null] + **body** | [**User**](User.md)| Updated user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex index da8f94e239..29454d1762 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/fake.ex @@ -235,8 +235,8 @@ defmodule OpenapiPetstore.Api.Fake do end @doc """ - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ## Parameters diff --git a/samples/client/petstore/go-experimental/go-petstore/README.md b/samples/client/petstore/go-experimental/go-petstore/README.md index 1c8be349e6..9ce303bc88 100644 --- a/samples/client/petstore/go-experimental/go-petstore/README.md +++ b/samples/client/petstore/go-experimental/go-petstore/README.md @@ -82,7 +82,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml index be55130533..b6d60ba045 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -778,11 +778,11 @@ paths: - fake x-codegen-request-body-name: body post: - description: | + description: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: @@ -869,11 +869,11 @@ paths: description: User not found security: - http_basic_test: [] - summary: | + summary: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake /fake/outer/number: diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_fake.go index d31e1b9139..e055cf26d6 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_fake.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_fake.go @@ -759,8 +759,8 @@ type TestEndpointParametersOpts struct { } /* -TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param number None * @param double None diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md index 1d85fdf9d3..6ba47e807f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | [**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters [**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties @@ -332,9 +332,9 @@ No authorization required > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore-withXml/README.md b/samples/client/petstore/go/go-petstore-withXml/README.md index b4fd0109ce..3373020941 100644 --- a/samples/client/petstore/go/go-petstore-withXml/README.md +++ b/samples/client/petstore/go/go-petstore-withXml/README.md @@ -41,7 +41,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index be55130533..b6d60ba045 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -778,11 +778,11 @@ paths: - fake x-codegen-request-body-name: body post: - description: | + description: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: @@ -869,11 +869,11 @@ paths: description: User not found security: - http_basic_test: [] - summary: | + summary: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake /fake/outer/number: diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_fake.go index 42920dcf04..264c49951e 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api_fake.go +++ b/samples/client/petstore/go/go-petstore-withXml/api_fake.go @@ -720,8 +720,8 @@ type TestEndpointParametersOpts struct { } /* -TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param number None * @param double None diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md index 1d85fdf9d3..6ba47e807f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore-withXml/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | [**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters [**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties @@ -332,9 +332,9 @@ No authorization required > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Required Parameters diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md index b4fd0109ce..3373020941 100644 --- a/samples/client/petstore/go/go-petstore/README.md +++ b/samples/client/petstore/go/go-petstore/README.md @@ -41,7 +41,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **Put** /fake/body-with-file-schema | *FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **Put** /fake/body-with-query-params | *FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters *FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index be55130533..b6d60ba045 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -778,11 +778,11 @@ paths: - fake x-codegen-request-body-name: body post: - description: | + description: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: @@ -869,11 +869,11 @@ paths: description: User not found security: - http_basic_test: [] - summary: | + summary: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake /fake/outer/number: diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go index 8c0e6c8022..9c23b7d502 100644 --- a/samples/client/petstore/go/go-petstore/api_fake.go +++ b/samples/client/petstore/go/go-petstore/api_fake.go @@ -719,8 +719,8 @@ type TestEndpointParametersOpts struct { } /* -TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param number None * @param double None diff --git a/samples/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/client/petstore/go/go-petstore/docs/FakeApi.md index 1d85fdf9d3..6ba47e807f 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**TestBodyWithFileSchema**](FakeApi.md#TestBodyWithFileSchema) | **Put** /fake/body-with-file-schema | [**TestBodyWithQueryParams**](FakeApi.md#TestBodyWithQueryParams) | **Put** /fake/body-with-query-params | [**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters [**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional) [**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties @@ -332,9 +332,9 @@ No authorization required > TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Required Parameters diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs index 04497a97bd..7791bec65f 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Fake.hs @@ -277,9 +277,9 @@ instance Produces TestClientModel MimeJSON -- | @POST \/fake@ -- --- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +-- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -- --- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +-- Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -- -- AuthMethod: 'AuthBasicHttpBasicTest' -- diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index be55130533..b6d60ba045 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -778,11 +778,11 @@ paths: - fake x-codegen-request-body-name: body post: - description: | + description: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: @@ -869,11 +869,11 @@ paths: description: User not found security: - http_basic_test: [] - summary: | + summary: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake /fake/outer/number: diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java index 17404af4c5..71dfcd5555 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/FakeApi.java @@ -159,8 +159,8 @@ public interface FakeApi extends ApiClient.Api { Client testClientModel(Client body); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java index 17404af4c5..71dfcd5555 100644 --- a/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/feign10x/src/main/java/org/openapitools/client/api/FakeApi.java @@ -159,8 +159,8 @@ public interface FakeApi extends ApiClient.Api { Client testClientModel(Client body); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index bc84c13561..1ce9c124e9 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java index 5d1df0a402..f3e6f6406e 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java @@ -749,8 +749,8 @@ public class FakeApi { /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

                                                            400 - Invalid username supplied *

                                                            404 - User not found * @param number None @@ -774,8 +774,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

                                                            400 - Invalid username supplied *

                                                            404 - User not found * @param number None diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md index bc84c13561..1ce9c124e9 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java index 0dd5834bad..ea1d42bae8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/FakeApi.java @@ -393,8 +393,8 @@ public class FakeApi { return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md index bc84c13561..1ce9c124e9 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java index c9d99435af..28099fcab8 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java @@ -544,8 +544,8 @@ public class FakeApi { return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -574,8 +574,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index bc84c13561..1ce9c124e9 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index e2351eb861..22ed9fd99a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -544,8 +544,8 @@ public class FakeApi { return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -574,8 +574,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/jersey2/docs/FakeApi.md b/samples/client/petstore/java/jersey2/docs/FakeApi.md index bc84c13561..1ce9c124e9 100644 --- a/samples/client/petstore/java/jersey2/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java index c9d99435af..28099fcab8 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -544,8 +544,8 @@ public class FakeApi { return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -574,8 +574,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md index bc84c13561..1ce9c124e9 100644 --- a/samples/client/petstore/java/native/docs/FakeApi.md +++ b/samples/client/petstore/java/native/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java index 25e6a25183..e6e5956125 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java @@ -456,8 +456,8 @@ public class FakeApi { } } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md index afec253f8a..b8c2112acb 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -517,9 +517,9 @@ No authorization required # **testEndpointParameters** > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example ```java diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java index ac29cdbe1e..121867dd07 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1064,8 +1064,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -1093,8 +1093,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -1124,8 +1124,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 (asynchronously) - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 (asynchronously) + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md index afec253f8a..b8c2112acb 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -517,9 +517,9 @@ No authorization required # **testEndpointParameters** > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example ```java diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java index ac29cdbe1e..121867dd07 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1064,8 +1064,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -1093,8 +1093,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -1124,8 +1124,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 (asynchronously) - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 (asynchronously) + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/rest-assured/docs/FakeApi.md b/samples/client/petstore/java/rest-assured/docs/FakeApi.md index c60da0e25a..0cac20cb77 100644 --- a/samples/client/petstore/java/rest-assured/docs/FakeApi.md +++ b/samples/client/petstore/java/rest-assured/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -356,9 +356,9 @@ No authorization required # **testEndpointParameters** > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example ```java diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java index 87f00fcd21..5049424b2d 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/FakeApi.java @@ -164,8 +164,8 @@ public class FakeApi { return new TestClientModelOper(createReqSpec()); } - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", - notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", tags = { "fake" }) @ApiResponses(value = { @@ -792,8 +792,8 @@ public class FakeApi { } } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @see #numberForm None (required) * @see #_doubleForm None (required) diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index bc84c13561..1ce9c124e9 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java index c98e422a86..34b1bf2587 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java @@ -371,8 +371,8 @@ public class FakeApi { return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index bc84c13561..1ce9c124e9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java index a074f98fc7..16ef845632 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java @@ -421,8 +421,8 @@ public class FakeApi { return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

                                                            400 - Invalid username supplied *

                                                            404 - User not found * @param number None (required) @@ -446,8 +446,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

                                                            400 - Invalid username supplied *

                                                            404 - User not found * @param number None (required) diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index bc84c13561..1ce9c124e9 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java index a074f98fc7..16ef845632 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java @@ -421,8 +421,8 @@ public class FakeApi { return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

                                                            400 - Invalid username supplied *

                                                            404 - User not found * @param number None (required) @@ -446,8 +446,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

                                                            400 - Invalid username supplied *

                                                            404 - User not found * @param number None (required) diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java index e258826a9a..1ce6dc060c 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/FakeApi.java @@ -217,9 +217,9 @@ public interface FakeApi { @retrofit.http.Body Client body, Callback cb ); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Sync method - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -244,7 +244,7 @@ public interface FakeApi { ); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Async method * @param number None (required) * @param _double None (required) diff --git a/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md index 24e2d7f5be..8de4500212 100644 --- a/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play24/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/FakeApi.java index ead81434c6..0c05259fb1 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/FakeApi.java @@ -132,8 +132,8 @@ public interface FakeApi { ); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md index 24e2d7f5be..8de4500212 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/FakeApi.java index 101757f03d..f8a5c1f9ec 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/FakeApi.java @@ -132,8 +132,8 @@ public interface FakeApi { ); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md index 24e2d7f5be..8de4500212 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java index 101757f03d..f8a5c1f9ec 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/FakeApi.java @@ -132,8 +132,8 @@ public interface FakeApi { ); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index 24e2d7f5be..8de4500212 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java index 69bcdb0b25..d536945d5d 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -127,8 +127,8 @@ public interface FakeApi { ); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md index 24e2d7f5be..8de4500212 100644 --- a/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/FakeApi.java index cd8ff7deca..b17c3d20f2 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/FakeApi.java @@ -127,8 +127,8 @@ public interface FakeApi { ); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index 24e2d7f5be..8de4500212 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java index d3cd78e39f..82a7657309 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -128,8 +128,8 @@ public interface FakeApi { ); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index 4872227b32..df0f92ee9a 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java index 1cf29ead09..e32629442f 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/FakeApiImpl.java @@ -326,8 +326,8 @@ public class FakeApiImpl implements FakeApi { apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java index 42239d4edf..c460d99e18 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/FakeApi.java @@ -200,8 +200,8 @@ public class FakeApi { })); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -223,8 +223,8 @@ public class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index bc84c13561..1ce9c124e9 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -542,9 +542,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java index fcbe10439e..dd12617557 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java @@ -337,8 +337,8 @@ public class FakeApi { return apiClient.invokeAPI("/fake", HttpMethod.PATCH, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *

                                                            400 - Invalid username supplied *

                                                            404 - User not found * @param number None diff --git a/samples/client/petstore/javascript-es6/README.md b/samples/client/petstore/javascript-es6/README.md index 09bc0b0ffe..4634d63099 100644 --- a/samples/client/petstore/javascript-es6/README.md +++ b/samples/client/petstore/javascript-es6/README.md @@ -129,7 +129,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *OpenApiPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *OpenApiPetstore.FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *OpenApiPetstore.FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/javascript-es6/docs/FakeApi.md b/samples/client/petstore/javascript-es6/docs/FakeApi.md index 46868a5f7d..337fd96880 100644 --- a/samples/client/petstore/javascript-es6/docs/FakeApi.md +++ b/samples/client/petstore/javascript-es6/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -393,9 +393,9 @@ No authorization required > testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/javascript-es6/src/api/FakeApi.js b/samples/client/petstore/javascript-es6/src/api/FakeApi.js index 854b8face4..8c3bffd8c8 100644 --- a/samples/client/petstore/javascript-es6/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-es6/src/api/FakeApi.js @@ -371,8 +371,8 @@ export default class FakeApi { */ /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param {Number} _number None * @param {Number} _double None * @param {String} patternWithoutDelimiter None diff --git a/samples/client/petstore/javascript-promise-es6/README.md b/samples/client/petstore/javascript-promise-es6/README.md index ed1a7dcbdd..3657c3574f 100644 --- a/samples/client/petstore/javascript-promise-es6/README.md +++ b/samples/client/petstore/javascript-promise-es6/README.md @@ -127,7 +127,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *OpenApiPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *OpenApiPetstore.FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *OpenApiPetstore.FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md b/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md index f28125722b..21fe5b74ff 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md +++ b/samples/client/petstore/javascript-promise-es6/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -385,9 +385,9 @@ No authorization required > testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js b/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js index f8b26290b2..8c041077a1 100644 --- a/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-promise-es6/src/api/FakeApi.js @@ -405,8 +405,8 @@ export default class FakeApi { /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param {Number} _number None * @param {Number} _double None * @param {String} patternWithoutDelimiter None @@ -479,8 +479,8 @@ export default class FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param {Number} _number None * @param {Number} _double None * @param {String} patternWithoutDelimiter None diff --git a/samples/client/petstore/javascript-promise/README.md b/samples/client/petstore/javascript-promise/README.md index 0f3fb9b8af..40ff6714ac 100644 --- a/samples/client/petstore/javascript-promise/README.md +++ b/samples/client/petstore/javascript-promise/README.md @@ -115,7 +115,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *OpenApiPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *OpenApiPetstore.FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *OpenApiPetstore.FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/javascript-promise/docs/FakeApi.md b/samples/client/petstore/javascript-promise/docs/FakeApi.md index 37ce18eea2..091f13eb5d 100644 --- a/samples/client/petstore/javascript-promise/docs/FakeApi.md +++ b/samples/client/petstore/javascript-promise/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -393,9 +393,9 @@ No authorization required > testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/javascript-promise/src/api/FakeApi.js b/samples/client/petstore/javascript-promise/src/api/FakeApi.js index 04d4c20591..b4d4a4d5c4 100644 --- a/samples/client/petstore/javascript-promise/src/api/FakeApi.js +++ b/samples/client/petstore/javascript-promise/src/api/FakeApi.js @@ -430,8 +430,8 @@ /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param {Number} _number None * @param {Number} _double None * @param {String} patternWithoutDelimiter None @@ -506,8 +506,8 @@ } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param {Number} _number None * @param {Number} _double None * @param {String} patternWithoutDelimiter None diff --git a/samples/client/petstore/javascript/README.md b/samples/client/petstore/javascript/README.md index 6b9b593afa..cb4c84dad8 100644 --- a/samples/client/petstore/javascript/README.md +++ b/samples/client/petstore/javascript/README.md @@ -118,7 +118,7 @@ Class | Method | HTTP request | Description *OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *OpenApiPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *OpenApiPetstore.FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *OpenApiPetstore.FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/javascript/docs/FakeApi.md b/samples/client/petstore/javascript/docs/FakeApi.md index 24e490409e..b613566621 100644 --- a/samples/client/petstore/javascript/docs/FakeApi.md +++ b/samples/client/petstore/javascript/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -409,9 +409,9 @@ No authorization required > testEndpointParameters(_number, _double, patternWithoutDelimiter, _byte, opts) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/javascript/src/api/FakeApi.js b/samples/client/petstore/javascript/src/api/FakeApi.js index 9d52b63daa..9cabc9f776 100644 --- a/samples/client/petstore/javascript/src/api/FakeApi.js +++ b/samples/client/petstore/javascript/src/api/FakeApi.js @@ -396,8 +396,8 @@ */ /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param {Number} _number None * @param {Number} _double None * @param {String} patternWithoutDelimiter None diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index c3c9c8ab68..2a1a5e9dea 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -382,7 +382,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters *FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index 0aa13eb610..23c958d2a0 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description [**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -393,9 +393,9 @@ No authorization required # **test_endpoint_parameters** > test_endpoint_parameters(number => $number, double => $double, pattern_without_delimiter => $pattern_without_delimiter, byte => $byte, integer => $integer, int32 => $int32, int64 => $int64, float => $float, string => $string, binary => $binary, date => $date, date_time => $date_time, password => $password, callback => $callback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example ```perl diff --git a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm index facf8615da..89e0e9b93c 100644 --- a/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm @@ -555,7 +555,7 @@ sub test_client_model { # # test_endpoint_parameters # -# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +# Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # # @param double $number None (required) # @param double $double None (required) @@ -645,7 +645,7 @@ sub test_client_model { }, }; __PACKAGE__->method_documentation->{ 'test_endpoint_parameters' } = { - summary => 'Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ', + summary => 'Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트', params => $params, returns => undef, }; diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index 87ba21d247..d04e0558c0 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -92,7 +92,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**testBodyWithFileSchema**](docs/Api/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**testBodyWithQueryParams**](docs/Api/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testClientModel**](docs/Api/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/Api/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters *FakeApi* | [**testGroupParameters**](docs/Api/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/Api/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md index c2ac9a71e3..c3ae680eff 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -470,9 +470,9 @@ No authorization required > testEndpointParameters($number, $double, $pattern_without_delimiter, $byte, $integer, $int32, $int64, $float, $string, $binary, $date, $date_time, $password, $callback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index ff8e6d6924..86f7e8827c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -2077,7 +2077,7 @@ class FakeApi /** * Operation testEndpointParameters * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param float $number None (required) * @param double $double None (required) @@ -2106,7 +2106,7 @@ class FakeApi /** * Operation testEndpointParametersWithHttpInfo * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param float $number None (required) * @param double $double None (required) @@ -2171,7 +2171,7 @@ class FakeApi /** * Operation testEndpointParametersAsync * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param float $number None (required) * @param double $double None (required) @@ -2204,7 +2204,7 @@ class FakeApi /** * Operation testEndpointParametersAsyncWithHttpInfo * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param float $number None (required) * @param double $double None (required) diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php index 3ecd729782..da8cb6c412 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/FakeApiTest.php @@ -155,7 +155,7 @@ class FakeApiTest extends TestCase /** * Test case for testEndpointParameters * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트. + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트. * */ public function testTestEndpointParameters() diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md index e031b59c9f..45618f2a08 100644 --- a/samples/client/petstore/python-asyncio/README.md +++ b/samples/client/petstore/python-asyncio/README.md @@ -82,7 +82,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters *FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/python-asyncio/docs/FakeApi.md b/samples/client/petstore/python-asyncio/docs/FakeApi.md index 6ad90d76d7..c311c9eaf2 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeApi.md +++ b/samples/client/petstore/python-asyncio/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -446,9 +446,9 @@ No authorization required # **test_endpoint_parameters** > test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -484,7 +484,7 @@ password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) except ApiException as e: print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py index 6907451d92..2020b5620f 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/fake_api.py @@ -895,9 +895,9 @@ class FakeApi(object): collection_formats=collection_formats) def test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True) @@ -933,9 +933,9 @@ class FakeApi(object): return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 def test_endpoint_parameters_with_http_info(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async_req=True) diff --git a/samples/client/petstore/python-experimental/README.md b/samples/client/petstore/python-experimental/README.md index b1d65b496d..03fc1cca79 100644 --- a/samples/client/petstore/python-experimental/README.md +++ b/samples/client/petstore/python-experimental/README.md @@ -83,7 +83,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**test_endpoint_enums_length_one**](docs/FakeApi.md#test_endpoint_enums_length_one) | **PUT** /fake/enums-of-length-one/{path_string}/{path_integer} | -*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters *FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/python-experimental/docs/FakeApi.md b/samples/client/petstore/python-experimental/docs/FakeApi.md index 610d804757..50e291f026 100644 --- a/samples/client/petstore/python-experimental/docs/FakeApi.md +++ b/samples/client/petstore/python-experimental/docs/FakeApi.md @@ -14,7 +14,7 @@ Method | HTTP request | Description [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model [**test_endpoint_enums_length_one**](FakeApi.md#test_endpoint_enums_length_one) | **PUT** /fake/enums-of-length-one/{path_string}/{path_integer} | -[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -560,9 +560,9 @@ No authorization required # **test_endpoint_parameters** > test_endpoint_parameters(number, double, pattern_without_delimiter, byte) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -598,7 +598,7 @@ param_callback = 'param_callback_example' # str | None (optional) # example passing only required values which don't have defaults set try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte) except petstore_api.ApiException as e: print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) @@ -606,7 +606,7 @@ except petstore_api.ApiException as e: # example passing only required values which don't have defaults set # and optional values try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) except petstore_api.ApiException as e: print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) diff --git a/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py b/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py index 31a6500d55..be569e05cb 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-experimental/petstore_api/api/fake_api.py @@ -1156,9 +1156,9 @@ class FakeApi(object): ) def __test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True) diff --git a/samples/client/petstore/python-tornado/README.md b/samples/client/petstore/python-tornado/README.md index e031b59c9f..45618f2a08 100644 --- a/samples/client/petstore/python-tornado/README.md +++ b/samples/client/petstore/python-tornado/README.md @@ -82,7 +82,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters *FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/python-tornado/docs/FakeApi.md b/samples/client/petstore/python-tornado/docs/FakeApi.md index 6ad90d76d7..c311c9eaf2 100644 --- a/samples/client/petstore/python-tornado/docs/FakeApi.md +++ b/samples/client/petstore/python-tornado/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -446,9 +446,9 @@ No authorization required # **test_endpoint_parameters** > test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -484,7 +484,7 @@ password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) except ApiException as e: print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) diff --git a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py index 6907451d92..2020b5620f 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/fake_api.py @@ -895,9 +895,9 @@ class FakeApi(object): collection_formats=collection_formats) def test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True) @@ -933,9 +933,9 @@ class FakeApi(object): return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 def test_endpoint_parameters_with_http_info(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async_req=True) diff --git a/samples/client/petstore/python/README.md b/samples/client/petstore/python/README.md index e031b59c9f..45618f2a08 100644 --- a/samples/client/petstore/python/README.md +++ b/samples/client/petstore/python/README.md @@ -82,7 +82,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters *FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/python/docs/FakeApi.md b/samples/client/petstore/python/docs/FakeApi.md index 6ad90d76d7..c311c9eaf2 100644 --- a/samples/client/petstore/python/docs/FakeApi.md +++ b/samples/client/petstore/python/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -446,9 +446,9 @@ No authorization required # **test_endpoint_parameters** > test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -484,7 +484,7 @@ password = 'password_example' # str | None (optional) param_callback = 'param_callback_example' # str | None (optional) try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback) except ApiException as e: print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e) diff --git a/samples/client/petstore/python/petstore_api/api/fake_api.py b/samples/client/petstore/python/petstore_api/api/fake_api.py index 6907451d92..2020b5620f 100644 --- a/samples/client/petstore/python/petstore_api/api/fake_api.py +++ b/samples/client/petstore/python/petstore_api/api/fake_api.py @@ -895,9 +895,9 @@ class FakeApi(object): collection_formats=collection_formats) def test_endpoint_parameters(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True) @@ -933,9 +933,9 @@ class FakeApi(object): return self.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, **kwargs) # noqa: E501 def test_endpoint_parameters_with_http_info(self, number, double, pattern_without_delimiter, byte, **kwargs): # noqa: E501 - """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 + Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.test_endpoint_parameters_with_http_info(number, double, pattern_without_delimiter, byte, async_req=True) diff --git a/samples/client/petstore/ruby-faraday/README.md b/samples/client/petstore/ruby-faraday/README.md index 0e684d1ce3..8255487cce 100644 --- a/samples/client/petstore/ruby-faraday/README.md +++ b/samples/client/petstore/ruby-faraday/README.md @@ -84,7 +84,7 @@ Class | Method | HTTP request | Description *Petstore::FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | *Petstore::FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *Petstore::FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -*Petstore::FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*Petstore::FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *Petstore::FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters *Petstore::FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *Petstore::FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/ruby-faraday/docs/FakeApi.md b/samples/client/petstore/ruby-faraday/docs/FakeApi.md index 57ea6d6d10..43b7961e5b 100644 --- a/samples/client/petstore/ruby-faraday/docs/FakeApi.md +++ b/samples/client/petstore/ruby-faraday/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -400,9 +400,9 @@ No authorization required > test_endpoint_parameters(number, double, pattern_without_delimiter, byte, opts) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -435,7 +435,7 @@ opts = { } begin - #Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + #Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, opts) rescue Petstore::ApiError => e puts "Exception when calling FakeApi->test_endpoint_parameters: #{e}" diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb index 7a54c3dffb..aa30e3395c 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb @@ -494,8 +494,8 @@ module Petstore return data, status_code, headers end - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # @param number [Float] None # @param double [Float] None # @param pattern_without_delimiter [String] None @@ -517,8 +517,8 @@ module Petstore nil end - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # @param number [Float] None # @param double [Float] None # @param pattern_without_delimiter [String] None diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 0e684d1ce3..8255487cce 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -84,7 +84,7 @@ Class | Method | HTTP request | Description *Petstore::FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | *Petstore::FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | *Petstore::FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -*Petstore::FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*Petstore::FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *Petstore::FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters *Petstore::FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *Petstore::FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/client/petstore/ruby/docs/FakeApi.md b/samples/client/petstore/ruby/docs/FakeApi.md index 57ea6d6d10..43b7961e5b 100644 --- a/samples/client/petstore/ruby/docs/FakeApi.md +++ b/samples/client/petstore/ruby/docs/FakeApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description [**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | [**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model -[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters [**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -400,9 +400,9 @@ No authorization required > test_endpoint_parameters(number, double, pattern_without_delimiter, byte, opts) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -435,7 +435,7 @@ opts = { } begin - #Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + #Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, opts) rescue Petstore::ApiError => e puts "Exception when calling FakeApi->test_endpoint_parameters: #{e}" diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb index 7a54c3dffb..aa30e3395c 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb @@ -494,8 +494,8 @@ module Petstore return data, status_code, headers end - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # @param number [Float] None # @param double [Float] None # @param pattern_without_delimiter [String] None @@ -517,8 +517,8 @@ module Petstore nil end - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # @param number [Float] None # @param double [Float] None # @param pattern_without_delimiter [String] None diff --git a/samples/client/petstore/ruby/spec/api/fake_api_spec.rb b/samples/client/petstore/ruby/spec/api/fake_api_spec.rb index beb7fe3218..3de003c3f6 100644 --- a/samples/client/petstore/ruby/spec/api/fake_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/fake_api_spec.rb @@ -123,8 +123,8 @@ describe 'FakeApi' do end # unit tests for test_endpoint_parameters - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # @param number None # @param double None # @param pattern_without_delimiter None diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java index 52732fb652..5e685103d4 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java @@ -140,7 +140,7 @@ public class FakeApi { @Consumes({ "application/x-www-form-urlencoded" }) - @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = { + @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", response = Void.class, authorizations = { @io.swagger.annotations.Authorization(value = "http_basic_test") }, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index a41ef03feb..b78cb13f21 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -1049,7 +1049,7 @@ "x-accepts" : "application/json" }, "post" : { - "description" : "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔드 포인트\n", + "description" : "Fake endpoint for testing various parameters\n 假端點\n 偽のエンドポイント\n 가짜 엔드 포인트", "operationId" : "testEndpointParameters", "requestBody" : { "content" : { @@ -1155,7 +1155,7 @@ "security" : [ { "http_basic_test" : [ ] } ], - "summary" : "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔드 포인트\n", + "summary" : "Fake endpoint for testing various parameters\n 假端點\n 偽のエンドポイント\n 가짜 엔드 포인트", "tags" : [ "fake" ], "x-contentType" : "application/x-www-form-urlencoded", "x-accepts" : "application/json" diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java index 0f10d00a16..ed1a633057 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java @@ -116,15 +116,15 @@ public interface FakeApi { public Client testClientModel(@Valid Client body); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * */ @POST @Path("/fake") @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", tags={ "fake", }) + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username supplied"), @ApiResponse(code = 404, message = "User not found") }) diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 8e4b6ab67e..0580038519 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -93,9 +93,9 @@ public class FakeApiServiceImpl implements FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * */ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, Attachment binaryDetail, LocalDate date, Date dateTime, String password, String paramCallback) { diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java index ddaddcf814..7ec4c982e3 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java @@ -202,9 +202,9 @@ public class FakeApiTest { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @throws ApiException * if the Api call fails diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java index 5b12b7a16f..1ad02e7601 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java @@ -166,7 +166,7 @@ public class FakeApi { @Consumes({ "application/x-www-form-urlencoded" }) - @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = { + @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", response = Void.class, authorizations = { @io.swagger.annotations.Authorization(value = "http_basic_test") }, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java index c065aca629..18a18ba882 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java @@ -93,7 +93,7 @@ public interface FakeApi { @POST @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 79ba65f66e..22e83bdeb0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -862,11 +862,11 @@ paths: x-tags: - tag: fake post: - description: | + description: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: @@ -953,11 +953,11 @@ paths: description: User not found security: - http_basic_test: [] - summary: | + summary: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-contentType: application/x-www-form-urlencoded diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java index 37d6206104..a6ca5412a2 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java @@ -117,7 +117,7 @@ public class FakeApi { @POST @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", response = Void.class, authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 79ba65f66e..22e83bdeb0 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -862,11 +862,11 @@ paths: x-tags: - tag: fake post: - description: | + description: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: @@ -953,11 +953,11 @@ paths: description: User not found security: - http_basic_test: [] - summary: | + summary: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-contentType: application/x-www-form-urlencoded diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java index ef661e676b..56aa033224 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java @@ -150,7 +150,7 @@ public class FakeApi { @Consumes({ "application/x-www-form-urlencoded" }) - @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = { + @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", response = Void.class, authorizations = { @io.swagger.annotations.Authorization(value = "http_basic_test") }, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java index c494293f05..b55cea62bf 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java @@ -151,7 +151,7 @@ public class FakeApi { @Consumes({ "application/x-www-form-urlencoded" }) - @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = { + @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", response = Void.class, authorizations = { @io.swagger.annotations.Authorization(value = "http_basic_test") }, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java index cf04a03a49..a290f8b599 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java @@ -164,7 +164,7 @@ public class FakeApi { @Consumes({ "application/x-www-form-urlencoded" }) - @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = { + @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", response = Void.class, authorizations = { @io.swagger.annotations.Authorization(value = "http_basic_test") }, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java index a08fe744f6..e2b50df52b 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java @@ -165,7 +165,7 @@ public class FakeApi { @Consumes({ "application/x-www-form-urlencoded" }) - @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = { + @io.swagger.annotations.ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", response = Void.class, authorizations = { @io.swagger.annotations.Authorization(value = "http_basic_test") }, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { diff --git a/samples/server/petstore/php-lumen/lib/app/Http/Controllers/FakeApi.php b/samples/server/petstore/php-lumen/lib/app/Http/Controllers/FakeApi.php index 58e4a46be9..cbc65e59a4 100644 --- a/samples/server/petstore/php-lumen/lib/app/Http/Controllers/FakeApi.php +++ b/samples/server/petstore/php-lumen/lib/app/Http/Controllers/FakeApi.php @@ -53,7 +53,7 @@ class FakeApi extends Controller /** * Operation testEndpointParameters * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트. + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트. * * * @return Http response diff --git a/samples/server/petstore/php-lumen/lib/routes/web.php b/samples/server/petstore/php-lumen/lib/routes/web.php index e4e6201b51..9ffff0e0c7 100644 --- a/samples/server/petstore/php-lumen/lib/routes/web.php +++ b/samples/server/petstore/php-lumen/lib/routes/web.php @@ -35,8 +35,8 @@ $router->patch('/v2/another-fake/dummy', 'AnotherFakeApi@call123TestSpecialTags' $router->patch('/v2/fake', 'FakeApi@testClientModel'); /** * post testEndpointParameters - * Summary: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Notes: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Summary: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Notes: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 */ $router->post('/v2/fake', 'FakeApi@testEndpointParameters'); /** diff --git a/samples/server/petstore/php-slim/README.md b/samples/server/petstore/php-slim/README.md index 8e7f235f0e..6b2f02d44e 100644 --- a/samples/server/petstore/php-slim/README.md +++ b/samples/server/petstore/php-slim/README.md @@ -128,7 +128,7 @@ Class | Method | HTTP request | Description *AbstractFakeApi* | **testBodyWithFileSchema** | **PUT** /fake/body-with-file-schema | *AbstractFakeApi* | **testBodyWithQueryParams** | **PUT** /fake/body-with-query-params | *AbstractFakeApi* | **testClientModel** | **PATCH** /fake | To test \"client\" model -*AbstractFakeApi* | **testEndpointParameters** | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*AbstractFakeApi* | **testEndpointParameters** | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *AbstractFakeApi* | **testEnumParameters** | **GET** /fake | To test enum parameters *AbstractFakeApi* | **testGroupParameters** | **DELETE** /fake | Fake endpoint to test group parameters (optional) *AbstractFakeApi* | **testInlineAdditionalProperties** | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/server/petstore/php-slim/lib/Api/AbstractFakeApi.php b/samples/server/petstore/php-slim/lib/Api/AbstractFakeApi.php index a226169c69..f6d0e91ec3 100644 --- a/samples/server/petstore/php-slim/lib/Api/AbstractFakeApi.php +++ b/samples/server/petstore/php-slim/lib/Api/AbstractFakeApi.php @@ -225,8 +225,8 @@ abstract class AbstractFakeApi /** * POST testEndpointParameters - * Summary: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Notes: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Summary: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Notes: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response diff --git a/samples/server/petstore/php-slim4/README.md b/samples/server/petstore/php-slim4/README.md index 53314ac7c1..b0efeb9dc6 100644 --- a/samples/server/petstore/php-slim4/README.md +++ b/samples/server/petstore/php-slim4/README.md @@ -136,7 +136,7 @@ Class | Method | HTTP request | Description *AbstractFakeApi* | **testBodyWithFileSchema** | **PUT** /fake/body-with-file-schema | *AbstractFakeApi* | **testBodyWithQueryParams** | **PUT** /fake/body-with-query-params | *AbstractFakeApi* | **testClientModel** | **PATCH** /fake | To test \"client\" model -*AbstractFakeApi* | **testEndpointParameters** | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*AbstractFakeApi* | **testEndpointParameters** | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *AbstractFakeApi* | **testEnumParameters** | **GET** /fake | To test enum parameters *AbstractFakeApi* | **testGroupParameters** | **DELETE** /fake | Fake endpoint to test group parameters (optional) *AbstractFakeApi* | **testInlineAdditionalProperties** | **POST** /fake/inline-additionalProperties | test inline additionalProperties diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractFakeApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractFakeApi.php index ea46b798c0..6b3888966b 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractFakeApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractFakeApi.php @@ -234,8 +234,8 @@ abstract class AbstractFakeApi /** * POST testEndpointParameters - * Summary: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Notes: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Summary: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Notes: Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param ServerRequestInterface $request Request * @param ResponseInterface $response Response diff --git a/samples/server/petstore/php-ze-ph/src/App/Handler/Fake.php b/samples/server/petstore/php-ze-ph/src/App/Handler/Fake.php index d93574b036..76880c68f6 100644 --- a/samples/server/petstore/php-ze-ph/src/App/Handler/Fake.php +++ b/samples/server/petstore/php-ze-ph/src/App/Handler/Fake.php @@ -37,7 +37,7 @@ class Fake throw new PHException\HttpCode(501, "Not implemented"); } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @PHA\Post() * @param ServerRequestInterface $request * diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/README.md b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/README.md index 66807d9432..fa4062102f 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/README.md +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/README.md @@ -133,7 +133,7 @@ Method | HTTP request | Description [**fakeOuterStringSerialize**](docs/fake_api.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | [**testBodyWithQueryParams**](docs/fake_api.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](docs/fake_api.md#testClientModel) | **PATCH** /fake | To test \"client\" model -[**testEndpointParameters**](docs/fake_api.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEndpointParameters**](docs/fake_api.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](docs/fake_api.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testInlineAdditionalProperties**](docs/fake_api.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**testJsonFormData**](docs/fake_api.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index bb8b8bf926..a968cf4fda 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -713,11 +713,11 @@ paths: - fake x-codegen-request-body-name: body post: - description: | + description: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: @@ -804,11 +804,11 @@ paths: description: User not found security: - http_basic_test: [] - summary: | + summary: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake /fake/outer/number: diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/fake_api.md b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/fake_api.md index 372dc14d33..a3f4d9e936 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/fake_api.md +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/fake_api.md @@ -10,7 +10,7 @@ Method | HTTP request | Description **fakeOuterStringSerialize**](fake_api.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | **testBodyWithQueryParams**](fake_api.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | **testClientModel**](fake_api.md#testClientModel) | **PATCH** /fake | To test \"client\" model -**testEndpointParameters**](fake_api.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +**testEndpointParameters**](fake_api.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 **testEnumParameters**](fake_api.md#testEnumParameters) | **GET** /fake | To test enum parameters **testInlineAdditionalProperties**](fake_api.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties **testJsonFormData**](fake_api.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data @@ -207,9 +207,9 @@ No authorization required # **testEndpointParameters** > testEndpointParameters(ctx, number, double, pattern_without_delimiter, byte, optional) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Required Parameters diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server_lib/server.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server_lib/server.rs index 2602397dc4..1aca2d246f 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server_lib/server.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server_lib/server.rs @@ -108,7 +108,7 @@ impl Api for Server where C: Has{ Box::new(futures::failed("Generic failure".into())) } - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 fn test_endpoint_parameters(&self, number: f64, double: f64, pattern_without_delimiter: String, byte: swagger::ByteArray, integer: Option, int32: Option, int64: Option, float: Option, string: Option, binary: Option, date: Option>, date_time: Option>, password: Option, callback: Option, context: &C) -> Box> { let context = context.clone(); println!("test_endpoint_parameters({}, {}, \"{}\", {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, date, date_time, password, callback, context.get().0.clone()); diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs index 12aee98b7f..6adb604b9e 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs @@ -339,7 +339,7 @@ pub trait Api { /// To test \"client\" model fn test_client_model(&self, body: models::Client, context: &C) -> Box>; - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 fn test_endpoint_parameters(&self, number: f64, double: f64, pattern_without_delimiter: String, byte: swagger::ByteArray, integer: Option, int32: Option, int64: Option, float: Option, string: Option, binary: Option, date: Option>, date_time: Option>, password: Option, callback: Option, context: &C) -> Box>; /// To test enum parameters @@ -440,7 +440,7 @@ pub trait ApiNoContext { /// To test \"client\" model fn test_client_model(&self, body: models::Client) -> Box>; - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 fn test_endpoint_parameters(&self, number: f64, double: f64, pattern_without_delimiter: String, byte: swagger::ByteArray, integer: Option, int32: Option, int64: Option, float: Option, string: Option, binary: Option, date: Option>, date_time: Option>, password: Option, callback: Option) -> Box>; /// To test enum parameters @@ -566,7 +566,7 @@ impl<'a, T: Api, C> ApiNoContext for ContextWrapper<'a, T, C> { self.api().test_client_model(body, &self.context()) } - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 fn test_endpoint_parameters(&self, number: f64, double: f64, pattern_without_delimiter: String, byte: swagger::ByteArray, integer: Option, int32: Option, int64: Option, float: Option, string: Option, binary: Option, date: Option>, date_time: Option>, password: Option, callback: Option) -> Box> { self.api().test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer, int32, int64, float, string, binary, date, date_time, password, callback, &self.context()) } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java index fde21a6ef0..87e2e912bb 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java @@ -222,8 +222,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -242,7 +242,7 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java index fcac0605ab..312e43c8d7 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java @@ -217,8 +217,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -237,7 +237,7 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java index 8734c49ea1..d3d440abca 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java @@ -167,8 +167,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -187,7 +187,7 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java index 7b194d0045..b4d0e8b828 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java @@ -160,8 +160,8 @@ public class FakeApiController implements FakeApi { } /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 8734c49ea1..d3d440abca 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -167,8 +167,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -187,7 +187,7 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java index 05c54707b0..5d82a5f27c 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java @@ -160,8 +160,8 @@ public class FakeApiController implements FakeApi { } /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index e90acd63c1..4ec5b8e532 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -187,8 +187,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -207,7 +207,7 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index c1dca5a4f2..d1dd5548a6 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -157,8 +157,8 @@ public interface FakeApiDelegate { } /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 8734c49ea1..d3d440abca 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -167,8 +167,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -187,7 +187,7 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java index af0a6322c0..6528d71f79 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java @@ -136,8 +136,8 @@ public class FakeApiController implements FakeApi { } /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index f1793eb192..77c9d65965 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -107,8 +107,8 @@ public interface FakeApiDelegate { ResponseEntity testClientModel(Client body); /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 2e0ea64e1e..5d2a87b712 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -233,8 +233,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -253,7 +253,7 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 029913c450..fbe8652384 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -190,8 +190,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -210,7 +210,7 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index 8c148c1514..2f4d5ac287 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -180,8 +180,8 @@ public interface FakeApiDelegate { } /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 79ba65f66e..22e83bdeb0 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -862,11 +862,11 @@ paths: x-tags: - tag: fake post: - description: | + description: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: @@ -953,11 +953,11 @@ paths: description: User not found security: - http_basic_test: [] - summary: | + summary: |- Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-contentType: application/x-www-form-urlencoded diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index 0be38f0541..eec0cc28a6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -217,8 +217,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -237,7 +237,7 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 036f0530d4..edcebd5f32 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -228,8 +228,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -249,7 +249,7 @@ public interface FakeApi { * or User not found (status code 404) */ @ApiVirtual - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 073b869893..f0d4595455 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -217,8 +217,8 @@ public interface FakeApi { /** - * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @param number None (required) * @param _double None (required) @@ -237,7 +237,7 @@ public interface FakeApi { * @return Invalid username supplied (status code 400) * or User not found (status code 404) */ - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", authorizations = { + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", nickname = "testEndpointParameters", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", authorizations = { @Authorization(value = "http_basic_test") }, tags={ "fake", }) @ApiResponses(value = { From b680d7cd7f9962eeaf7f3d0b764b6a94cd247db5 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sat, 11 Jan 2020 20:52:45 -0500 Subject: [PATCH 43/82] [kotlin] Fixing merge conflict and re-running CI for #4565 (#4977) * [fix-kotlinArrayEnumEmbedded] fix embedded enum array * Add new gen props to bin/ci/kotlin-client-string.json Co-authored-by: nekkiy --- bin/ci/kotlin-client-string.json | 4 +- .../languages/AbstractKotlinCodegen.java | 4 +- .../kotlin-spring/dataClass.mustache | 2 +- .../kotlin-spring/dataClassOptVar.mustache | 2 +- .../kotlin-spring/dataClassReqVar.mustache | 2 +- .../spring/KotlinSpringServerCodegenTest.java | 37 +++++++++++- .../issue______kotlinArrayEnumEmbedded.yaml | 60 +++++++++++++++++++ 7 files changed, 105 insertions(+), 6 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/issue______kotlinArrayEnumEmbedded.yaml diff --git a/bin/ci/kotlin-client-string.json b/bin/ci/kotlin-client-string.json index 52f68e53b4..cceb366c2c 100644 --- a/bin/ci/kotlin-client-string.json +++ b/bin/ci/kotlin-client-string.json @@ -6,6 +6,8 @@ "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", "additionalProperties": { "dateLibrary": "string", - "serializableModel": "true" + "serializableModel": "true", + "sortParamsByRequiredFlag": "false", + "sortModelPropertiesByRequiredFlag": "false" } } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index 9c6610a350..c8486b8fef 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -675,9 +675,11 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co private String getArrayTypeDeclaration(ArraySchema arr) { // TODO: collection type here should be fully qualified namespace to avoid model conflicts // This supports arrays of arrays. - String arrayType = typeMapping.get("array"); + String arrayType; if (ModelUtils.isSet(arr)) { arrayType = typeMapping.get("set"); + } else { + arrayType = typeMapping.get("array"); } StringBuilder instantiationType = new StringBuilder(arrayType); Schema items = arr.getItems(); diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache index 5a8079786c..607daa0f8d 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClass.mustache @@ -25,7 +25,7 @@ * {{{description}}} * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}} */ - enum class {{nameInCamelCase}}(val value: {{{dataType}}}) { + enum class {{nameInCamelCase}}(val value: {{#isContainer}}{{#items}}{{{dataType}}}{{/items}}{{/isContainer}}{{^isContainer}}{{{dataType}}}{{/isContainer}}) { {{#allowableValues}}{{#enumVars}} @JsonProperty({{{value}}}) {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}} {{/enumVars}}{{/allowableValues}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache index 799807798d..5e801f7357 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache @@ -1,4 +1,4 @@ {{#useBeanValidation}}{{#required}} {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} - @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file + @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache index b7765a3e42..0fbccc8975 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache @@ -1,4 +1,4 @@ {{#useBeanValidation}}{{#required}} {{^isReadOnly}}@get:NotNull{{/isReadOnly}} {{/required}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swaggerAnnotations}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swaggerAnnotations}} - @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}{{/isReadOnly}} \ No newline at end of file + @JsonProperty("{{{baseName}}}"){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{baseType}}<{{/isListContainer}}{{classname}}.{{nameInCamelCase}}{{#isListContainer}}>{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isReadOnly}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}{{/isReadOnly}} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java index fcc01e4908..9a4f3357fe 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java @@ -1,15 +1,49 @@ package org.openapitools.codegen.kotlin.spring; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.servers.Server; -import org.openapitools.codegen.CodegenConstants; +import io.swagger.v3.parser.core.models.ParseOptions; +import org.apache.commons.io.FileUtils; +import org.openapitools.codegen.*; +import org.openapitools.codegen.config.CodegenConfigurator; +import org.openapitools.codegen.kotlin.KotlinTestUtils; +import org.openapitools.codegen.languages.AbstractJavaCodegen; +import org.openapitools.codegen.languages.JavaClientCodegen; import org.openapitools.codegen.languages.KotlinSpringServerCodegen; +import org.openapitools.codegen.languages.SpringCodegen; +import org.openapitools.codegen.languages.features.CXFServerFeatures; import org.testng.Assert; import org.testng.annotations.Test; +import java.io.File; +import java.nio.file.Files; +import java.util.Collections; + public class KotlinSpringServerCodegenTest { + @Test(description = "test embedded enum array") + public void embeddedEnumArrayTest() throws Exception { + String baseModelPackage = "zz"; + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); //may be move to /build + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/issue______kotlinArrayEnumEmbedded.yaml"); + KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, baseModelPackage + ".yyyy.model.xxxx"); + ClientOptInput input = new ClientOptInput(); + input.openAPI(openAPI); + input.config(codegen); + DefaultGenerator generator = new DefaultGenerator(); + generator.opts(input).generate(); + File resultSourcePath = new File(output, "src/main/kotlin"); + File outputModel = Files.createTempDirectory("test").toFile().getCanonicalFile(); + FileUtils.copyDirectory(new File(resultSourcePath, baseModelPackage), new File(outputModel, baseModelPackage)); + //no exception + ClassLoader cl = KotlinTestUtils.buildModule(Collections.singletonList(outputModel.getAbsolutePath()), Thread.currentThread().getContextClassLoader()); + } + @Test public void testInitialConfigValues() throws Exception { final KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); @@ -34,6 +68,7 @@ public class KotlinSpringServerCodegenTest { Assert.assertEquals(codegen.additionalProperties().get(KotlinSpringServerCodegen.SERVER_PORT), "8080"); } + @Test public void testSettersForConfigValues() throws Exception { final KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); diff --git a/modules/openapi-generator/src/test/resources/3_0/issue______kotlinArrayEnumEmbedded.yaml b/modules/openapi-generator/src/test/resources/3_0/issue______kotlinArrayEnumEmbedded.yaml new file mode 100644 index 0000000000..bdb8a76de3 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue______kotlinArrayEnumEmbedded.yaml @@ -0,0 +1,60 @@ +openapi: "3.0.1" +info: + title: test + version: "1.0" +paths: + /test: + get: + operationId: test + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/EmbeddedEnumArray' + +components: + schemas: + EmbeddedEnumArray: + type: object + properties: + colors: + type: array + items: + type: string + enum: ['BLACK', 'RED', 'ORANGE', 'YELLOW', 'BLUE', 'GREEN'] + reqColors: + type: array + items: + type: string + enum: ['BLACK', 'RED', 'ORANGE', 'YELLOW', 'BLUE', 'GREEN'] + required: + - reqColors + NoEmbeddedEnumArray: + type: object + properties: + colors: + type: array + items: + $ref: '#/components/schemas/Colors' + reqColors: + type: array + items: + $ref: '#/components/schemas/Colors' + required: + - reqColors + Colors: + type: string + enum: ['BLACK', 'RED', 'ORANGE', 'YELLOW', 'BLUE', 'GREEN'] + SimpleColorContainer: + type: object + properties: + color: + type: string + enum: ['BLACK', 'RED', 'ORANGE', 'YELLOW', 'BLUE', 'GREEN'] + reqColor: + type: string + enum: ['BLACK', 'RED', 'ORANGE', 'YELLOW', 'BLUE', 'GREEN'] + required: + - reqColor From b22f7f033f0af5a945fb3f48165f15c2aad6673e Mon Sep 17 00:00:00 2001 From: valery1707 Date: Mon, 13 Jan 2020 05:34:43 +0300 Subject: [PATCH 44/82] Reduce scope of recommended git configuration (#4983) --- CONTRIBUTING.md | 2 +- docs/contributing.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3566369348..8c4bd40f4f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,5 +101,5 @@ To start the CI tests, you can run `mvn verify -Psamples` (assuming you've all t - Make sure test cases passed after the change (one way is to leverage https://travis-ci.org/ to run the CI tests) - File a PR with meaningful title, description and commit messages. - Recommended git settings - - `git config --global core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around + - `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around - To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/)) diff --git a/docs/contributing.md b/docs/contributing.md index aa0e6f4ff8..8038fa512e 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -105,5 +105,5 @@ To start the CI tests, you can run `mvn verify -Psamples` (assuming you've all t - Make sure test cases passed after the change (one way is to leverage https://travis-ci.org/ to run the CI tests) - File a PR with meaningful title, description and commit messages. - Recommended git settings - - `git config --global core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around + - `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around - To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/)) From b22fde6caad56e37a20799b4c1041dc2d44fefd8 Mon Sep 17 00:00:00 2001 From: valery1707 Date: Mon, 13 Jan 2020 10:26:56 +0300 Subject: [PATCH 45/82] Use UTF-8 charset on writing files (#4984) --- .../java/org/openapitools/codegen/cmd/Meta.java | 3 ++- .../codegen/languages/OpenAPIGenerator.java | 3 ++- .../codegen/languages/ScalaGatlingCodegen.java | 13 +++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java index e16b281d6d..aad40007de 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java @@ -36,6 +36,7 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; import java.io.Reader; +import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; @@ -159,7 +160,7 @@ public class Meta implements Runnable { LOGGER.info("copying file to {}", outputFile.getAbsolutePath()); } - FileUtils.writeStringToFile(outputFile, formatted); + FileUtils.writeStringToFile(outputFile, formatted, StandardCharsets.UTF_8); return outputFile; } catch (IOException e) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java index 0025801666..453ddb44ba 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java @@ -29,6 +29,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; +import java.nio.charset.StandardCharsets; import java.util.EnumSet; public class OpenAPIGenerator extends DefaultCodegen implements CodegenConfig { @@ -75,7 +76,7 @@ public class OpenAPIGenerator extends DefaultCodegen implements CodegenConfig { try { String outputFile = outputFolder + File.separator + "openapi.json"; - FileUtils.writeStringToFile(new File(outputFile), jsonOpenAPI); + FileUtils.writeStringToFile(new File(outputFile), jsonOpenAPI, StandardCharsets.UTF_8); LOGGER.info("wrote file to " + outputFile); } catch (Exception e) { LOGGER.error(e.getMessage(), e); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java index 6cb7812228..06c504bf51 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java @@ -35,6 +35,7 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.*; public class ScalaGatlingCodegen extends AbstractScalaCodegen implements CodegenConfig { @@ -312,7 +313,11 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen operation.setVendorExtension("x-gatling-body-feeder", operation.getOperationId() + "BodyFeeder"); operation.setVendorExtension("x-gatling-body-feeder-params", StringUtils.join(sessionBodyVars, ",")); try { - FileUtils.writeStringToFile(new File(outputFolder + File.separator + dataFolder + File.separator + operation.getOperationId() + "-" + "bodyParams.csv"), StringUtils.join(bodyFeederParams, ",")); + FileUtils.writeStringToFile( + new File(outputFolder + File.separator + dataFolder + File.separator + operation.getOperationId() + "-" + "bodyParams.csv"), + StringUtils.join(bodyFeederParams, ","), + StandardCharsets.UTF_8 + ); } catch (IOException ioe) { LOGGER.error("Could not create feeder file for operationId" + operation.getOperationId(), ioe); } @@ -358,7 +363,11 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen operation.addExtension("x-gatling-" + parameterType.toLowerCase(Locale.ROOT) + "-params", vendorList); operation.addExtension("x-gatling-" + parameterType.toLowerCase(Locale.ROOT) + "-feeder", operation.getOperationId() + parameterType.toUpperCase(Locale.ROOT) + "Feeder"); try { - FileUtils.writeStringToFile(new File(outputFolder + File.separator + dataFolder + File.separator + operation.getOperationId() + "-" + parameterType.toLowerCase(Locale.ROOT) + "Params.csv"), StringUtils.join(parameterNames, ",")); + FileUtils.writeStringToFile( + new File(outputFolder + File.separator + dataFolder + File.separator + operation.getOperationId() + "-" + parameterType.toLowerCase(Locale.ROOT) + "Params.csv"), + StringUtils.join(parameterNames, ","), + StandardCharsets.UTF_8 + ); } catch (IOException ioe) { LOGGER.error("Could not create feeder file for operationId" + operation.getOperationId(), ioe); } From cf67725e4fed6be8f4cc0dae90064b0dcdb6f1df Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 13 Jan 2020 16:38:29 +0800 Subject: [PATCH 46/82] comment out broken tests due to bad data (#4985) --- .../SwaggerClientTests/SwaggerClientTests/UserAPITests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift index ae0994fa82..36e2852923 100644 --- a/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift +++ b/samples/client/petstore/swift4/rxswiftLibrary/SwaggerClientTests/SwaggerClientTests/UserAPITests.swift @@ -64,7 +64,7 @@ class UserAPITests: XCTestCase { }).disposed(by: disposeBag) self.waitForExpectations(timeout: testTimeout, handler: nil) } - +/* func test1CreateUser() { let expectation = self.expectation(description: "testCreateUser") let newUser = User(id: 1000, username: "test@test.com", firstName: "Test", lastName: "Tester", email: "test@test.com", password: "test!", phone: "867-5309", userStatus: 0) @@ -121,5 +121,5 @@ class UserAPITests: XCTestCase { }).disposed(by: disposeBag) self.waitForExpectations(timeout: testTimeout, handler: nil) } - +*/ } From fb6daa89b0d4236f321eeff8d2850b57d22888b9 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Mon, 13 Jan 2020 19:01:40 +0530 Subject: [PATCH 47/82] [r] Ignore cran-comments file from the build (#4986) * fix(cran-comments): Ignoring CRAN comments file from build * fix(cran-comments): Ignoring CRAN comments file from build --- .../src/main/resources/r/Rbuildignore.mustache | 3 ++- samples/client/petstore/R/.Rbuildignore | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/r/Rbuildignore.mustache b/modules/openapi-generator/src/main/resources/r/Rbuildignore.mustache index 10cdec0cd6..512c98c133 100644 --- a/modules/openapi-generator/src/main/resources/r/Rbuildignore.mustache +++ b/modules/openapi-generator/src/main/resources/r/Rbuildignore.mustache @@ -5,4 +5,5 @@ ^\.openapi-generator$ ^docs$ ^git_push\.sh$ -^README\.md$ \ No newline at end of file +^README\.md$ +^cran-comments\.md$ \ No newline at end of file diff --git a/samples/client/petstore/R/.Rbuildignore b/samples/client/petstore/R/.Rbuildignore index 10cdec0cd6..512c98c133 100644 --- a/samples/client/petstore/R/.Rbuildignore +++ b/samples/client/petstore/R/.Rbuildignore @@ -5,4 +5,5 @@ ^\.openapi-generator$ ^docs$ ^git_push\.sh$ -^README\.md$ \ No newline at end of file +^README\.md$ +^cran-comments\.md$ \ No newline at end of file From bf24d646c52116519b891b174f72f2db5dd83532 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Mon, 13 Jan 2020 21:29:18 -0800 Subject: [PATCH 48/82] [PHP] fix php-slim4-server CI tests #4994 (#4995) * Suggested no-api fix * Adds sample update --- .../src/main/resources/php-slim4-server/composer.mustache | 5 +++-- samples/server/petstore/php-slim4/composer.json | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache index 2c399a84d7..10b4ec4a10 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache @@ -2,8 +2,9 @@ "minimum-stability": "RC", "repositories": [ { - "type": "github", - "url": "https://github.com/ybelenko/slim-token-authentication" + "type": "vcs", + "url": "https://github.com/ybelenko/slim-token-authentication", + "no-api": true } ], "require": { diff --git a/samples/server/petstore/php-slim4/composer.json b/samples/server/petstore/php-slim4/composer.json index eebb5f2440..c1afb518ef 100644 --- a/samples/server/petstore/php-slim4/composer.json +++ b/samples/server/petstore/php-slim4/composer.json @@ -2,8 +2,9 @@ "minimum-stability": "RC", "repositories": [ { - "type": "github", - "url": "https://github.com/ybelenko/slim-token-authentication" + "type": "vcs", + "url": "https://github.com/ybelenko/slim-token-authentication", + "no-api": true } ], "require": { From 0344f14e9a4fbffe696649545792deee7ea89a71 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 14 Jan 2020 14:11:35 +0800 Subject: [PATCH 49/82] fix csharp-netcore doc (#4987) --- .../resources/csharp-netcore/README.mustache | 15 ++-- .../resources/csharp-netcore/api_doc.mustache | 15 ++-- .../csharp-netcore/OpenAPIClient/README.md | 5 +- .../OpenAPIClient/docs/AnotherFakeApi.md | 5 +- .../OpenAPIClient/docs/FakeApi.md | 74 +++++++++++-------- .../docs/FakeClassnameTags123Api.md | 9 ++- .../OpenAPIClient/docs/PetApi.md | 65 +++++++++------- .../OpenAPIClient/docs/StoreApi.md | 24 +++--- .../OpenAPIClient/docs/UserApi.md | 40 ++++++---- .../OpenAPIClientCore/README.md | 5 +- .../OpenAPIClientCore/docs/AnotherFakeApi.md | 5 +- .../OpenAPIClientCore/docs/FakeApi.md | 74 +++++++++++-------- .../docs/FakeClassnameTags123Api.md | 9 ++- .../OpenAPIClientCore/docs/PetApi.md | 65 +++++++++------- .../OpenAPIClientCore/docs/StoreApi.md | 24 +++--- .../OpenAPIClientCore/docs/UserApi.md | 40 ++++++---- 16 files changed, 276 insertions(+), 198 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache index 56f1b07071..4ac0fb9378 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/README.mustache @@ -93,28 +93,29 @@ namespace Example public static void Main() { {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} - Configuration.Default.BasePath = "{{{basePath}}}"; + Configuration config = new Configuration(); + config.BasePath = "{{{basePath}}}"; {{#hasAuthMethods}} {{#authMethods}} {{#isBasic}} // Configure HTTP basic authorization: {{{name}}} - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; {{/isBasic}} {{#isApiKey}} // Configure API key authorization: {{{name}}} - Configuration.Default.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); + config.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); + // config.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); {{/isApiKey}} {{#isOAuth}} // Configure OAuth2 access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; {{/isOAuth}} {{/authMethods}} {{/hasAuthMethods}} - var apiInstance = new {{classname}}(Configuration.Default); + var apiInstance = new {{classname}}(config); {{#allParams}} {{#isPrimitiveType}} var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache index 2eb7c9eb34..544411db91 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api_doc.mustache @@ -32,28 +32,29 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "{{{basePath}}}"; + Configuration config = new Configuration(); + config.BasePath = "{{{basePath}}}"; {{#hasAuthMethods}} {{#authMethods}} {{#isBasic}} // Configure HTTP basic authorization: {{{name}}} - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; {{/isBasic}} {{#isApiKey}} // Configure API key authorization: {{{name}}} - Configuration.Default.AddApiKey("{{{keyParamName}}}", "YOUR_API_KEY"); + config.AddApiKey("{{{keyParamName}}}", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("{{{keyParamName}}}", "Bearer"); + // config.AddApiKeyPrefix("{{{keyParamName}}}", "Bearer"); {{/isApiKey}} {{#isOAuth}} // Configure OAuth2 access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; {{/isOAuth}} {{/authMethods}} {{/hasAuthMethods}} - var apiInstance = new {{classname}}(Configuration.Default); + var apiInstance = new {{classname}}(config); {{#allParams}} {{#isPrimitiveType}} var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md index 877eda7028..1b2baab715 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/README.md @@ -61,8 +61,9 @@ namespace Example public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new AnotherFakeApi(config); var body = new ModelClient(); // ModelClient | client model try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md index bf404a2f49..838b304529 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/AnotherFakeApi.md @@ -29,8 +29,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new AnotherFakeApi(config); var body = new ModelClient(); // ModelClient | client model try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md index eeb5fe39b1..e1fcf65397 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md @@ -42,8 +42,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var xmlItem = new XmlItem(); // XmlItem | XmlItem Body try @@ -110,8 +111,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = true; // bool? | Input boolean as post body (optional) try @@ -178,8 +180,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) try @@ -246,8 +249,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = 8.14; // decimal? | Input number as post body (optional) try @@ -314,8 +318,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = body_example; // string | Input string as post body (optional) try @@ -382,8 +387,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = new FileSchemaTestClass(); // FileSchemaTestClass | try @@ -447,8 +453,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var query = query_example; // string | var body = new User(); // User | @@ -516,8 +523,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = new ModelClient(); // ModelClient | client model try @@ -585,12 +593,13 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure HTTP basic authorization: http_basic_test - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; - var apiInstance = new FakeApi(Configuration.Default); + var apiInstance = new FakeApi(config); var number = 8.14; // decimal | None var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None @@ -684,8 +693,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) @@ -767,8 +777,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789; // long | Required Integer in group parameters @@ -843,8 +854,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var param = new Dictionary(); // Dictionary | request body try @@ -909,8 +921,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var param = param_example; // string | field1 var param2 = param2_example; // string | field2 @@ -979,8 +992,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var pipe = new List(); // List | var ioutil = new List(); // List | var http = new List(); // List | diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md index 3a241e3c63..0eb3b10ace 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeClassnameTags123Api.md @@ -29,13 +29,14 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key_query - Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY"); + config.AddApiKey("api_key_query", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); + // config.AddApiKeyPrefix("api_key_query", "Bearer"); - var apiInstance = new FakeClassnameTags123Api(Configuration.Default); + var apiInstance = new FakeClassnameTags123Api(config); var body = new ModelClient(); // ModelClient | client model try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md index f8d05ec939..23ccf5ec90 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md @@ -35,11 +35,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var body = new Pet(); // Pet | Pet object that needs to be added to the store try @@ -105,11 +106,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var petId = 789; // long | Pet id to delete var apiKey = apiKey_example; // string | (optional) @@ -179,11 +181,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var status = status_example; // List | Status values that need to be considered for filter try @@ -252,11 +255,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var tags = new List(); // List | Tags to filter by try @@ -325,13 +329,14 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); + config.AddApiKey("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); + // config.AddApiKeyPrefix("api_key", "Bearer"); - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var petId = 789; // long | ID of pet to return try @@ -399,11 +404,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var body = new Pet(); // Pet | Pet object that needs to be added to the store try @@ -471,11 +477,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var petId = 789; // long | ID of pet that needs to be updated var name = name_example; // string | Updated name of the pet (optional) var status = status_example; // string | Updated status of the pet (optional) @@ -544,11 +551,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var petId = 789; // long | ID of pet to update var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) @@ -618,11 +626,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var petId = 789; // long | ID of pet to update var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md index c514385260..8be6beb2be 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md @@ -32,8 +32,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(config); var orderId = orderId_example; // string | ID of the order that needs to be deleted try @@ -101,13 +102,14 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); + config.AddApiKey("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); + // config.AddApiKeyPrefix("api_key", "Bearer"); - var apiInstance = new StoreApi(Configuration.Default); + var apiInstance = new StoreApi(config); try { @@ -171,8 +173,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(config); var orderId = 789; // long | ID of pet that needs to be fetched try @@ -240,8 +243,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(config); var body = new Order(); // Order | order placed for purchasing the pet try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md index 4588b44013..b546df8686 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/UserApi.md @@ -36,8 +36,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var body = new User(); // User | Created user object try @@ -102,8 +103,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var body = new List(); // List | List of user object try @@ -168,8 +170,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var body = new List(); // List | List of user object try @@ -236,8 +239,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var username = username_example; // string | The name that needs to be deleted try @@ -303,8 +307,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. try @@ -372,8 +377,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var username = username_example; // string | The user name for login var password = password_example; // string | The password for login in clear text @@ -442,8 +448,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); try { @@ -506,8 +513,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var username = username_example; // string | name that need to be deleted var body = new User(); // User | Updated user object diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md index 222ac2d0d6..a3664cf3b1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/README.md @@ -73,8 +73,9 @@ namespace Example public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new AnotherFakeApi(config); var body = new ModelClient(); // ModelClient | client model try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md index bf404a2f49..838b304529 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/AnotherFakeApi.md @@ -29,8 +29,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new AnotherFakeApi(config); var body = new ModelClient(); // ModelClient | client model try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md index eeb5fe39b1..e1fcf65397 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md @@ -42,8 +42,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var xmlItem = new XmlItem(); // XmlItem | XmlItem Body try @@ -110,8 +111,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = true; // bool? | Input boolean as post body (optional) try @@ -178,8 +180,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) try @@ -246,8 +249,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = 8.14; // decimal? | Input number as post body (optional) try @@ -314,8 +318,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = body_example; // string | Input string as post body (optional) try @@ -382,8 +387,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = new FileSchemaTestClass(); // FileSchemaTestClass | try @@ -447,8 +453,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var query = query_example; // string | var body = new User(); // User | @@ -516,8 +523,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var body = new ModelClient(); // ModelClient | client model try @@ -585,12 +593,13 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure HTTP basic authorization: http_basic_test - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; - var apiInstance = new FakeApi(Configuration.Default); + var apiInstance = new FakeApi(config); var number = 8.14; // decimal | None var _double = 1.2D; // double | None var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None @@ -684,8 +693,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) @@ -767,8 +777,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters var requiredInt64Group = 789; // long | Required Integer in group parameters @@ -843,8 +854,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var param = new Dictionary(); // Dictionary | request body try @@ -909,8 +921,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var param = param_example; // string | field1 var param2 = param2_example; // string | field2 @@ -979,8 +992,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new FakeApi(config); var pipe = new List(); // List | var ioutil = new List(); // List | var http = new List(); // List | diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md index 3a241e3c63..0eb3b10ace 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeClassnameTags123Api.md @@ -29,13 +29,14 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key_query - Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY"); + config.AddApiKey("api_key_query", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); + // config.AddApiKeyPrefix("api_key_query", "Bearer"); - var apiInstance = new FakeClassnameTags123Api(Configuration.Default); + var apiInstance = new FakeClassnameTags123Api(config); var body = new ModelClient(); // ModelClient | client model try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md index f8d05ec939..23ccf5ec90 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md @@ -35,11 +35,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var body = new Pet(); // Pet | Pet object that needs to be added to the store try @@ -105,11 +106,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var petId = 789; // long | Pet id to delete var apiKey = apiKey_example; // string | (optional) @@ -179,11 +181,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var status = status_example; // List | Status values that need to be considered for filter try @@ -252,11 +255,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var tags = new List(); // List | Tags to filter by try @@ -325,13 +329,14 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); + config.AddApiKey("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); + // config.AddApiKeyPrefix("api_key", "Bearer"); - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var petId = 789; // long | ID of pet to return try @@ -399,11 +404,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var body = new Pet(); // Pet | Pet object that needs to be added to the store try @@ -471,11 +477,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var petId = 789; // long | ID of pet that needs to be updated var name = name_example; // string | Updated name of the pet (optional) var status = status_example; // string | Updated status of the pet (optional) @@ -544,11 +551,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var petId = 789; // long | ID of pet to update var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) @@ -618,11 +626,12 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + config.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new PetApi(Configuration.Default); + var apiInstance = new PetApi(config); var petId = 789; // long | ID of pet to update var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md index c514385260..8be6beb2be 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md @@ -32,8 +32,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(config); var orderId = orderId_example; // string | ID of the order that needs to be deleted try @@ -101,13 +102,14 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); + config.AddApiKey("api_key", "YOUR_API_KEY"); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); + // config.AddApiKeyPrefix("api_key", "Bearer"); - var apiInstance = new StoreApi(Configuration.Default); + var apiInstance = new StoreApi(config); try { @@ -171,8 +173,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(config); var orderId = 789; // long | ID of pet that needs to be fetched try @@ -240,8 +243,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new StoreApi(config); var body = new Order(); // Order | order placed for purchasing the pet try diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md index 4588b44013..b546df8686 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/UserApi.md @@ -36,8 +36,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var body = new User(); // User | Created user object try @@ -102,8 +103,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var body = new List(); // List | List of user object try @@ -168,8 +170,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var body = new List(); // List | List of user object try @@ -236,8 +239,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var username = username_example; // string | The name that needs to be deleted try @@ -303,8 +307,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. try @@ -372,8 +377,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var username = username_example; // string | The user name for login var password = password_example; // string | The password for login in clear text @@ -442,8 +448,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); try { @@ -506,8 +513,9 @@ namespace Example { public static void Main() { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); + Configuration config = new Configuration(); + config.BasePath = "http://petstore.swagger.io:80/v2"; + var apiInstance = new UserApi(config); var username = username_example; // string | name that need to be deleted var body = new User(); // User | Updated user object From 65a6d948426aeb8cee1be5da6d7c030470b05235 Mon Sep 17 00:00:00 2001 From: Akihito Nakano Date: Tue, 14 Jan 2020 21:51:00 +0900 Subject: [PATCH 50/82] Add a link to blog post in TECHSCORE (#4996) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4c0ade373a..6f61bf4377 100644 --- a/README.md +++ b/README.md @@ -716,6 +716,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-11-25 - [openapi-generatorで手軽にスタブサーバとクライアントの生成](https://qiita.com/pochopocho13/items/8db662e1934fb2b408b8) by [@pochopocho13](https://twitter.com/pochopocho13) - 2019-11-26 - [CordaCon 2019 Highlights: Braid Server and OpenAPI Generator for Corda Client API’s](https://blog.b9lab.com/cordacon-2019-highlights-braid-server-and-openapi-generator-for-corda-flows-api-s-d24179ccb27c) by [Adel Rustum](https://blog.b9lab.com/@adelrestom) at [B9lab](https://blog.b9lab.com/) - 2019-12-04 - [Angular+NestJS+OpenAPI(Swagger)でマイクロサービスを視野に入れた環境を考える](https://qiita.com/teracy55/items/0327c7a170ec772970c6) by [てらしー](https://twitter.com/teracy55) +- 2019-12-17 - [OpenAPI Generator で OAuth2 アクセストークン発行のコードまで生成してみる](https://www.techscore.com/blog/2019/12/17/openapi-generator-oauth2-accesstoken/) by [TECHSCORE](https://www.techscore.com/blog/) - 2019-12-23 - [Use Ada for Your Web Development](https://www.electronicdesign.com/technologies/embedded-revolution/article/21119177/use-ada-for-your-web-development) by [Stephane Carrez](https://github.com/stcarrez) ## [6 - About Us](#table-of-contents) From 4767259df4fc5d933722ad61d7e6ae1074f562d1 Mon Sep 17 00:00:00 2001 From: Hui Yu Date: Tue, 14 Jan 2020 21:36:12 +0800 Subject: [PATCH 51/82] [C-libcurl] Support setting basePath and apiKeys when creating an apiClient (#4960) --- .../resources/C-libcurl/apiClient.c.mustache | 62 ++++++++++++++++++- .../resources/C-libcurl/apiClient.h.mustache | 10 +++ 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache index c6f29bc491..0c3df633df 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache @@ -12,7 +12,7 @@ size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp); apiClient_t *apiClient_create() { curl_global_init(CURL_GLOBAL_ALL); apiClient_t *apiClient = malloc(sizeof(apiClient_t)); - apiClient->basePath = "{{{basePath}}}"; + apiClient->basePath = strdup("{{{basePath}}}"); apiClient->dataReceived = NULL; apiClient->response_code = 0; {{#hasAuthMethods}} @@ -33,7 +33,56 @@ apiClient_t *apiClient_create() { return apiClient; } +apiClient_t *apiClient_create_with_base_path(const char *basePath +{{#hasAuthMethods}} +{{#authMethods}} +{{#isApiKey}} +, list_t *apiKeys +{{/isApiKey}} +{{/authMethods}} +{{/hasAuthMethods}} +) { + curl_global_init(CURL_GLOBAL_ALL); + apiClient_t *apiClient = malloc(sizeof(apiClient_t)); + if(basePath){ + apiClient->basePath = strdup(basePath); + }else{ + apiClient->basePath = strdup("{{{basePath}}}"); + } + apiClient->dataReceived = NULL; + apiClient->response_code = 0; + {{#hasAuthMethods}} + {{#authMethods}} + {{#isBasic}} + apiClient->username = NULL; + apiClient->password = NULL; + {{/isBasic}} + {{#isOAuth}} + apiClient->accessToken = NULL; + {{/isOAuth}} + {{#isApiKey}} + if(apiKeys!= NULL) { + apiClient->apiKeys = list_create(); + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, apiKeys) { + keyValuePair_t *pair = listEntry->data; + keyValuePair_t *pairDup = keyValuePair_create(strdup(pair->key), strdup(pair->value)); + list_addElement(apiClient->apiKeys, pairDup); + } + }else{ + apiClient->apiKeys = NULL; + } + {{/isApiKey}} + {{/authMethods}} + {{/hasAuthMethods}} + + return apiClient; +} + void apiClient_free(apiClient_t *apiClient) { + if(apiClient->basePath) { + free(apiClient->basePath); + } {{#hasAuthMethods}} {{#authMethods}} {{#isBasic}} @@ -51,6 +100,17 @@ void apiClient_free(apiClient_t *apiClient) { {{/isOAuth}} {{#isApiKey}} if(apiClient->apiKeys) { + listEntry_t *listEntry = NULL; + list_ForEach(listEntry, apiClient->apiKeys) { + keyValuePair_t *pair = listEntry->data; + if(pair->key){ + free(pair->key); + } + if(pair->value){ + free(pair->value); + } + keyValuePair_free(pair); + } list_free(apiClient->apiKeys); } {{/isApiKey}} diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache index 8b133e9f28..5abae164e6 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.h.mustache @@ -37,6 +37,16 @@ typedef struct binary_t apiClient_t* apiClient_create(); +apiClient_t* apiClient_create_with_base_path(const char *basePath +{{#hasAuthMethods}} +{{#authMethods}} +{{#isApiKey}} +, list_t *apiKeys +{{/isApiKey}} +{{/authMethods}} +{{/hasAuthMethods}} +); + void apiClient_free(apiClient_t *apiClient); void apiClient_invoke(apiClient_t *apiClient,char* operationParameter, list_t *queryParameters, list_t *headerParameters, list_t *formParameters,list_t *headerType,list_t *contentType, char *bodyParameters, char *requestType); From 8a94a3a7d585051fd95ea5952d1174515b82468b Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 14 Jan 2020 06:38:16 -0800 Subject: [PATCH 52/82] [Java] Fixes Spring generator devaultValues for int64/float/double (#4969) * Updates spring generator to omit type suffixes from int float double defaults, adds testDefaultValuesFixed Adds the test testDefaultValuesFixed * Updates SpringCodegen to only remove character suffixes from CodegenParameter defaultValues, updates tests * Updates java function comment * Adds early return in postProcessParameter * Removes unneeded imports * Fixes decorators on java method postProcessParameter * Fixes typo * Fixes paste error * Removes unused import --- .../codegen/languages/SpringCodegen.java | 21 ++++++ .../java/spring/SpringCodegenTest.java | 50 +++++++++++-- .../src/test/resources/2_0/issue1226.yaml | 71 +++++++++++++++++++ 3 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/2_0/issue1226.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 7f1eaf47a5..f4218df1fc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -877,4 +877,25 @@ public class SpringCodegen extends AbstractJavaCodegen public void setUseOptional(boolean useOptional) { this.useOptional = useOptional; } + + @Override + public void postProcessParameter(CodegenParameter p) { + // we use a custom version of this function to remove the l, d, and f suffixes from Long/Double/Float + // defaultValues + // remove the l because our users will use Long.parseLong(String defaultValue) + // remove the d because our users will use Double.parseDouble(String defaultValue) + // remove the f because our users will use Float.parseFloat(String defaultValue) + // NOTE: for CodegenParameters we DO need these suffixes because those defaultValues are used as java value + // literals assigned to Long/Double/Float + if (p.defaultValue == null) { + return; + } + Boolean fixLong = (p.isLong && "l".equals(p.defaultValue.substring(p.defaultValue.length()-1))); + Boolean fixDouble = (p.isDouble && "d".equals(p.defaultValue.substring(p.defaultValue.length()-1))); + Boolean fixFloat = (p.isFloat && "f".equals(p.defaultValue.substring(p.defaultValue.length()-1))); + if (fixLong || fixDouble || fixFloat) { + p.defaultValue = p.defaultValue.substring(0, p.defaultValue.length()-1); + } + } + } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index b80a2fa69d..e23ebbeeb5 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -19,13 +19,12 @@ package org.openapitools.codegen.java.spring; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.servers.Server; import io.swagger.v3.parser.core.models.ParseOptions; -import org.openapitools.codegen.CliOption; -import org.openapitools.codegen.ClientOptInput; -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.MockDefaultGenerator; +import org.openapitools.codegen.*; import org.openapitools.codegen.languages.SpringCodegen; import org.openapitools.codegen.languages.features.CXFServerFeatures; import org.testng.Assert; @@ -440,7 +439,7 @@ public class SpringCodegenTest { checkFileContains(generator, outputPath + "/src/main/java/org/openapitools/api/ExampleApi.java", "@RequestBody(required = false"); } - + @Test public void useBeanValidationTruePerformBeanValidationTrueJava8FalseForFormatEmail() throws IOException { beanValidationForFormatEmail(true, true, false, "@org.hibernate.validator.constraints.Email", "@javax.validation.constraints.Email"); @@ -455,7 +454,7 @@ public class SpringCodegenTest { public void useBeanValidationTruePerformBeanValidationTrueJava8TrueForFormatEmail() throws IOException { beanValidationForFormatEmail(true, true, true, "@javax.validation.constraints.Email", "@org.hibernate.validator.constraints.Email"); } - + private void beanValidationForFormatEmail(boolean useBeanValidation, boolean performBeanValidation, boolean java8, String contains, String notContains) throws IOException { File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); output.deleteOnExit(); @@ -481,4 +480,43 @@ public class SpringCodegenTest { checkFileNotContains(generator, outputPath + "/src/main/java/org/openapitools/model/PersonWithEmail.java", notContains); } + @Test + public void testDefaultValuesFixed() { + // we had an issue where int64, float, and double values were having single character string suffixes + // included in their defaultValues + // This test verifies that those characters are no longer present + final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/issue1226.yaml"); + final SpringCodegen codegen = new SpringCodegen(); + codegen.setOpenAPI(openAPI); + + String int64Val = "9223372036854775807l"; + String floatVal = "3.14159f"; + String doubleVal = "3.14159d"; + + // make sure that the model properties include character suffixes + String modelName = "NumberHolder"; + Schema nhSchema = openAPI.getComponents().getSchemas().get(modelName); + CodegenModel cm = codegen.fromModel(modelName, nhSchema); + CodegenProperty int64Prop = cm.vars.get(0); + CodegenProperty floatProp = cm.vars.get(1); + CodegenProperty doubleProp = cm.vars.get(2); + Assert.assertEquals(int64Prop.defaultValue, int64Val); + Assert.assertEquals(floatProp.defaultValue, floatVal); + Assert.assertEquals(doubleProp.defaultValue, doubleVal); + + int64Val = "9223372036854775807"; + floatVal = "3.14159"; + doubleVal = "3.14159"; + + // make sure that the operation parameters omit character suffixes + String route = "/numericqueryparams"; + Operation op = openAPI.getPaths().get(route).getGet(); + CodegenOperation co = codegen.fromOperation(route, "GET", op, null); + CodegenParameter int64Param = co.queryParams.get(0); + CodegenParameter floatParam = co.queryParams.get(1); + CodegenParameter doubleParam = co.queryParams.get(2); + Assert.assertEquals(int64Param.defaultValue, int64Val); + Assert.assertEquals(floatParam.defaultValue, floatVal); + Assert.assertEquals(doubleParam.defaultValue, doubleVal); + } } diff --git a/modules/openapi-generator/src/test/resources/2_0/issue1226.yaml b/modules/openapi-generator/src/test/resources/2_0/issue1226.yaml new file mode 100644 index 0000000000..2e880b4b21 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/2_0/issue1226.yaml @@ -0,0 +1,71 @@ +swagger: '2.0' +info: + description: 'blah' + version: 1.0.0 + title: sample spec +host: fake.site.com +tags: [] +schemes: + - https +paths: + /numberdata: + post: + summary: Get back a NumberHolder + description: '' + operationId: getNumberHolder + consumes: + - application/json + produces: + - application/json + parameters: [] + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/NumberHolder' + /numericqueryparams: + get: + tags: + - user + summary: a test route for numeric query params + description: '' + operationId: numericQueryParams + produces: + - application/json + parameters: + - in: query + name: int64 + type: integer + format: int64 + default: 9223372036854775807 + - in: query + name: float + type: number + format: float + default: 3.14159 + - in: query + name: double + type: number + format: double + default: 3.14159 + responses: + default: + description: successful operation +securityDefinitions: {} +definitions: + NumberHolder: + description: A model to hold the three number types which should no longer have string suffixes + type: object + properties: + int64: + type: integer + format: int64 + default: 9223372036854775807 + float: + type: number + format: float + default: 3.14159 + double: + type: number + format: double + default: 3.14159 From 6a48dd7cd61196848932a5b980b55aa74757ebdd Mon Sep 17 00:00:00 2001 From: sullis Date: Tue, 14 Jan 2020 06:40:01 -0800 Subject: [PATCH 53/82] upgrade Jackson, swagger-core, and swagger-parser (#4915) - swagger-parser 2.0.17 - swagger-core 2.1.1 - jackson 2.10.1 --- modules/openapi-generator/pom.xml | 11 ++++++++--- .../org/openapitools/codegen/utils/JsonCacheImpl.java | 6 +++++- .../codegen/serializer/SerializerUtilsTest.java | 4 ++-- pom.xml | 4 ++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 7e793f4549..9ab17b45b5 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -198,8 +198,8 @@ 1.3.0 26.0-jre 1.0.2 - 2.9.10 - 2.9.10 + 2.10.1 + 2.10.0 1.3.60 @@ -212,7 +212,7 @@ ${swagger-parser-groupid} swagger-parser ${swagger-parser-version} - + com.samskivert jmustache @@ -268,6 +268,11 @@ jackson-datatype-guava ${jackson-version} + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + org.testng testng diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java index 9409372b4d..3f2688fc5e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java @@ -1364,7 +1364,11 @@ class JsonCacheImpl implements JsonCache.Root { } else { JsonNode node = root.at(ptr); Object value = node.isPojo() && !JsonNode.class.isAssignableFrom(type) ? ((POJONode) node).getPojo() : node; - result = mapper.convertValue(value, type); + if ((value != null) && (value.getClass() == type)) { + result = (T) value; + } else { + result = mapper.convertValue(value, type); + } } return result; } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/serializer/SerializerUtilsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/serializer/SerializerUtilsTest.java index 80629f717b..046645ec0d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/serializer/SerializerUtilsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/serializer/SerializerUtilsTest.java @@ -52,7 +52,7 @@ public class SerializerUtilsTest { " description: Some description\n" + " operationId: pingOp\n" + " responses:\n" + - " 200:\n" + + " \"200\":\n" + " description: Ok\n" + "components:\n" + " schemas:\n" + @@ -178,7 +178,7 @@ public class SerializerUtilsTest { " description: Some description\n" + " operationId: pingOp\n" + " responses:\n" + - " 200:\n" + + " \"200\":\n" + " description: Ok\n"; assertEquals(content, expected); } diff --git a/pom.xml b/pom.xml index b370f12d3d..5ff033ed37 100644 --- a/pom.xml +++ b/pom.xml @@ -1401,9 +1401,9 @@ 1.8 1.8 - 2.0.10 + 2.1.1 io.swagger.parser.v3 - 2.0.16 + 2.0.17 2.11.1 3.3.1 2.4 From 50f7e14a9974cce15aaaaf5b3c4c48f079613b38 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 14 Jan 2020 23:07:37 +0800 Subject: [PATCH 54/82] update samples --- .../go-petstore/api/openapi.yaml | 112 +++++++++--------- .../go/go-petstore-withXml/api/openapi.yaml | 112 +++++++++--------- .../petstore/go/go-petstore/api/openapi.yaml | 112 +++++++++--------- .../petstore/haskell-http-client/openapi.yaml | 112 +++++++++--------- .../petstore/go/go-petstore/api/openapi.yaml | 106 ++++++++--------- .../petstore/go-api-server/api/openapi.yaml | 62 +++++----- .../go-gin-api-server/api/openapi.yaml | 62 +++++----- .../src/main/openapi/openapi.yaml | 112 +++++++++--------- .../jaxrs-spec/src/main/openapi/openapi.yaml | 112 +++++++++--------- .../output/multipart-v3/api/openapi.yaml | 2 +- .../output/openapi-v3/api/openapi.yaml | 46 +++---- .../output/ops-v3/api/openapi.yaml | 74 ++++++------ .../api/openapi.yaml | 96 +++++++-------- .../output/rust-server-test/api/openapi.yaml | 10 +- .../src/main/resources/openapi.yaml | 112 +++++++++--------- 15 files changed, 621 insertions(+), 621 deletions(-) diff --git a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml index b6d60ba045..02fbac6496 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -32,10 +32,10 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 405: + "405": content: {} description: Invalid input security: @@ -59,16 +59,16 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -100,7 +100,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -113,7 +113,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -141,7 +141,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -154,7 +154,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -180,10 +180,10 @@ paths: format: int64 type: integer responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid pet value security: @@ -205,7 +205,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -214,10 +214,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -247,7 +247,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -281,7 +281,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -299,7 +299,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -324,7 +324,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -333,7 +333,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -353,10 +353,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -377,7 +377,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -386,10 +386,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -471,7 +471,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -491,7 +491,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -519,10 +519,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -538,7 +538,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -547,10 +547,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -574,10 +574,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user @@ -596,7 +596,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -649,7 +649,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Someting wrong summary: Fake endpoint to test group parameters (optional) @@ -747,10 +747,10 @@ paths: - (xyz) type: string responses: - 400: + "400": content: {} description: Invalid request - 404: + "404": content: {} description: Not found summary: To test enum parameters @@ -767,7 +767,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -861,10 +861,10 @@ paths: - pattern_without_delimiter required: true responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found security: @@ -888,7 +888,7 @@ paths: description: Input number as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -909,7 +909,7 @@ paths: description: Input string as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -930,7 +930,7 @@ paths: description: Input boolean as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -951,7 +951,7 @@ paths: description: Input composite as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -979,7 +979,7 @@ paths: - param2 required: true responses: - 200: + "200": content: {} description: successful operation summary: test json serialization of form data @@ -998,7 +998,7 @@ paths: description: request body required: true responses: - 200: + "200": content: {} description: successful operation summary: test inline additionalProperties @@ -1021,7 +1021,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1054,7 +1054,7 @@ paths: description: XmlItem Body required: true responses: - 200: + "200": content: {} description: successful operation summary: creates an XmlItem @@ -1073,7 +1073,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -1095,7 +1095,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1149,7 +1149,7 @@ paths: type: array style: form responses: - 200: + "200": content: {} description: Success tags: @@ -1181,7 +1181,7 @@ paths: - requiredFile required: true responses: - 200: + "200": content: application/json: schema: @@ -1389,7 +1389,7 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: @@ -1397,7 +1397,7 @@ components: type: object xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1666,7 +1666,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml index b6d60ba045..02fbac6496 100644 --- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml @@ -32,10 +32,10 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 405: + "405": content: {} description: Invalid input security: @@ -59,16 +59,16 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -100,7 +100,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -113,7 +113,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -141,7 +141,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -154,7 +154,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -180,10 +180,10 @@ paths: format: int64 type: integer responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid pet value security: @@ -205,7 +205,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -214,10 +214,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -247,7 +247,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -281,7 +281,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -299,7 +299,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -324,7 +324,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -333,7 +333,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -353,10 +353,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -377,7 +377,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -386,10 +386,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -471,7 +471,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -491,7 +491,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -519,10 +519,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -538,7 +538,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -547,10 +547,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -574,10 +574,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user @@ -596,7 +596,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -649,7 +649,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Someting wrong summary: Fake endpoint to test group parameters (optional) @@ -747,10 +747,10 @@ paths: - (xyz) type: string responses: - 400: + "400": content: {} description: Invalid request - 404: + "404": content: {} description: Not found summary: To test enum parameters @@ -767,7 +767,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -861,10 +861,10 @@ paths: - pattern_without_delimiter required: true responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found security: @@ -888,7 +888,7 @@ paths: description: Input number as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -909,7 +909,7 @@ paths: description: Input string as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -930,7 +930,7 @@ paths: description: Input boolean as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -951,7 +951,7 @@ paths: description: Input composite as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -979,7 +979,7 @@ paths: - param2 required: true responses: - 200: + "200": content: {} description: successful operation summary: test json serialization of form data @@ -998,7 +998,7 @@ paths: description: request body required: true responses: - 200: + "200": content: {} description: successful operation summary: test inline additionalProperties @@ -1021,7 +1021,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1054,7 +1054,7 @@ paths: description: XmlItem Body required: true responses: - 200: + "200": content: {} description: successful operation summary: creates an XmlItem @@ -1073,7 +1073,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -1095,7 +1095,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1149,7 +1149,7 @@ paths: type: array style: form responses: - 200: + "200": content: {} description: Success tags: @@ -1181,7 +1181,7 @@ paths: - requiredFile required: true responses: - 200: + "200": content: application/json: schema: @@ -1389,7 +1389,7 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: @@ -1397,7 +1397,7 @@ components: type: object xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1666,7 +1666,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index b6d60ba045..02fbac6496 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -32,10 +32,10 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 405: + "405": content: {} description: Invalid input security: @@ -59,16 +59,16 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -100,7 +100,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -113,7 +113,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -141,7 +141,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -154,7 +154,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -180,10 +180,10 @@ paths: format: int64 type: integer responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid pet value security: @@ -205,7 +205,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -214,10 +214,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -247,7 +247,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -281,7 +281,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -299,7 +299,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -324,7 +324,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -333,7 +333,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -353,10 +353,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -377,7 +377,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -386,10 +386,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -471,7 +471,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -491,7 +491,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -519,10 +519,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -538,7 +538,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -547,10 +547,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -574,10 +574,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user @@ -596,7 +596,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -649,7 +649,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Someting wrong summary: Fake endpoint to test group parameters (optional) @@ -747,10 +747,10 @@ paths: - (xyz) type: string responses: - 400: + "400": content: {} description: Invalid request - 404: + "404": content: {} description: Not found summary: To test enum parameters @@ -767,7 +767,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -861,10 +861,10 @@ paths: - pattern_without_delimiter required: true responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found security: @@ -888,7 +888,7 @@ paths: description: Input number as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -909,7 +909,7 @@ paths: description: Input string as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -930,7 +930,7 @@ paths: description: Input boolean as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -951,7 +951,7 @@ paths: description: Input composite as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -979,7 +979,7 @@ paths: - param2 required: true responses: - 200: + "200": content: {} description: successful operation summary: test json serialization of form data @@ -998,7 +998,7 @@ paths: description: request body required: true responses: - 200: + "200": content: {} description: successful operation summary: test inline additionalProperties @@ -1021,7 +1021,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1054,7 +1054,7 @@ paths: description: XmlItem Body required: true responses: - 200: + "200": content: {} description: successful operation summary: creates an XmlItem @@ -1073,7 +1073,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -1095,7 +1095,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1149,7 +1149,7 @@ paths: type: array style: form responses: - 200: + "200": content: {} description: Success tags: @@ -1181,7 +1181,7 @@ paths: - requiredFile required: true responses: - 200: + "200": content: application/json: schema: @@ -1389,7 +1389,7 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: @@ -1397,7 +1397,7 @@ components: type: object xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1666,7 +1666,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index b6d60ba045..02fbac6496 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -32,10 +32,10 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 405: + "405": content: {} description: Invalid input security: @@ -59,16 +59,16 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -100,7 +100,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -113,7 +113,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -141,7 +141,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -154,7 +154,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -180,10 +180,10 @@ paths: format: int64 type: integer responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid pet value security: @@ -205,7 +205,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -214,10 +214,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -247,7 +247,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -281,7 +281,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -299,7 +299,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -324,7 +324,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -333,7 +333,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -353,10 +353,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -377,7 +377,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -386,10 +386,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -471,7 +471,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -491,7 +491,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -519,10 +519,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -538,7 +538,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -547,10 +547,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -574,10 +574,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user @@ -596,7 +596,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -649,7 +649,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Someting wrong summary: Fake endpoint to test group parameters (optional) @@ -747,10 +747,10 @@ paths: - (xyz) type: string responses: - 400: + "400": content: {} description: Invalid request - 404: + "404": content: {} description: Not found summary: To test enum parameters @@ -767,7 +767,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -861,10 +861,10 @@ paths: - pattern_without_delimiter required: true responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found security: @@ -888,7 +888,7 @@ paths: description: Input number as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -909,7 +909,7 @@ paths: description: Input string as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -930,7 +930,7 @@ paths: description: Input boolean as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -951,7 +951,7 @@ paths: description: Input composite as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -979,7 +979,7 @@ paths: - param2 required: true responses: - 200: + "200": content: {} description: successful operation summary: test json serialization of form data @@ -998,7 +998,7 @@ paths: description: request body required: true responses: - 200: + "200": content: {} description: successful operation summary: test inline additionalProperties @@ -1021,7 +1021,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1054,7 +1054,7 @@ paths: description: XmlItem Body required: true responses: - 200: + "200": content: {} description: successful operation summary: creates an XmlItem @@ -1073,7 +1073,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -1095,7 +1095,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1149,7 +1149,7 @@ paths: type: array style: form responses: - 200: + "200": content: {} description: Success tags: @@ -1181,7 +1181,7 @@ paths: - requiredFile required: true responses: - 200: + "200": content: application/json: schema: @@ -1389,7 +1389,7 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: @@ -1397,7 +1397,7 @@ components: type: object xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1666,7 +1666,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index c5e930efc5..a138e08ef9 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -54,7 +54,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - 405: + "405": description: Invalid input security: - petstore_auth: @@ -68,11 +68,11 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Pet not found - 405: + "405": description: Validation exception security: - petstore_auth: @@ -105,7 +105,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -118,7 +118,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": description: Invalid status value security: - petstore_auth: @@ -145,7 +145,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -158,7 +158,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": description: Invalid tag value security: - petstore_auth: @@ -188,7 +188,7 @@ paths: type: integer style: simple responses: - 400: + "400": description: Invalid pet value security: - petstore_auth: @@ -211,7 +211,7 @@ paths: type: integer style: simple responses: - 200: + "200": content: application/xml: schema: @@ -220,9 +220,9 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Pet not found security: - api_key: [] @@ -255,7 +255,7 @@ paths: type: string type: object responses: - 405: + "405": description: Invalid input security: - petstore_auth: @@ -292,7 +292,7 @@ paths: type: string type: object responses: - 200: + "200": content: application/json: schema: @@ -310,7 +310,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -335,7 +335,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -344,7 +344,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": description: Invalid Order summary: Place an order for a pet tags: @@ -364,9 +364,9 @@ paths: type: string style: simple responses: - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Order not found summary: Delete purchase order by ID tags: @@ -388,7 +388,7 @@ paths: type: integer style: simple responses: - 200: + "200": content: application/xml: schema: @@ -397,9 +397,9 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Order not found summary: Find purchase order by ID tags: @@ -464,7 +464,7 @@ paths: type: string style: form responses: - 200: + "200": content: application/xml: schema: @@ -488,7 +488,7 @@ paths: format: date-time type: string style: simple - 400: + "400": description: Invalid username/password supplied summary: Logs user into the system tags: @@ -516,9 +516,9 @@ paths: type: string style: simple responses: - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found summary: Delete user tags: @@ -535,7 +535,7 @@ paths: type: string style: simple responses: - 200: + "200": content: application/xml: schema: @@ -544,9 +544,9 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found summary: Get user by user name tags: @@ -571,9 +571,9 @@ paths: description: Updated user object required: true responses: - 400: + "400": description: Invalid user supplied - 404: + "404": description: User not found summary: Updated user tags: @@ -585,7 +585,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -652,7 +652,7 @@ paths: type: integer style: form responses: - 400: + "400": description: Someting wrong security: - bearer_test: [] @@ -767,9 +767,9 @@ paths: type: string type: object responses: - 400: + "400": description: Invalid request - 404: + "404": description: Not found summary: To test enum parameters tags: @@ -780,7 +780,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -873,9 +873,9 @@ paths: - pattern_without_delimiter type: object responses: - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found security: - http_basic_test: [] @@ -897,7 +897,7 @@ paths: $ref: '#/components/schemas/OuterNumber' description: Input number as post body responses: - 200: + "200": content: '*/*': schema: @@ -916,7 +916,7 @@ paths: $ref: '#/components/schemas/OuterString' description: Input string as post body responses: - 200: + "200": content: '*/*': schema: @@ -935,7 +935,7 @@ paths: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body responses: - 200: + "200": content: '*/*': schema: @@ -954,7 +954,7 @@ paths: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body responses: - 200: + "200": content: '*/*': schema: @@ -982,7 +982,7 @@ paths: - param2 type: object responses: - 200: + "200": description: successful operation summary: test json serialization of form data tags: @@ -1000,7 +1000,7 @@ paths: description: request body required: true responses: - 200: + "200": description: successful operation summary: test inline additionalProperties tags: @@ -1023,7 +1023,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": description: Success tags: - fake @@ -1034,7 +1034,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -1055,7 +1055,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": description: Success tags: - fake @@ -1110,7 +1110,7 @@ paths: type: array style: form responses: - 200: + "200": description: Success tags: - fake @@ -1144,7 +1144,7 @@ paths: - requiredFile type: object responses: - 200: + "200": content: application/json: schema: @@ -1160,7 +1160,7 @@ paths: /fake/health: get: responses: - 200: + "200": content: application/json: schema: @@ -1423,14 +1423,14 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: - name xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1608,7 +1608,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: diff --git a/samples/server/petstore/go-api-server/api/openapi.yaml b/samples/server/petstore/go-api-server/api/openapi.yaml index a088e6e6c4..e12f7f2a85 100644 --- a/samples/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-api-server/api/openapi.yaml @@ -31,7 +31,7 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 405: + "405": content: {} description: Invalid input security: @@ -55,13 +55,13 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -93,7 +93,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -106,7 +106,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -134,7 +134,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -147,7 +147,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -173,7 +173,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Invalid pet value security: @@ -195,7 +195,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -204,10 +204,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -237,7 +237,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -271,7 +271,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -289,7 +289,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -314,7 +314,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -323,7 +323,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -343,10 +343,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -367,7 +367,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -376,10 +376,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -461,7 +461,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -481,7 +481,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -509,10 +509,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -528,7 +528,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -537,10 +537,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -564,10 +564,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user diff --git a/samples/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/server/petstore/go-gin-api-server/api/openapi.yaml index a088e6e6c4..e12f7f2a85 100644 --- a/samples/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-gin-api-server/api/openapi.yaml @@ -31,7 +31,7 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 405: + "405": content: {} description: Invalid input security: @@ -55,13 +55,13 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -93,7 +93,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -106,7 +106,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -134,7 +134,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -147,7 +147,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -173,7 +173,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Invalid pet value security: @@ -195,7 +195,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -204,10 +204,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -237,7 +237,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -271,7 +271,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -289,7 +289,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -314,7 +314,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -323,7 +323,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -343,10 +343,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -367,7 +367,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -376,10 +376,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -461,7 +461,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -481,7 +481,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -509,10 +509,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -528,7 +528,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -537,10 +537,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -564,10 +564,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 22e83bdeb0..464a6a7052 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -32,10 +32,10 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 405: + "405": content: {} description: Invalid input security: @@ -63,16 +63,16 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -108,7 +108,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -121,7 +121,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -152,7 +152,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -165,7 +165,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -194,10 +194,10 @@ paths: format: int64 type: integer responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid pet value security: @@ -222,7 +222,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -231,10 +231,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -267,7 +267,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -305,7 +305,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -327,7 +327,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -355,7 +355,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -364,7 +364,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -388,10 +388,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -415,7 +415,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -424,10 +424,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -524,7 +524,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -544,7 +544,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -578,10 +578,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -600,7 +600,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -609,10 +609,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -639,10 +639,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user @@ -665,7 +665,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -722,7 +722,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Someting wrong summary: Fake endpoint to test group parameters (optional) @@ -823,10 +823,10 @@ paths: - (xyz) type: string responses: - 400: + "400": content: {} description: Invalid request - 404: + "404": content: {} description: Not found summary: To test enum parameters @@ -847,7 +847,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -945,10 +945,10 @@ paths: - pattern_without_delimiter required: true responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found security: @@ -976,7 +976,7 @@ paths: description: Input number as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1001,7 +1001,7 @@ paths: description: Input string as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1026,7 +1026,7 @@ paths: description: Input boolean as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1051,7 +1051,7 @@ paths: description: Input composite as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1083,7 +1083,7 @@ paths: - param2 required: true responses: - 200: + "200": content: {} description: successful operation summary: test json serialization of form data @@ -1106,7 +1106,7 @@ paths: description: request body required: true responses: - 200: + "200": content: {} description: successful operation summary: test inline additionalProperties @@ -1133,7 +1133,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1170,7 +1170,7 @@ paths: description: XmlItem Body required: true responses: - 200: + "200": content: {} description: successful operation summary: creates an XmlItem @@ -1193,7 +1193,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -1219,7 +1219,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1277,7 +1277,7 @@ paths: type: array style: form responses: - 200: + "200": content: {} description: Success tags: @@ -1312,7 +1312,7 @@ paths: - requiredFile required: true responses: - 200: + "200": content: application/json: schema: @@ -1524,7 +1524,7 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: @@ -1532,7 +1532,7 @@ components: type: object xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1801,7 +1801,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 22e83bdeb0..464a6a7052 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -32,10 +32,10 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 405: + "405": content: {} description: Invalid input security: @@ -63,16 +63,16 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -108,7 +108,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -121,7 +121,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -152,7 +152,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -165,7 +165,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -194,10 +194,10 @@ paths: format: int64 type: integer responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid pet value security: @@ -222,7 +222,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -231,10 +231,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -267,7 +267,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -305,7 +305,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -327,7 +327,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -355,7 +355,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -364,7 +364,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -388,10 +388,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -415,7 +415,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -424,10 +424,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -524,7 +524,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -544,7 +544,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -578,10 +578,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -600,7 +600,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -609,10 +609,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -639,10 +639,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user @@ -665,7 +665,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -722,7 +722,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Someting wrong summary: Fake endpoint to test group parameters (optional) @@ -823,10 +823,10 @@ paths: - (xyz) type: string responses: - 400: + "400": content: {} description: Invalid request - 404: + "404": content: {} description: Not found summary: To test enum parameters @@ -847,7 +847,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -945,10 +945,10 @@ paths: - pattern_without_delimiter required: true responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found security: @@ -976,7 +976,7 @@ paths: description: Input number as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1001,7 +1001,7 @@ paths: description: Input string as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1026,7 +1026,7 @@ paths: description: Input boolean as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1051,7 +1051,7 @@ paths: description: Input composite as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1083,7 +1083,7 @@ paths: - param2 required: true responses: - 200: + "200": content: {} description: successful operation summary: test json serialization of form data @@ -1106,7 +1106,7 @@ paths: description: request body required: true responses: - 200: + "200": content: {} description: successful operation summary: test inline additionalProperties @@ -1133,7 +1133,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1170,7 +1170,7 @@ paths: description: XmlItem Body required: true responses: - 200: + "200": content: {} description: successful operation summary: creates an XmlItem @@ -1193,7 +1193,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -1219,7 +1219,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1277,7 +1277,7 @@ paths: type: array style: form responses: - 200: + "200": content: {} description: Success tags: @@ -1312,7 +1312,7 @@ paths: - requiredFile required: true responses: - 200: + "200": content: application/json: schema: @@ -1524,7 +1524,7 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: @@ -1532,7 +1532,7 @@ components: type: object xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1801,7 +1801,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: diff --git a/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml index 654962a5eb..a05b882da1 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/multipart-v3/api/openapi.yaml @@ -15,7 +15,7 @@ paths: $ref: '#/components/schemas/multipart_request' required: true responses: - 201: + "201": description: OK components: schemas: diff --git a/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml index 8181f26db0..bea64a165c 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/openapi-v3/api/openapi.yaml @@ -14,9 +14,9 @@ paths: schema: $ref: '#/components/schemas/xml_array' responses: - 201: + "201": description: OK - 400: + "400": description: Bad Request summary: Post an array put: @@ -26,51 +26,51 @@ paths: schema: $ref: '#/components/schemas/xml_object' responses: - 201: + "201": description: OK - 400: + "400": description: Bad Request /multiget: get: responses: - 200: + "200": content: application/json: schema: $ref: '#/components/schemas/anotherXmlObject' description: JSON rsp - 201: + "201": content: application/xml: schema: $ref: '#/components/schemas/inline_response_201' description: XML rsp - 202: + "202": content: application/octet-stream: schema: format: binary type: string description: octet rsp - 203: + "203": content: text/plain: schema: type: string description: string rsp - 204: + "204": content: application/json: schema: $ref: '#/components/schemas/anotherXmlObject' description: Duplicate Response long text. One. - 205: + "205": content: application/json: schema: $ref: '#/components/schemas/anotherXmlObject' description: Duplicate Response long text. Two. - 206: + "206": content: application/json: schema: @@ -85,9 +85,9 @@ paths: schema: $ref: '#/components/schemas/anotherXmlObject' responses: - 201: + "201": description: OK - 400: + "400": description: Bad Request put: requestBody: @@ -96,9 +96,9 @@ paths: schema: $ref: '#/components/schemas/anotherXmlArray' responses: - 201: + "201": description: OK - 400: + "400": description: Bad Request /xml_extra: post: @@ -108,14 +108,14 @@ paths: schema: $ref: '#/components/schemas/duplicate_xml_object' responses: - 201: + "201": description: OK - 400: + "400": description: Bad Request /uuid: get: responses: - 200: + "200": content: application/json: schema: @@ -131,12 +131,12 @@ paths: type: string required: true responses: - 200: + "200": description: OK /readonly_auth_scheme: get: responses: - 200: + "200": description: Check that limiting to a single required auth scheme works security: - authScheme: @@ -144,7 +144,7 @@ paths: /multiple_auth_scheme: get: responses: - 200: + "200": description: Check that limiting to multiple required auth schemes works security: - authScheme: @@ -153,7 +153,7 @@ paths: /responses_with_headers: get: responses: - 200: + "200": content: application/json: schema: @@ -165,7 +165,7 @@ paths: schema: type: String style: simple - 412: + "412": description: Precondition Failed headers: Further-Info: diff --git a/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml index 05f79c3e86..c0129798aa 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/ops-v3/api/openapi.yaml @@ -8,187 +8,187 @@ paths: /op1: get: responses: - 200: + "200": description: OK /op2: get: responses: - 200: + "200": description: OK /op3: get: responses: - 200: + "200": description: OK /op4: get: responses: - 200: + "200": description: OK /op5: get: responses: - 200: + "200": description: OK /op6: get: responses: - 200: + "200": description: OK /op7: get: responses: - 200: + "200": description: OK /op8: get: responses: - 200: + "200": description: OK /op9: get: responses: - 200: + "200": description: OK /op10: get: responses: - 200: + "200": description: OK /op11: get: responses: - 200: + "200": description: OK /op12: get: responses: - 200: + "200": description: OK /op13: get: responses: - 200: + "200": description: OK /op14: get: responses: - 200: + "200": description: OK /op15: get: responses: - 200: + "200": description: OK /op16: get: responses: - 200: + "200": description: OK /op17: get: responses: - 200: + "200": description: OK /op18: get: responses: - 200: + "200": description: OK /op19: get: responses: - 200: + "200": description: OK /op20: get: responses: - 200: + "200": description: OK /op21: get: responses: - 200: + "200": description: OK /op22: get: responses: - 200: + "200": description: OK /op23: get: responses: - 200: + "200": description: OK /op24: get: responses: - 200: + "200": description: OK /op25: get: responses: - 200: + "200": description: OK /op26: get: responses: - 200: + "200": description: OK /op27: get: responses: - 200: + "200": description: OK /op28: get: responses: - 200: + "200": description: OK /op29: get: responses: - 200: + "200": description: OK /op30: get: responses: - 200: + "200": description: OK /op31: get: responses: - 200: + "200": description: OK /op32: get: responses: - 200: + "200": description: OK /op33: get: responses: - 200: + "200": description: OK /op34: get: responses: - 200: + "200": description: OK /op35: get: responses: - 200: + "200": description: OK /op36: get: responses: - 200: + "200": description: OK /op37: get: responses: - 200: + "200": description: OK components: schemas: {} diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index a968cf4fda..b7cf57122c 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -32,7 +32,7 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 405: + "405": content: {} description: Invalid input security: @@ -56,13 +56,13 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -94,7 +94,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -107,7 +107,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -135,7 +135,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -148,7 +148,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -174,7 +174,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Invalid pet value security: @@ -196,7 +196,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -205,10 +205,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -238,7 +238,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -272,7 +272,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -290,7 +290,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -315,7 +315,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -324,7 +324,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -344,10 +344,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -368,7 +368,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -377,10 +377,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -462,7 +462,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -482,7 +482,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -510,10 +510,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -529,7 +529,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -538,10 +538,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -565,10 +565,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user @@ -587,7 +587,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -682,10 +682,10 @@ paths: - (xyz) type: string responses: - 400: + "400": content: {} description: Invalid request - 404: + "404": content: {} description: Not found summary: To test enum parameters @@ -702,7 +702,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -796,10 +796,10 @@ paths: - pattern_without_delimiter required: true responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found security: @@ -823,7 +823,7 @@ paths: description: Input number as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -844,7 +844,7 @@ paths: description: Input string as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -865,7 +865,7 @@ paths: description: Input boolean as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -886,7 +886,7 @@ paths: description: Input composite as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -914,7 +914,7 @@ paths: - param2 required: true responses: - 200: + "200": content: {} description: successful operation summary: test json serialization of form data @@ -933,7 +933,7 @@ paths: description: request body required: true responses: - 200: + "200": content: {} description: successful operation summary: test inline additionalProperties @@ -956,7 +956,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -974,7 +974,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -1176,7 +1176,7 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: @@ -1184,7 +1184,7 @@ components: type: object xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1349,7 +1349,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: diff --git a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml index f74c8f90cc..5faa8adebc 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml @@ -9,7 +9,7 @@ paths: /dummy: get: responses: - 200: + "200": content: {} description: Success summary: A dummy endpoint to make the spec valid. @@ -29,7 +29,7 @@ paths: type: object required: true responses: - 200: + "200": content: {} description: Success x-codegen-request-body-name: nested_response @@ -42,7 +42,7 @@ paths: type: string required: true responses: - 200: + "200": content: text/html: schema: @@ -53,7 +53,7 @@ paths: /file_response: get: responses: - 200: + "200": content: application/json: schema: @@ -64,7 +64,7 @@ paths: /raw_json: get: responses: - 200: + "200": content: '*/*': schema: diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 22e83bdeb0..464a6a7052 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -32,10 +32,10 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 405: + "405": content: {} description: Invalid input security: @@ -63,16 +63,16 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -108,7 +108,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -121,7 +121,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -152,7 +152,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -165,7 +165,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -194,10 +194,10 @@ paths: format: int64 type: integer responses: - 200: + "200": content: {} description: successful operation - 400: + "400": content: {} description: Invalid pet value security: @@ -222,7 +222,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -231,10 +231,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -267,7 +267,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -305,7 +305,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -327,7 +327,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -355,7 +355,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -364,7 +364,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -388,10 +388,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -415,7 +415,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -424,10 +424,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -524,7 +524,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -544,7 +544,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -578,10 +578,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -600,7 +600,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -609,10 +609,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -639,10 +639,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user @@ -665,7 +665,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -722,7 +722,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Someting wrong summary: Fake endpoint to test group parameters (optional) @@ -823,10 +823,10 @@ paths: - (xyz) type: string responses: - 400: + "400": content: {} description: Invalid request - 404: + "404": content: {} description: Not found summary: To test enum parameters @@ -847,7 +847,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -945,10 +945,10 @@ paths: - pattern_without_delimiter required: true responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found security: @@ -976,7 +976,7 @@ paths: description: Input number as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1001,7 +1001,7 @@ paths: description: Input string as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1026,7 +1026,7 @@ paths: description: Input boolean as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1051,7 +1051,7 @@ paths: description: Input composite as post body required: false responses: - 200: + "200": content: '*/*': schema: @@ -1083,7 +1083,7 @@ paths: - param2 required: true responses: - 200: + "200": content: {} description: successful operation summary: test json serialization of form data @@ -1106,7 +1106,7 @@ paths: description: request body required: true responses: - 200: + "200": content: {} description: successful operation summary: test inline additionalProperties @@ -1133,7 +1133,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1170,7 +1170,7 @@ paths: description: XmlItem Body required: true responses: - 200: + "200": content: {} description: successful operation summary: creates an XmlItem @@ -1193,7 +1193,7 @@ paths: description: client model required: true responses: - 200: + "200": content: application/json: schema: @@ -1219,7 +1219,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": content: {} description: Success tags: @@ -1277,7 +1277,7 @@ paths: type: array style: form responses: - 200: + "200": content: {} description: Success tags: @@ -1312,7 +1312,7 @@ paths: - requiredFile required: true responses: - 200: + "200": content: application/json: schema: @@ -1524,7 +1524,7 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: @@ -1532,7 +1532,7 @@ components: type: object xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1801,7 +1801,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: From fe8775a5a516d3a9330ffb3a2edcc34441aee36d Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Tue, 14 Jan 2020 22:39:04 -0800 Subject: [PATCH 55/82] fix php ordering issue for CodegenSecurity (#5001) --- .../languages/PhpSymfonyServerCodegen.java | 8 ++++++-- .../SymfonyBundle-php/Api/PetApiInterface.php | 18 +++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java index 890431b956..580e308f47 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java @@ -386,7 +386,7 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg operations.put("controllerName", toControllerName((String) operations.get("pathPrefix"))); operations.put("symfonyService", toSymfonyService((String) operations.get("pathPrefix"))); - HashSet authMethods = new HashSet<>(); + List authMethods = new ArrayList(); List operationList = (List) operations.get("operation"); for (CodegenOperation op : operationList) { @@ -431,7 +431,11 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg // Add operation's authentication methods to whole interface if (op.authMethods != null) { - authMethods.addAll(op.authMethods); + for (CodegenSecurity am : op.authMethods) { + if (!authMethods.contains(am)) { + authMethods.add(am); + } + } } } diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Api/PetApiInterface.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Api/PetApiInterface.php index 3d822e56f2..864fa5cd80 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Api/PetApiInterface.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Api/PetApiInterface.php @@ -43,15 +43,6 @@ use OpenAPI\Server\Model\Pet; interface PetApiInterface { - /** - * Sets authentication method api_key - * - * @param string $value Value of the api_key authentication method. - * - * @return void - */ - public function setapi_key($value); - /** * Sets authentication method petstore_auth * @@ -61,6 +52,15 @@ interface PetApiInterface */ public function setpetstore_auth($value); + /** + * Sets authentication method api_key + * + * @param string $value Value of the api_key authentication method. + * + * @return void + */ + public function setapi_key($value); + /** * Operation addPet * From 55c6c0385be708ef3652222674cfc577f72b2f3d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 15 Jan 2020 16:21:18 +0800 Subject: [PATCH 56/82] add k8s to the user list (#5002) --- README.md | 1 + website/dynamic/users.yml | 5 +++++ website/static/img/companies/kubernetes.png | Bin 0 -> 42001 bytes 3 files changed, 6 insertions(+) create mode 100644 website/static/img/companies/kubernetes.png diff --git a/README.md b/README.md index 6f61bf4377..2739162de3 100644 --- a/README.md +++ b/README.md @@ -604,6 +604,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [JustStar](https://www.juststarinfo.com) - [Klarna](https://www.klarna.com/) - [Kronsoft Development](https://www.kronsoft.ro/home/) +- [Kubernetes](https://kubernetes.io) - [Linode](https://www.linode.com/) - [Médiavision](https://www.mediavision.fr/) - [Metaswitch](https://www.metaswitch.com/) diff --git a/website/dynamic/users.yml b/website/dynamic/users.yml index 001e9c4699..225ec7fb49 100644 --- a/website/dynamic/users.yml +++ b/website/dynamic/users.yml @@ -188,6 +188,11 @@ image: "img/companies/kronsoft.png" infoLink: "https://www.kronsoft.ro/home/" pinned: false +- + caption: "Kubernetes" + image: "img/companies/kubernetes.png" + infoLink: "https://kubernetes.io/" + pinned: false - caption: "Médiavision" image: "img/companies/mediavision.jpeg" diff --git a/website/static/img/companies/kubernetes.png b/website/static/img/companies/kubernetes.png new file mode 100644 index 0000000000000000000000000000000000000000..0c17fb67a8dd66f388bc1ed572c8f65fb77650a1 GIT binary patch literal 42001 zcmc$FRaBf&mn8|o2?Pu75Fog_1$TFMcXtRDJV0;@?(QDk-QC@#aG9c#zo)0ynumEB z9;%A3uAP1M(F-B6(jp&Wv0%Z#z&?tJ3d)0leW(Bfd+!YW9{A)B(J>qt7>1OYfPk!+ zfB=E4y^XP%r4bmIYG9li4BM}jCEl@P#v9DXwll-ETdy@2zW_Qo-<)02{0creXJFJj`ZPvKwz zBHgmMk{|C@mbvdLQNX_Qvi{DeaN!^!R7H)J@E-V zYXFSTneOH)>Pv9f9S2x}qdf^TBv?3>BzkC6$nqa;I^(=f$WAtUa44&d>yO9vfnls} zsW|X@o=9LgrRB8D&|nY7iKF-;2;X@xPsi1X?KgBbQ)Du7y6)1k;1{4ryr z;bY)w-SVFry7Y+i>dHWRq+VX~my{SXO9%>gyvIxCRj*lhf}?FL^P7XGP%F8>MHRI#)bLfENZmEP2sB%CiEj&s}_?Ua4O-^ebYI;zvZk;q>%C_FmH&M<6)WEN}9|l0jlGKJ8}qa#+sO!W%^R zLM!-F-;18{6@_%M@G^5f)VKE!>xMRtu+W6SI5RB8J47EhoAGjnr+^b(r}+%Q{BW** zI0^IdjlPIK>tFSS-m~(FHi)K&L|F1_7Ytgky2^%rr$s<$){l+yx(WA>jRx)}bnG0pQL2(7(A-tdaxUt!fj&boe0n3BdX- z6})e4S1dz(Ga?C)Jip6<{dk!g)2(I(>+ZO&<()3ghlgIaj95BGg3Z&#L7?Ktc;a@h zR_VsKqFKk4%zTpI#H?e6FT=Ka%{%BqEw&OrwrPBVZ)d0P#UKvH?EOIOw<&n=n@LXj zTmi8RmYn(5gN?;&S5*49+sw5rsBwe+gl2NHX`j0;#F7q-k`BWqllJzsE=06c z`@IflxujI@*Rupmd3@7j|K)RVwKCg?G+^4u(RgcLtYJm}4u&2ZZrIjk8}BPAIa`np z{^~vW-3W1i)#MYb{pBH;Wh$}8(zHtO$kjXjlY7Jn&re`8ZeZs_ubF{95bLn-R)tGn z1yC-65-=fs4=L=an61Nt7F~b8dq?+&G8Fv$Js|Xzg@0W4#-aqf>-;=E)v}}+= zbzLRFZt^pTLSPa=;Xsh_!LWgk`kULrXo5@qhN$s}T8G((0AEMr^7zsrLWdat2lfNM z>JJ1Wew#Gs$n*|lauZZcw7|vSL7}+cMRE}Z($fypZ02|XIH}-WVTnxU@m*6^$4?x1X?`?< zDp@wa&$^1ukXr*fbXDo~F_c`Hn+(3ui6v?dn@Mu-(&QmB`l)s6SK_Erl(5WxJ_?KI zFxHjPr`2Doc%BzKM#T9TiJ0%p*x|NLWNX&&O_RC|Z7wRMw{#uzg2?q_3-u~~J5)w+ z`Jc7U+jX)F$`4<@WALY}3qlj-Acw*vz}&(R2b420F@0w`WV&HOO@3zTVNx;0n+TtJ z$|0Q;pTwGUpXi;$%Ph@mm3WM~p~S^aBTvIigVKUuL2ANk@^H*{fAOVOmk# zzT7FT>0Z8GN&XpKiNwE%GqOXrn8`vFVy4m=)2qX;c=o8!856#sCsC#xVa?I8e%FXu z^5YD72uR?Tf2(BbG#$>?7LsQ<2kQBKe`IO zK)-Ui9D}okON8l$O+|72Qb9!iWuGeXiz@A%`VWGfFR0{>ngs%;+KDpr>TGHa(ypo> zXtTZ`Q^}KD%5FCoBo-9!6Ha`Yz@&Gkcc>Js4x&L?#z zMT!}W>4?dV;g*M{K%)qqHY?;YtEp*n3~+3`hQn0H^h#n&;z+VnQ&yu~U|RUHFvc0+ z;(FY_c46B`%Wl+2*9hCFaw+Hrch7XMajAn!g4Pe43+qEMNs&yRN6tb?LoP-EK^{l( zks|h2X&fSj3we2AL6NKyO>v6~nleC+JNMyRgxZKSwaQ5}hx!U1w@|ClbAC{$aCk3s z1iKXGi0p{^2qrasDOf3NDU21rmClL7q5;Pf2M>pdQ?Db0qnFc=)7l}-!Tpiaq12JY ze(=7|^s6O-2_JKV-ua4bmu>lm7I98=pwOzDMLpVK(h}+tB16bS^~y2Iip3hU&=zn<2D8L0L@Y=wQgwf3 zmv0hJEI8?#$(xsMFg!RP)N&*;uL zn=zd4PtDKy9~&N~A4(n;AL1Wr9+Do@E>p;`W5W9Jp8-!%kL`%#2;|U-2-65u(5Wz! z2ppfUc~n^&=v?FVMJY0=0ulpLVeawFvDML<@OH73@gw1GVcIeI!=WSgmq(g8^;~pv z6b*&9ReuRjhZMLKk=8O`g|1?*;B>+3%r_hK7$EjW_8oM`^*;Y_39%8?75^c+ze?Ol zW-;cNCAJwzqKM31NUTP{&g|w{{<7-u_}k0-kwZQ}ep2DfZOUo6G-*yy9*xrt5;M=EtbH(NN3shz1an)at# zU6;XOh~@Y&T$fZbq~*utyQbX}9iA&shwt;gcYhBtnC-)gy22mhc{%AWL(vKp4>Spd z7OE67=uz$&Aq$kj<8D+()?|=1msR%(eN>z+Jj;KUxlK5T)8grJ__8;AsW!Nf>5#XF zH6%0yH)b%}mzGgvTj=V_fAUR=)Wk@7M_oy9MzvPJ$t1#DN{ZUWN*gzertb7vs64DS zA)JO;C%)0MEWMUz54Hi>W2Z|gqu76rs@#dGfLXJR#{PNw<7C9KaDko7mZyU4lxnqy z!g9m@cE+*+l@W7 z*ao@PUxYWMo)ZV>)9kV@PU|CWbfkWg@wA0`*K;KC2(c=$jj(DlX46ewu5NpsL5(5C z;uG_h4I6vvKR6y%-|ZbaxI3&|SzpD%O$P#K8+F**l)V%lW-CqW*_u$>YA(4Sq57f@ zGt7DMX_{$d%Dc<;Rl?>-X04yAo|vof+S>3ABmgTduml^S(C{DDCD6bePr-h=zawz9 z-f>%kfYIUkbiM=;6Uaj}xq(s(73as&K|n84(bE9kg2w+HQi4%pNoGz^r$=@`b!=Ml zn1EaF)Cg1GtBa-UCECExA;}^Fsv~TN_);cmd#$6i%gg&~$Cq+ODANA@; z#_t3P^Qoc2Xb>G{X^5W{t{+WnUTC8&q#rZAFowo)t=4 zO1amfAIC~B)V>-X7K493Xhy8V?=*xpqAdMM z*8?RTAGb_(!V5UP-o!jsi*$(DQQxzoe4^=A#4Gt)QdZWe_Sj&3w;3$Kdt|3FUlyt} zWo6rr=R{n5;i%x{uryMp!Cmj6k-mIj+PbLh&YJ6`65PwZ*;+W7a%+K~>YjK-o;h?@ zd5^MS{cyUFf18nZ7;?MrT z;&ImFIyyOp*>h2k?L4Q_NPe-{eR#}5q`>bo9?0m=Al|dzwV@jJnt61#4!Lf<%b&ii zp82JNb#&x|?E|q5Uj$|qqSw*V%d&2N!T*66OH3VdQK`x7fiQ@$msRrYM~0|QQiAHN zs>=NAypLUp9gUsWPWo2TCho@3UOTO=LWMlJ2%BWLxS~8f?G1m6M3yjvMktXL1u?M% z8E1XA%xRNn^tUP^wE^t~J|TW3zKDXlvKKW2!D@+Oxn@l=6;|yrk+n{~j-OM|de^IW zNdst8p4FxfWN>H_EJJ9;th2Y4=2llHF~{JzIJkhc?KB8Y(K6LJqxz^*V!V}fmzG19 zbO2A?(NCEw+L@?tH-KAcTi6=JDww())u6;c^PqtsIKhhJybwXbGU4anFX7r@LVZYE zfyhiZY^1_uXkY4&)5J3u#uC29=6U`3vT~;D*}EYSmt>{ZwXo)pgh+`~ITps|&emSG zK2hn?HwVWa_ABf}Iw&58irb;+-qB`ZI7w$Oafo!(LS-Jv(q3iUBATGv#?z)oiSD6L zK%`1m*{)Wx#eNHq{gwnuUeZ?HHg&|(XKHJg_ZkL^@~3%q`1@?GwAokV&%;m)hz|I; zryNgr=doQYjWQ1DMgW{csWXX_wMVYg@&dmV|7cqMpcrjD9G;sZ&zuc_|3rcfPlSJc zH%y1iWh{rn?vyv9$(qkY0awa(A>gXqZ6vUPHle*u!%(N{Dg82gWA7UFwx~<}rhN3| zf>n5**oA;MdvPL|E>hL*`2Fb@9{+W|E-6NFk93+;?X-6tnP0Q)pZHs@@_ZOK~ zCdR1NyZYW0b<>Mc46sm$6jB^0Vj?9GE-d3ha<&a94S0MVr>LP2{t815pv*5MF93>wAk?T_=9*_j@iW ztz#8-m9qKtar@EzUhIxKn)5jd;tujFWaf8Be+voR*yr2R<-PdLnl-{1o{<+{fum z3=VJz3Alv=7F_PM?d7`H^Lr=--$IDWH?zsk5=v5IxKC7^H;1>Xi+5o6z`u&qTq|Z4 z)tYZw93Am!$F$(c>v$NQCX08y9IZs)Na>BF)!$j?*R)vGnp>D9oHfi-IK3VU_=|K! zp)}p6-`wDwI=IttfI;#iv|_)UW3?b*t})AT2BwQWLGvgL$F?8R6h1p@Q?FvYmaaXr zzzRe7q6CA@-*NY4Li#R;f&Dmn=lgM#`(z)?RvrraodOuOGg$w($Fci&9U)}zeu5$X z{9yhEew4OrJ+%sY+MkB*-7JB#D5iZtRwjxp<2BakeGU@M4@E(4ebfP8Cca)`TEhHw zsu4J)P2R$bAysG6MVDEMJ#WaP-9(8WxK$@w*hH8YOK z!1NjVf#l%~z7k#{JVf%70!wt9D!)82fFZa-SB<6ut6I9!s7j*p*1p@;-nP#E-eJmC zXX|2J=u&(0DuD4jj~^Gm2H}^?y-p#b^sM(;3i{|h*`!P)gab5%o@O$x&Z9#&XQt7` zzi4IW^F`(C6=!8P6ap3drq!pTECNi;Eha1?Oy~By_YV&@t{<+kfxQP7%oPS}=0=l6 zqgewUQ+jiDt6JSw{jh3-T68B_hZ=h#PO@gy=DMa4*PmQ~Rw9>p55&7qo`C0={*jk8 z@R{#1-QI8h7% zJDTjCU&{&BjxjFpo;#m5eUZBqCXK$E2o1)4wfvf0Bw>-E`5sWDVuiJA^MRFgjmz$F zG3});7hzSp8j3z@l*fCvb(VOl{^~y3uUQ~R@3KF4V!`edrdF)g?Edx|UwatuzQv%- ztK(Q=k2SC-CU*z_hL@I#w#2+7_o=D5(Z@1^7YWY?<~OXQFD3N5$3J$mP#hiPckiMJ z*!v+veIvhp9GCdOC;CUt8*B6HCUt6`2H{k+RX^G2?2$+WL00{93>!(}cqHr~ zukW$FI~$)bwC|uksC`5F81p66ICVDZhCYo@i?a3eGcH@0SGVaH8|+@;QTG;!+N8oR zG~1P>F~BHW&%zjSTX)B`zcE-M*&?<1M_)X8-%>|?#u^_O@wsA!Y`==Cva3>#MvWwu z__FGEiOsNWgTkvx3WoHmWKNRp`JIc)VpxYz6mi;L_{Gc0tp&8~=hp8pw+F0F?dzgOcglF?7YkY=%`0d?F=O6ut*pb|qd@&=$ z(Nk&__Sc=xnWA~DQjXyszajK85}m82vPsc3CcCSL6L1&H#rd;HmuW|Nd{gdD=Z`#v zZcXid#WH)1{a{n;*@SxuvE|4*j8WRy4p=&A1?i3%#)$_HKiMtrlk84=Iv2_b!@jN| z@w&%LsQ7zRSV!?9>w=x^A`l=bu4Ar4c6RXFLM}sgoj;%lQ2kadc#kDGP7uBxx8~PP zcoJ>$Q%Cl5!B-|cDWUcbwvOTzNKRkkE$>Y@n8N_E!)ii_>1tEa1=?C zAKoM|lPLzoL5lQdT5UT$zELeq>InU9P2c+`X;=AY!-B%QKDAW3o;$(AM1P z8<}_w#LvY)}&P zB9Tyh??ly0eq+z&(b>k0AG^HnR1_m0HyG_qg6l-bz9o?-GCOk&(9G{r5{ZxE*wx_? zW|L;W_$^w*cDt=vcvQ$~lx1?c(Yp5Pc?&TzSY)1;+`U*B7MY-aC{(_!rDcBJ_VQaU z@4)oxiTZIV;p~$-_>%fk2=2REtg~#qd2T8%rVG_gnB3;e16M?oa<8?Hm!q*Yginw= z+HCN0I(V36Zca9a>wxL~&XgIueQM|TR|t$SUlQ_pq@qT-yw;vFpA2>_yUC8mW$J3U$mLMx*&-J(OduwU9tYN(F^9cox zY=LJngMo23wY?~zf?2);v$#JxqTD$;ve?@&H2C1#tf%oxXqCnNRCQF9lH@S3v7*s4w9z-Baka7qUOa$-ak+8;KUx_%>JhkF zSz0@AxN;MLMsNT>zdfcUA^;6>wBROEm69b8u(3BHV5VWBp(EmfB_JT+vNts5kQWsG zHy!vJH<78Mqb&z5t&58bjSC}kwWFRZwY3BB-$nkj zj-Zi)fxVfnqnV90!P~le`Zi9E+(blg8~xYM-*Y;e8UOE{tR4P|1r(6>?HgKp8amql zS{pc(>+LCrype;ArPJH;O4eqMJPcf*!TlNe zzq$cE1uBOJmW%ek6wL#RDD*WJ3@pS{OpssEb@6z`#AAAPvHoI@bEVr+lrV)Phb-s# z!`A!xO!O(3*2Hm-vzZ#-gVsRnKTK1SjJ>@qlc-V(BiYA>XBhhDt~p5)rlV_it^Fw& z5jhi;FV*p7fLCv*H*)3VzV=bPeE@q;`1b0{2mSU&@agT+3k*8o?e+irSAL(~PQgd; z;qC1c^t-pW58vKi!Tvvg_5TDHn+BV{W=n3#0t#NO=pp^U?aZe$6MrrpR96l}z)kXD zM%C8}J)MT*%%UU6Jy?*ue?Fqlu-URO=mxbbm7V)&VU@dF_H0}|qg#^)@iTk?fgvi@ z=38m#vHz^C&%}P70azdy%LC8+S>o{J9S9|P;WU*D9aPH{Yy;F1oihNc${E7Fe>V`n zH}Fh~i>C5QKh_O@E)nT?m}v`cu+@;gMuPi0H+4@gj>X%JAiH=(uEM)^0LjD}db)++ z^Lr3A*t*h07SHcrjFarbzXOWh;_1wces4DRCPDo@Sn|=1`D@Zk_x2x^ufz%%wW3Wb znf7RZb%%VoDV4kQK}SAI_t|__h&+)xsqq)(dl2(J=>+MeHc`FaRkI$*oyQ%j?YC>@ z+4}vRc$|OG+u?9ICxD9%ailVwd2|Fbie{PVYrN}BnvDz*whlutZYe;=I>~R!D+!aO(`ZurkGwQS z7`+3<_PZFgFy~G)7Dcc2Nu8yC5ndLUiV)b_wh2Ok$Sx|WT%F2gsQ(Bueo?DX^J5OA zd&{4}iF4Br&H=aM5NdM^6L=tya*}@nAw+%nT`pQvEuVqz8Y&}<8legeQk%RVZ$bH2 zgx0xOa#IbjX&EXGR9KN8fgu0!r%*7X&DNsA3o%Pqvq(V34siMt)ldW|B9MgZB+Rte znAqQ~?0E5C8u?6l&akol*z0p$zLlp3OOuCRjmafa&K;g5b;e*boi+0YK;FwguI zEyg9Gp2Y4sIp~`-(1;Bp1K)Q|S{0~~_++GkR5{}>_(1mQWZIj6nCr{dq?vb3bsgJ* zqiW1Un@GJvMfQ)=&1p1o)xGWmTBGIK3eU#YdyxsKb!YM5bK(u^+<;^suusI0)o)rK>33TrSX}?s8 zcxhu87+{2cjdMvP)-asc2yc0S;PM?>aWD8h9G#35P>?_gvevKViuaL!74$8^hO#yP zL5yb_yGRW^Q@76X>K%~1Z}Fj?P2sCa)K!dg!G7_a;_D7W;28o4u|n~=2x9c@GZAEn zLJUfe)LX~GVHKFSIlhWnK+FpJ6a2Xau?F3}SSLO9zn2^xn7 z4&lR6NkW@spX>F zv656#?RIk41F@*~!ooi_Rk&EeM`mKfmhIbL9R6Uo#8euJoS$%I>2A$@k>PTCuBB$W zO^r?2vyI0pM*x|&-zUyR@HcY)V~}c^}&2aDz%YN_DHV|gqiQ1$DJf@ ztKi_iII5ZbN^!V(JHVk{X;ev}SSS+cL)XnBdRb9HNHvgq2)y0mFrPcc!Ncu*IbA+;|qFf&FWu`0(D`Hk@M$9!xnVeL@glUeVx>j&6cDZ;XBJ z*=B1-q@V+M%i(Q%H&xOeJVFtIi5dPf?&qrKJA;GBan5_ej)uAQK)?NRiB)*_rry@o zGt#mJT-bnlptl0j?5DT3D}X)4->Mk}0tJAu#Afp=L3l3W_OaTQl^@{ze`rq>QORj> zdd4q)A;7QuG%20b^}AedWGGhJRNVUi(B8UsR8dW(L~eN52jA`KnMXORIPcA-!A5cM z+J2-jrSOWgrd*UD>o1c(n&_jBO*UfKmoYx!LYc94wLlPIQyB;k)Cw%L_?{KD@a@fq z@EtP38=S1#rr@liNqSSyqbX%iP+%`O5Z%v|1vhM|CPG2KAw&>3<9_`_!2@}VP*_>) zKcQLc2RHA~Nx^KJx1GBN4;q5DQZCDT+}Hivzi5t%A{p*>>jOhe^-YzJ@{k6|UVMMa zyNj5u`7`a89C9^Xq>(YLn6Aab?UfwPOHh?7x)p&8Uf!SG)ha`zz*e(%5Dl$18W3Eo zeUoad?=`Mc;?19e`F3jGtr<5br;BOXVTP6iHU-@UkXt$MBr{fvja5N_Ns2?I}4Wu)r$(9DMA@zov>!paj=lgC2Ap98>(s*VEfQLsN( zDr@lEgapGFK8SHKXv6Us$($`!c}(n|obh&cTG(5Rt>Dj}K-iI}^{pQB?T?$M6MNEk zCMfKuv@=dm4{_*eogZazpLp2Y;ig{oRbdl?I9K>Jy&61|80e}quT0OzNhiN+Wonsh z!@2w#`|CdlFn`|b_47-Pi8 zM6z-YG*=NC#1d`{9+kW=_9>UT-Q=z1);u&(8Yp+(IM1T7YAUB+xdK6&5Mwlh@R%j7 z(=p|>n-2X`7kjyqUzEqG?_6*h*tXZgW#)B$6y4&SxUb&I*{uK#@(N68!7=ZU<<_FE zXy(z{97Q6?N41DdF?!ST4+p_FT9RJEsmj!eie4poWq>ggXr1<={Ht zZUSsn3XEsPOFgpH$3r7Uh7J3L!q37lWQY)n{ti#2h{KHT%U(S@OHxK{a_0ruuk&)3 z%qpM4RVOof1J08MtN)(l16-efDvjgX~Q8w=3#ii-kY`)A8VuA$H#stuyQ-;cRl#9J& z>~8ALW3jkPt?@DpOL(#FJ=rS9gC6WFg8TlBwdPjDWn(*K`!nU!#^i3KJD&9?fArLM zkwqu9ol$XXV(R8|D0y$>lyp?!$yK-aRgT(HC!9;*7aM42r|psk5q%GLkj(m49G~o` z6WN-_UzenW%IYco^RVaeiVT$5t@FF%8#|A!Hq80AXcz(wv-btJx8C>lbl$pq%;JZ% zoVO;=+i=NyjKttL6_C*kEsMU{rf&ci%NRc=tmF!+V$Ga%Olo7M=XPSt#ns@SF7vGQ z;+&tAo;nRu=?b3-Ze%+7q8n5Emx1B6pcv+r)Q)OrmHSYr-aY_DlVpmKNxjJf^$L9Oq>uqBNo?c zSEHb>qaVXE1E5W;;5fI#Dx7T+u^~ZRCwRr%`L+89CH^Z9&$CqJ)mU=bC5K!Uwcv9S zMveGPI6#D`)PBpGI6`geE~VhL#=KqOyd?F1KaCVE_C<8Lj5ZjHQ&D5aB z>bl+r`O_N|fDZWaSU{SHhmFcPiwcf+(9ej%l&z{MffvbkS_}jCGtM!7Y-D9F6HXKm zt)8eCPJiRhw_$E6)nbTT)#DYP-PSUqL~7!li%TbAzzc^z#w`xWGw-(2jIPQ{YpV=p zm}UM@;F(^%vR}$LZt=M^zVoWot}^GhSkbZ_b;-O_49G_T>GjlI%4t0Q+8DPntNTgK znrD{dx{?sZ*bt@|A>bo%Qpdp7+*n-UQIueB3G5SH#~c^gjW&f(a@9up_8Nmqf6`$} z15d++YtFSF*3zMP^Rio!bKL>jxOMwo>4&>}PJze=B1uc}J}po<)z>plzj4dT?(N9< zc-3~^v)Z;Zi&C3iTbq4y*$s{!m!lae+s)>qq1D3qi+3s`dgXkhl#5XpkY@4-4Osp3wHgYhtfXv=n@u|J`dyp)$BK9%()h_vRTOVSB`Ll|)|5h%*{3+y(6=VP9BvyO(NuHSet@(YX}) z0F|{L=U12_VB8sHb>!yLuUg3~|2oFeZp|a>CJ&0s7E750y|b~Geg3UC>3-()y-_~ple>{st$U)Zc)j#xi7+=Op7g{L zs#Ro$t@R@l#e-yBEfg+YHuLzqVt=(1HcVg0%JX7?tCikxBTAB`Dh{3e(s$%}A>p5J z`ZX!m^TtN#CxvKbo1B`O$t&zeJwqVO(RZcqpYx|ojXPtSl^IQhN_i{`e}&dR;J5n@ z1FmvF1~X4fggsInfQn0+GGi2T_8>r3mRJ0_23R~^z;!j@84#d?U$`4xudJqLp;Upd zIWr;_?hEETr!9iv4{5Nl>Qh~h6>PNP`;Y5x~-M=4P<=v zq&b8L1Gjsv*lJNms1kU+J7t*UP*L@wi@7fBd5bn+DS(ty zmp} z9bb=8(Pd7j5r)9~=5Oln^R32Kl-G_VF>neNmFKNfs4a7pf z%2ri)F%tK^ID5-$Yus(evjod?k6C4qa|8pDIAvy7+_E&z4jJc+($zsoEQM=*ZFJhV zoK3&7!{l8^*My;}+&sHJb*l8NgZjmwHOo!qV`R~hyu11@*8Zs%ZH^dxDFda~e$TOA(QS&;Vs0UKLoDKrp~J=o2RJTy9CEOt zo=c75Pe0~&jabfB+Lo#8H_u1Y=QM4egDb1Z09niU3M-wlXhMyq-dQ6BT)9R!Yg@ zce%#mNI5=vbIy94nR(K72N6dzC6SbPcidcqRBSPu*N5CJ)Dz;maX8?>oj;z@KL)sK z%(Zno(fj6ukl03w8u=P@SY&L7p4anr-+ymD9n=}n9r?WwbJRDIfp{CR{Q56!LIr)~9&41v0dbI_oUOXXLd zofql@8=l!1*C0ggUu!403P^A4x3Jw&5}3VCE~jSIzH3SD@HUVwuCew za#?*Tv%QbM21d0Q@0g641KyGFp|Iq&h+4g#btv%Gi~bD`ko<(=37 z36~0PZcwhI49qQ>-1xQPWz(lIi(V%j4R-uQ;hOh0?cuEElUuG#Q_lRPAyy?^6oZ#H zIDH)MN%YDKEoDI6ydNRF1*{GLRkzM2-)!l-kv{c3Ip@4`9tYARkr}7Zv`52mO}tOw zK@OvhSy*e~c30(iz#e;(^*IyxTQ0-2a3H@h!Z~3A7iEDnXG4rZZ+Yy^Zdv%zuVRnN zBfh%sjN)^K(`KFPBW?d_I!Vi|>XsSgTSzypg3wrAPVjl+*t4E+E>S!f9}ALZ+?rdY zgHW&N54sg~$bZ1aXn)Ny4LTXp$5qmZ3UEsX`SIkEK9Y ztEO>qDi?XO413&~;iP2mH&q^(<|tVo<2%Sz0;RB3I7aEwi9C;6jk0-7d`91v339h6 zHR{yuzO(&lu@vFW^`{H`Re62g+Jg+VD-IER>(d4vvZIZYe4aF>!b*hKl%P6k+BPh>|7piG^dpoO zC(ny_%NQLML>zPQtG3>JU9j!8xaaK)!a#30btVSSfnOL4&in(hl(zJ}HvU*g%w0N) z6sz$W^voK6&hR4Ey1Jar%1W)@`8Y(93Dz59e!~QfUNt+}wj3npx>cj|Jh!%`tK2Xy zdw)efqr6;_$}RNhR+(O;qjfwspV|%e7`;@P?Q!85l(a&tJRE^&{N~_yt&cLZ)C(weY!~wd9OXQ&b~Tx~SEl9EeFo`eb=+A^ znCjcm#fZW+Y-jF!ap9}g*w*#He_8Xm@^P^sIA&NJVgzCOskDe=q?C9oWHwJ6m{%@6 z&E;i_VSleeUSl&fZYj+tF7;q~5eti4VliVk5!pHlZpYkey&yk*Tv2KrZ2-@rYg9#ngG|sJY52uTNy3wLNEH3Xzkyh$zbMiollCZ69!S!EkR{u0cx4^-jHGj z0-)$KOE(J1^U7)jZTfK9VL71Ji{(oe23(kc6?XDhoI1rzahASnU~cxZ;PaxvD}9aE z9{(f9ZYTZ0`?c342&1NdGKfgV0#MJef(fkxY?v8>Oigg-F>lR*XtMhSE z(lXA`*Rcx=^OP3Ta{C1oiP!+IJ@K-Z`$y@ktG_!j(O}FnYI2C#Z^<3Y@ykWfiZE?J zR3k#UA)iZYaohpwMTM17$}YDf_`_aPDQ#Zruex1Xxk0H~Lq{Wa6(v-6nuywAliOX@ z&PjX%1QNvu`jJy*aZj9K?md#uqLX<(=;YC zTG2etV#$~*Z?VkcDN1;;HrmW%bh|N{NN(`Icw_8MQCkK#y!_x)iHOuDva3TfufL$0{#ZgM5iI*%5B)#Xg*~L0{^p!l+6=y;z5HVxPeB z{43mBR^tUumlK=!1&`&9XHjO#y7sx3UU1*9Y&!=o7XC>mnKk<WS z<1^0=jr?`es-^p*{O1K|m1Ch?g&{-i2jgoFJ9sIb&$;`qIcj;&WDA?4vAojfjc3ik z3#%XfRO+Cf2-EgBgp0LU`;G2#Gmj-FS~)KC;xq;9xCbEj*g4=;Y^mt02a!JXOkT0Xk*DwtRFynDs*b}XeAI-0! zT!nlLh)`b9x{GjS)mgWLdJAE$Gr0^dHw*ZUTsM&noIYVB$85n=Fp$J%(J=T*7CI4< z%bJdALdWGuyQmME_qncj;X%S6SCLRUzcZTFfUe~xsSM}wl#{m4Q`$c7%R{OsYwzQ6patW` z{gQa|li(Vd0&Cw(*q_N(Jr!??Ug}uaO%O^i#u&Yv_gR#EZLIix4G=9Q7^SfnuxjOM z-YR9dty-CFOG~kLR|^K}$J~ktzZx8H0l>>Yu4@qMd??EuO$3ChweR#(Z9QajNskiu zp0FbOlx7{XtE6pmHW_&f&4qWjw_BoarD^GR+ZgJB^`8gfgHyT(NZ$5iw%yTOyE6cw zyCu7;vREty*F1@m3;hJYoHoq*-FBqHO}no1raD9H%+?^ZWPfXuSkHJ9yWrEtNj9co3>RvCe*Jg8_fyRAEFYVR$gvnfF8F z43+{j@vb4KQ>;~{<4UGsS^Kk_5isT0QifW2IB9UsI5`02mhG>=OU^%~0;@ZZ`Zja- zJ3n$t(JT|lU}LzYjN(x>+}&*YY;Kqmfo`XMSZdK~+(Y_!>6FxE$5zwgWR*^a_br$I za|XO4vBtgZeY#B4!zgVgElueUeZJ|gAXX`15x0t?)T}kbGgG@{ajT!yFqNyc0N?n% z@GlcFlZlV`%>G>?xaEP`Ya;!UsTJa){YB}>^%W_~|7=yG*Z>j1Z>bW5u`QZt19)9e=m@Fo|JFkmX6zbe$q z6D9L%pJSC~aAkZ)9Qsit_el6cjXel~^>eXQy6MYQCGJ(^6cV}*|JQU2F7P*C2ue#A zP@FGZZ?^#$3E@1YQkn$A{hu#Q9$0b1?)>YVyq2AMcZK=UZ77{_Q<6pyv=zOzG56UB z_*2qa;wV0J(WftMI#h+V6ZGU0{b$9GsT7T_Esskh7zUDVai7l&9&LY`EGPf*lc?&; zU-DKvQ!a8Ao~7!bTxb{aE5anbod#YM0WZH9t9t;J?LPn{XPjrdd~9|?z9s~30OP9Ce2a-MNyhN*YH`U0}L2zQ$-TqNXpVidzZ8*_rRB=q_7|s07&y9Lk z)}n!bnj-Vam5YNQ&x@+U7$zQD@gle|8itnMWE#r?-;KMXX`k)Z?1;#ZUp13 zq;$iN2g0}bkDJvUA>}*?EJZW*L!W{gZwath?@3;#OwWuQ`7Tiy*Gjgjf*MqAh6Tx zrj_1AaeaR-{4icKh-RQ&+YHDV0@q8yp{I~Y2AQLn^F!#6NRu%dZq)O0figGNOA4?^ zNFv;xcIttTKxpr-t_v>7=#uJ_*DY?kG+Auw+DNa?`ON;28E`<>`;;(;AJXt*VPCDe z;|Be9?Qdq{EjJDzUNQ3Mq|eBpJsjbz9Yu2=iJ8R<;VPJv-$%x8GVHPln8VMLSO58~ z7ubF426RY6_~^8aiMZ;&_yhZ*ny<_Y6}-b&pWg23CZ%u1c;=!U^U(wKd3YBTo-*KX zq*c-Bz=Kf52bi74wD&*D=su?F3yKYlSp)CZV6A3eY@-h3BLlrq;aD4AU1A9xp1Ba; z0ohB?N}fFNMa1!0)aANpe$A)&^RQ&}<(aZmnkB^zqBe$Y$BH%SRHW*c#utmp%KCm{ zB+vndM(k$*U7FPo!*P>O-+~Pdmc;JEdKb%{s@t%SRve_2ryXrrCmrH>aoZ^3n6YGp z-a@J?zfT+o8z;8XsX&tDX$+ zuy#rsuX16p*fknY0c?y4#EYunReaRy`f3gs9%wU8I(^Mc%#ee9=O;wm#w z5^To7)TjP%^zurX{Z&@iNaPU#>g7D9wbC@3p+4IAxr~4RQ`MR&;W8~7ut9~KsXl(A z^V7rz?ly(Yi*B6z>cl9@l=j2h=GOJD8g!)jw3j{jz4s5JalNGLHN0q= z>ii4zFp7)=wx=T-oU~hyLmqys7XuDy+T?e=R3G@bWwT0nFw(VAvD%o%y^>$UqSKx4 zH#I1jvD*)1e~^*93E!|R6F91Me)G(Bc30bh_SoeyHk5Beu5wyfpI#7^VPRZmd#lgF zsHh0HxR5f~n;k87t5k@?jfTnNKVBBIx}?RS=%nfIfZ8jnDyvr1MG7^phoJxIth~f ztAk0ijdxrsS8;$^q=wK}1OQC;0vhvy58-Q#*EMEyn?f<@7u9DaG^*+A05+X3x{;lE zxa!e)5Jd2~h1uNnob5Kd+Og{2?hw?n6>7-q-@#w(N>eANI)AP`m1IsS;H!_49=ivw z?(Zv4+Gbr6Rmt1vv&sy;w?O78d~5N=A8vqD zo8uSe5Qjq*yLKK83<|@_0tt8R0Z_eC-zf@U5`Z25eIbF6xK5J=61SI*UuU z$t_eO(l-Qj;%QzOC#;+sL=dSpOuG#Xc%0aHzZYi{QTN}+@iJ*(v;VNPEw<8)(o$Ps zd|gs-{w-BH!isk09y+~Wh622|+hMw1bAcz5R|7v5c)hld?7RRc$8mh6m7WHap_wOH zUp8DZMJ=6E7~LG7v1_@OC65ktU34ZI^x)HlS6ix&cV>`P<;eYvxgc~eEGlH1rrF!8 zssVt&B$2e_rC$hrOn7~<$v7s5aSVLpMic-9dT&d%VA|X%InqEPJ%Olpe*$d0S$kQ~ z!2g04wRGoT(k*9=D(lQRYw0_0y1FTMpbJh??i)gsFP6!>obr~p@uPaCAsJH2t4ON> zuZ|9Qb1x}}TselXItp1;4*&tK?Y&f`l+P=0qj5^+Si70E<^DXgqwH~CmGg13%3j1` z_;!p_ylwWVd1=fpJ{(w=+S;r;gz+^!gMSAG>x5@p4)((_#))?OSBNFj0+o%j+;FUVB za)-){CD>$5%Re}UoNhJ$hL0#;sl1XY(V6=RfLUXN0yY`4!<*_a&)9Zq*!3761yN%i zyKXi4dnk8z=z68VtXH$OWr#J5KId89b}TQw;HI4TQVF(Wj<)D(X**W-b81;rmLsaN zcJW>Un~VCiKfHQ^9m4`IVUZ)(UHo{ZJ4|9!CV z=Wl#pfVYX!h5h1W>}d_7$D$|0RQmg#X7S}&kDzR7F|-KYp<7m+FDqgs;Ai(b1Bhx~ zE9&aZc<}Ih%Td*p%8v-_@(%Rp9SL^VYUjrS>Rs37!EK%SyC>1!@r9}!Si3J3xh9(e zKGkF2-(E8B{?&=moB>NZ!hLGej=U~~uG>ZDY=13zr0kc-Su3m1 zGREX7#aR1_Sk(Ks<-_He9;<>rTjaR)-J6^0ZvE?Q-&u{-vjt^wA0>*Z$f9JY^>tc= z*{BA%h33T>VQX7a*=O_gT&9HdNCUb{?O2cIBA;JZC_s=V>~EdbY$1 zM|+J2b|RxB?&%d?Ni{_5HkEMXgu*HkGr!Wb7#rHGFCp?9kDD~neRG&8nv!X_;8nUC z>j~O7O|-vxZLuCQ(vmESc3YC3zX1Pe&6hsBdQnp_T>2glH`AC4HxixG$Y?xb%XRsS zKgw6Mi18BYq>E3B7Op_f5>k=N@%MN>NA^@`#Q^c%q0*#ow35O_zjUZ_{}MQ2o6>NX zv83Oa{JjoglxoNej|&gvq@-kK9Sj5 zZ)k(QJgoP;WWHnEvIa_D;o}YUmlcdk$MISc%8@;7)H{)t3qIVm^f82OvtA!7D2=09 zVv52y8s)df`J>nVMM)9KxQQs=zATS$$m{Y|R~`s4dia?rldH()5{Ae#%G zy&}dt&0^&Z3>Y&yW5>gl8<*OBcc9fZrt8>N6DhH!1E@w8Mc{wjyNKn_)v!eVW#z+ZGhm)#8QUQ8cx z-_*g9_H)WsVBAJTtOO-VjopKFEZPYfHjZ1nEOF6tRZ#u_lu%gL_IOE=#@CN!L==fs zvQ=y9S)Nn+G)VUh-hhAyd1*Bk)3s@6k!Tj5J)Aa=NUH zg4;^MTGcQyu(UcV0wh+>sCAoVWJ^WD#H-ZZw!b1I5zvkdHA)yV`bj#pA}jvnHLjudrNDl z#1YCtvW^|KOhhxXWOXU~T+i>fCf23eg27J@M5I5!arf~%{SbU-d~9&3hCCN=fa^69 z?nIj3_FlkKFgu7os7lG3CCY6 zYPqWj#-Z3dyk{pu1*-9`q5#t2Pi49niQAzdasI&au(SQ>$#PB<-P`=~i^ZESJ^4eF zl&wB1UwhESRrJdC8Za0*Q2n)P_r~Y6>iX7FQ5wnQ`{WSIRpAFR-00&7c{Wu$XTRkM z5j~VF|8c`_AZFDHQz@t?Tr1P@_TV+Brgw5$`ia?!0y@*JQRgC(Lo)N&eYEJY5^9_K`7z4B)z)!PpUWvDi0I#G> z*k2W$5hvEP}5Dk|>U{#6f3fh@-A+S>BF^PCB`Ty{JZ_tm5?uJ)ny@Im$$S z14(^3jpynv+(3;{Eo62`>8ANpEyuativJlo?&D1h4l=(Ojd{FabQ=T8Ojr7toFs~I zymd`o4BU5fcjVN&w^${87t?=)JN+ zIce?&i-dBtoB1*lZpXDMwIyt8g(>8rLiw{MKRt@Bnt>xZJkcp_DZ0z$ewur|6;<7k z4oRY0(AkHSS2+@8<>!TS(|_!ioGae8eMsw`>fpYX+9|&BRCsWRMmS#d`sG0S#uY{J zea9CSwffg^5x2$%6RBnW(-xCbt(lnvOV(dl@ssk_MVM{Gg4-UGo6jIOTS)*Gn$=o> zGFe|dkPIYa$sEL_d2rWJU<6}H+ItSsPGzn(v5(8{;}Cb&=;Ydf#%fwj(T7w{a&($G zZ1G)0#bVOs%-GX)*%g#n?sQF;aS06P$LIUIY@Ibt75eo=gn5QOx^VQqY{K%JSt2P9 zc6Pgp&K2637d81A*4a>PMN69oDZT3YOZEa)#s$QN=7R;w(JrBy-E_)

                                                            F*mh$zGrJd?2aE25HCGLsyKu3{60?j-XP00 zHk;nq%}e2yzAP-z78p{KJtW>z#qfdLZgtaRo9@8SW^?bA0r5jAd*N907E_eL?_2KK zt5lK!k3ARcWdQ7`z_((r$6uJTWr&*({jJ~XpI1A7X$Z6b&)&tUw^Dg5RR%fNhC#$B2=&=v*g901^Ycsxx0RHHp>eHB##Sn zQFojRx0`8rj#nN?I;NuhCGz`v`BBx4n8Dch_#l{VSNd*4a&NxH9l#7e*o{aY&L%n^ zt6Z5<(U!4DGO|9m7kJ2hERqp#%>`;u-Nx*Yv3Nr*LpUAYcpa3=@w!M)*fU90(w`5B zc8FTwOwi|YVf6Hm*yS@>xR{?b?)w^ThT`@h;?X5kCtc?hc*o|svnpkrGsXWC)OWU= z+=1DSj7HJs5u4(@uVt&HB3Kb_1+Pn$gGS~|DV%ycrX&RY#M`%m1V-P!ESMxzvmsNl z=8|%j<8fAGcj2pYRL{#D(rK|6fR6a{w?NdiT}+5@cptSJ(PF_Xq_Ogv`9$2Tukp2K z>|eD${<<;a2+D@?U)}L-xU7ix;PN{l>zL8l9cy?!`TdQ?O#*kIie~hB?B*ZEM=riL zU4G_UbdI+f+BnNt5k*n@ml9`bv|sF4jM<6kajp(<;G4OiRNyxET>|FP!C6h?an&@j zNij9+C@0d8|AtA+X4stjzF-U(7KE$2qG_L|9>~EudDRvD#@HCi@pl{LuNVK|QJaH^ zkb&?4hb3kQm*AQYxBxHA&X(o91b{+F`#s;znP>O0h)}(lH}qvcULLde#`UXkpxSww zI$$)(s+;{^qs7u1KcL1-&f*F0>?cTQC`NvazK?WT6=SwzEa`dB6;j{!)*#-YyQMN_ zTV|qjk~d{Put7j}G2_za@$uu*FFkMH7P!`>14)4@zT~kT?9<<7l|ZY;!9Xe2L)xib$8nVMmrO|*<=iOTyeu+ ziPrbdk{i3{%D%a=U6$CLu8J6u%cb}|y4sVlSoL~+ zqpo1{-Ls9BIpkpIpJoOt0ljES{Ti#hBjw%-Yrf?vqGi8rqL+>K_e#64y{RI~e$RSuRd2oerg58ZIVKWy=} z64rRl+;))ot*XE5W&@Q4DCt>lqhmyM=%es{eVu3t21+4V=$Cw64&6W{H!>Fd?9Pn6 zDFvna zkeiwY&|^`L{AB{2`Him#57Wz~s?7L?JX7|!(Z%#(+%1u>hMuzay+&0xaK2baPBcxZ zW@>Q2GEMnsli!7tXa8bm$;0c;<;5^KrsBpvL3=TY<=P#0I-{`n{Q{_{h324n0j-B_ zHCfZH$#SC`Y7MtuSj@W1$X)>)1-I)}wkrva$Jxa@GJm_HfpqO*#uYEcJ_#Ff0g$F# zX$HB#uh{+c`KgNm_t}B(bh%7_#g1NWGxxpDR{M6(5ttLDHH)~aQAlc&y8)oPo-l~ zCjN@UxCKYv*~FDmVk^-rarqLOrj8s2i5K@l#>eWYYLfNNUpMnDPgR3X2?}|vh@WYS zC((8e0o~b|E4$kwrOu>}=5GV2LNP_3DPOa1dzxSfnUr+{&}kgSXYT#ESK$K*rAh^} zS$|9j1d(+`9=V-L(3s&i-Y0A3xzo@OlXU}@yzdXU(PEc{^}eZroczh`+pVP8k3Ns; zU246RG|4daf#_XF@BAOMv?qk5ZZ4jApiMtI%8g?BB zg^JJr<|m(1)#ayue8%&>@+EGPwA0Iu=E!gom*vKvaIim@%+>}&uWhm$gxTx^6KQ$w z`TNA}m5XD>ZPq0B;mqtexFZM_gESA7+cUP9z}jgA=4>`Z*b>b%F?j860) zB~LcVol?s?#X1gdBuZjfrmTu(K0LiG2~;(iq%yj-cKaeQ$5ph*{vS2oE*a8?J=Fu0 zaAKEHT5`o|rS7;@$p#q~>x08v%#&2oY*vrn_(^SRZa@}xgaDNpG$af2WOT;Y4MnC) zCFzTP)374NX}DrZ?4voa1*$PGq@{8jMMuL(j8iJCS+52f%2)S{p=y_osjOu@GldS1 z0{l(?w&UFXBL#DmK?3H^uv~zkTLtTmwpzniCy4_^Rhb#NU2d_WGr9(X1(e6I=ez#2 zLvC4zaN2ySvpQQ$AG3~D@bK9xZV5&9Nks#Or_?%MT_~;GX#YQ3{5_L^E%pnF?&PvB zS~f1u0d}Ge<7KAdP>}#j7J$OlhetCIk`hU?*?Bxt&omI%lf{&HIs)nojqw_Lj_Xyl zk~+=hU5IT$+1pan>^Hh!4g+>-XP2piev4&J&CZbzK3ShZjMWh0= z=s*XuWI)#qs@j`#=cq`1Jqv2nG4lHB=-b{D={-?b-a)*O$I$UR{29gY=*)VzaGFA0 zEG<_~+CRJdB!Zy&9XeemMmB&aEQ)!WJruz{IgL{P>xClIIqc=~$o@Y()uzX{EfRyj zb7+L@DNX5Ia z*Pm{FJ_GI>m`Uh%Dxm%N{os#iiCHE!LmFOREN#}wvm42R*?ggr`_I2L2L0chJ!l=RK* zrdNx8{FtpVg(6QC4Il$C`^?Fg`PrkAnEL~W4)Ce30kO2B_kV-C590v}7S)u42LCOz zCu{UCQ#8sye@j}F2Qu~N$q&Ktyrg^Z?TIAtb&IUrA~pX1B!qgJs$`TX=z-I@3cQdb z7xO=fF2$3F$LfS=l1*hhM40c?cd|YdsDB?WOpbcN7-mwo^yZN)A#%ReOJRnvlbF(w zN1{?=Bo*#-*#Pd|<5B;8nC`bWIR(&4#S{X(+w4&*!faLnDP$^S^9P#O#r-$564*o0 z@iA8crhR|rA^Q4*;?~hoGJGUFwJh zoBex-3JrGP8=!}e=uYw^=ZZM-(cC^6{3IJcxi0oZ^?L1c&e4%zXH6JVa*<~ zrtiVIe|G~3`U9^=`3tQOXv`CAHfH(vf{@wILjfs~%Z*moJC4CGrRzD4G1{miXr^Ue zdXW7ak({pIx-!-2<+0#P`OG2Ih1dVkg{A%IEAIgFNLItz&u8)@70tEmOD;F*R~ZE; zyKHZ1oKi#J9s-pozyTyofa89X3mo@Os zoS^d=A=(Uh;A_vDyl}h@a^&r^K`Ov-2aBg{wGQF#EXz8a z%G4R=xFTWM8<>k}Q{+l#a&yiN>X5A9CLcax!r{0c2l&j{m3!9uTk?_v_>S1cE$V{SN&0^!@}q`NMaC-=06LsQ;TkHP}>YcGw_HVj=_G zLc_SAX!rej-u^pZbqaXv=FO@+!Yjoo+mEVaZzv0X_TC93$YMr+rB~2(!HlkuOP9>D z6gi%XN8;DY;6Qh=L%A%Fv}raeGMx7ND@txWix$0*xpKiV%=Gh8caIMm4&OSCj$C@^j$&`zJU&q$Akq*r|;3;q5#Tbz;~7sQ`4sQpob z#k{}VP->WQ7-^X294%^K3>kOmO&IS^l?0qy3~@j_UQF$KXo=GdO*pjA>9xRMTN2`` zx5s8O$|1rLRB=h_VxidbnUXpdqg0byct~N%_E$f+dZG)AVM~LB{GWUELDmtIoeeMu;)LE`LbU0nSd~?p^XuZZ&3@A%9lyx1+XkB8oy+U4;_55wL0%+6gUS>O z+He{!nvZuo*Jj#&haDs6G>Qq|!G4OJ>@JW`Ry4ky>l;#rC&C_h0q!ehUvUZZ=jgBH zyeszbYLu3kvL#d!90_=o$hI%qnj{ZmKvj!LZf$1Acuc7GDhr0r>p)U9cfSRRr_-Cr zYHPcr5N%8`{y1ugFi<+QGS6zw^Vq?y>Wr2CFy$s_nQ(n*e)G0$FaM16_P237TgI>2 zfoW03Qfjf|EW^)kY-Lkswq#e6rLkuWibWPC{U4PkUo_Zs2(X(8p9he?9*Wx6hSX7I zhh^Ce=$4Ni^{tl4fnR&e)$^GmD2caooFwiZn6iO2~Pyxe)0=v@Q?j+u3Rn2p>zK4FTLa_%%zzN zndnO*JP_g!Sm+CqNeL@)6lsKxQ%}Q(p`u&Kx}tC!3${Is&qC>P>oQ7{zbGo8-B9yV zDPXCMy)mi@-tRbY0%^X0(Y

                                                            &0SHpi-bk+ba2b+;J>SW0fypHkrrZV(f>lN(z%1 zq1^n2-!BZra2Ncd#E8bfz#<)7RiHd{y{Zman7RTrbTGR3l_r}2dQw7! zH=L}?`%d`sX6tTuT-(*Bax1BvIbf(f(!zqRm?({VB#974T-qt*-jLvRQNj<-O7C)h z!VOe98tu%_T#&%>WN`Ykm!K`j^0yTOp1WV=C=$hKW~>={zMm@GSt9%b5hmu1zaXMp z0r9B00XGe=SLQabb`f~YZuWddFvV1gD04^z^oDW@5B>=7w3?eL+XF4BADnlGK5kVF z<52?h>N^1|bEMMf6i3{KB(64Re^^_ee9l=Uk?$_hDLqNf6vtL!!vTW-MV~2GW&~$V zzlO!IIJSDf{n>_w7gQ9qU`{V;v~xOMGGUsX*gy?p-~2|0xOrWmb5_nuzTH#035LFc z+F#W}wxhGswG2GHz|d*PG8v)E+xn$*O5q3{*}F`x(49_PwL12gUrQ-!ubW(&=Xy>( zz^LKHd&$*HK|xa3nZ`aynrmKeAyfgrY^i`_B~(u&zovTXL0_lujj>3y`Wq@yBG`xLkF zpX;};nv!0uE;C{Nic(Z~Yionjr%Z{QuL)Y9>vd2aA~=8FR2ag)!xp!Y=UV(peva`j zaiL-51t7IsKLe$q1~7&WO;(Yn=zVOXC?Q~@Vw;RU8`>SjgXZ+xt1aAXC8|GOp%1i> z<0*xtJ|_R@7HvNFw8VNgjq-gEVWy~M8-ykrz_EWyM+e;@+HFS!Z2%9@;h#^)9 zjz7TF0wA}|FFp>xbw$7Sw~o!;2Zi(jEM$7FGIcI<_D%x*q0HA4k;PFCU5rrsc~J@+ z>}zruQ<-Y@st^*jJ8rGAGoJ*@j$E3l- zuDT0iZdmZwdzpcLY|ww#cC`56BkO@ z-BA}G2F}YTLV_2%l-^-_#c+89wW@ER=gQV6o3w$EwKIPNBqE<(OKh4!ix-&3 zm-SGSL|v^nk}PgjUo}D}fc&tRdM+d&!37Y5ehK(3dycO|mM%ZRQl8vBbIft*)i%*U zo#IJ&5o>z{+=^=C8ntALD3DsxGzDI8QxFe!weXv<+#)OIG0(ZE_x$#6u|2^&t!Z0c za}ju%7zLUWo~B!(_E{0O_@~>U$6zR@=l(RN%jX0it3j*L{Z-w2wQq@p--4&EHPM&4 zR%~7=Q@P;fdIvKT50|>V1VbqZR2NNO%NhG#mW1TsDq#J9z=A^Pa?#d2uP6Qh5t6Z) z>Q9z-wd~{^R<0{x&GxfEQqNt7Kfhv8PJ2C1^UIK&tOxaFC;!==Z3?ZpRL6*@cO@9^h}@bVMIkn1VVOCnOx6!AzPR zKZ1s;T96>uiR!aidOa}q=lojiX%ODAqeHhzUYt)LLQBB7uf|1ciEOcR7Gxu-os(R| zmA)@dC8@S`$~BFwwrMEd`ChG)C{>}HXCPO93z1X9i!UJwQGe@dCP!yE>V1;I5`Hf z+3zn<`C776EN-FTplaQ{{kuKr@4<6V1i%Ytq`iajc_!2BRvGklRBCj^OJdFTrvmO; zwJK}qI!C|3dLffv_1xGldBZ%8>vOl|ezO>Ks`&|Mfe(lVj-8hPdu<^L^IutZ*b!)W z6-F&qvKYgE*KarWj&-V5f;>A+5X;AExR!x)503S%47{izV?&r-q7Rzgr%t9kPB@Yg z=N)lRS5Lc;^_G!2eU*TONilDYK=rzx;XzF6%by zrEvqic2p5VLd$!fd!9@w4Ufd801Q%#c~@m8xIZ;vS+B;rhb$|i zC6!)5*33-{iyYRcjWC<=DwWQqk)!IHNNKuaQp9wj`b?={nuCjrmNCDo@vIVi1DB|l z{h=Om8q*JBQ%H9wO0cDNBn$}myYB?l6tQy*q{<1UI;501OBt~du4qpd(bq~{Oq6D5 z%4%6I50Zn=bKf|KI7oL%=3WPqo!~NZ3hhu_5Yw#XuMcnjO$}3?)3?I*0;5_a31Xib zkejAzhU%ti^F)~{I7t{LQoUw!`^r5&QmS9Ad6TK##qy%{25vPW)I)@;Asp*OMsLx5 z%pIIg21_@Yy9CxO9dJB?)&_>^TdPr`ljzf> zI{e0#K!iog?PbjTb1LxAyA-^LtyY0GR&oi}$N2$zMRJO=7+?zrs_Oiz*H& z`eHD@f@fkn!-$KP%|yh@1r-hb^&L+c46Q)Ybjb5j(W6~1N_G7Kc2onYkjoHOElu#nCB*zY$!}qL)qGPMc2=WkMwKG z^DX+()Gr!Z0+TySpS|OOTwfyK2_)pJajUn}V^IJ*TG8g3bj6g6q9Evs%|KL)DfaAW zvL&yTPK5{^QN8!Kt$HhY?{$C^&2 z@HD&q{zW@RrigVm@f^=2VtcU+IvZ-44~EuLJ}GbJZv2HiasKVojOpxdzx8-R{XRpV z6azWsmgaL_I0$|@*iu3q4H>?8(FhZ|ZU}KUs{R|cTad0O$+K%(Gu1K2KE%TvOQ3I1 z;xLlFmrrlV5Q!f0CiNOr6AA05iKB(_ZL{O7)i0m!cE1xu3GFZ5-Pa2cq0H%*PWt4( zr@=30`lnTJ69P*$oMsVf%&tqUa%V)MrmD~z2sU^{5ikGa$-UQ0o!`TO*tOxE=HO(> z0y_@R{emMt=Wwcb25-Wdr?zwVPk$ngO4RH;5#a@Pi+$gm7=Hag1SQSEf-`S_xrli$ zq3#dZ_5>gom|(wleqp-gN&-jHaGfp5W@s2}C&v2D)@0d9hVuQl;MkRe#fo|DMHB{O7_m?hl|O zWmrE`UQo0Z=3AZ0B|6`ui+)TS|Hcn3OuCpitsv8`J_qAn zA-J=+l@5Ix#S`pCLj+Ek;gmeISG~-3(h%4zM$_$6t7B`xXR1Xml%qoaqAu(K2y6k? z;i)G_EW?))wX+$kkQ=|f5j+lQCgY{hFJP!0HLQe3|8ydfWiR^3r12EMr4rkg z7&OiR4WPsf6HM5cK&zS6JSqVnwgh|d_KO1@)jx_)_Vc)$MEdfq;aKXI*j?-b5S~EE z)Iduy;T1A}ImKIKe=*Gsx&yqH^apU6mb1V8{arX4gg!`ud22j2E-&V#FQiPC)|N#DV~c?Q4SDWTPQ%ED$MORUM3?7{~s;){C8iF#!EI-w@S)M#R) z6LZ}^hU$a$r@C;jcY&m2YWTDh%t=s?Y9yz-*;-uZ&Q&?}?9s}oo1U(u!pE#u>P^#f zH&51dp>k&~fPk=Yl?y*uU7R@no`#}@(A_g_Tk@sG>cN1oaN-~c201ME!so7Lvgm!X zfw;lMeSE+`mVGh!yfqfKkyxRr#EKbAF;9A3*IQ-)k@P)jA96CMbS=l5POOdLtLAz$_-!oz!y z0z0kD1=ZSgULf5fj}ekD)ScAz1`OQ>lStSQEp=>K(^QFl6CteF3nQtQ&(E%yGgGH7 zB^80d`U9YqQ9IA}MPp~v`!q$qjyux8sYVeo4+E`901yM}ROw6SO~mVG{6(KYgmdCo zZSDOV2;`!XN_a21ru&ndd!>0u_o4PJ1>T@S`&t)S=r2-> zhMA7{vwj4EqY#)W27oE4D6f02oNjY9Nd2+Nl=airV2)VohRTV*yK$1f#emlPGfaF) z@^?-F&^G+aN~_!Kgb902N;~tn20Q)x0`Rc@Uo3B|j$i2kf;4~QBKd9GgPeB-V~nbv z^AE5MOm~A+n~R>xIPQ(Vs{lh;ksx!S(+(oWV5lWadeE7%?MLUkGzME15o}c05DF=< zB^PU}tUrmBPV;A?3xvn;lOHPBq%ZLh_o>^kOHx4XllcgWm*TOgMS+4Ww5==mxmRRl zq8AUB0WYx?;m07wQEj{)@-UJ5Xqv<}=zVmEwtYb=Z_cGO2)@>5-u*C;KriHCG(n0I zJyH<0T&o!jjoP4M=&ks4{{)rJY(Y7V+L7t!s!E(p-7C*R+CPD2C}E_1Rwut2s0%eg zlXgg|Y+05ZI|!IJ^nJi%&OTlSukyVV5?Y*62ZZg zK?Va03Jhs0!OLGpROqEva&<%&&T6GyfMER@Q2Sk^F|6rvc9xf)ME9~C3h>!NO@H9K zAwkq5RD&>;)wZW=B`h)zR)xFnaB3XT)`TFij#OA%HY%&}yo@um{uE zxwsWxZlulm$`RnI%EgghBPU!t0}|wT7*+E|t#yhAE=lGRIk|&aL>BIWt5@|Yo?!V} zn91RlBxt14Ga^)bqny@w2!&Fwh*NyCUhd8KX!0c;Iyp>IA4eKvoAA#)b$cL4K&&`t zfs{g^K0}sNQHz%k3UplnQp>2pp$Ottgi)#qhi?)>V9g|8mI2EUs>pnt(^0OLKc*ME z7-Fi`y9MZ};3iQv%|BIubAf?Tkw?Q4vSyBYDLud>vT|cu-eBnZXUO%`Gmxf~j*C`x zz+Z2u(9<_c;vp;0pdQVs9;a43X%#DXMoK+%^jThIPjJ)AurpnFX-;GW$T48VH&8W? zUI{?9H^tI=DpypHZ11OO$~cUyT5lSMEH937!%>q?5J0`Ci|cE=ex4#`Ez=@jEw=!E zt(7Gu{z9Dl9)D~8ani1DSTfMYW)`tb(6m>?2ZC59gX`7tKc9)FJJ+B?*^C|cK7vB2 zP}&swtIbS`p(4cc0fa!EQoZ`veN5m_qvm@xprL+*2FspXq*)N}tC01Du4RVl>sJftyl02NLg> zN;beq3SbvaCDQ+j#Sd*J!z|&+;g~bWOdDVo>&7p1=Rr;QvP{RdxK%^xiLlWQ@ zFi)Xv#*f|T?j*-%(KEkDz(}c((`4ORM3++>5z)0QF!yv$F~*VYZ!|mu+-3mywV$rI z8pL|dv9nX?lFylAUv)NfD(%q47^EoxE7asoaiq=?rcaoc#-IS8Y=;!>$jKp@e@|q- zW|1#&Vq9)lZQfX17@EVe@>JzXi>!)8uaW1hfkru(j1h9W0l}4GtlX=l+bw(uKJ(Z2 zg5SZH{2*VL=|KR21a;0P;{>9fOUsFlyp=00K2DDhSgO5u?3LkN_~N0mJnd4w&b#f2 zupwaCCh@@v>nIz?Jh`!&(>iw1Rc{@|hf zA`Uvv`)AyfR+Y8igm7>$y~?6h0=?b{J|#m~U*;LxRJ=mzr?>Px%^mLPZm$lc@}QtQ z1(0`~dBh)=rrfwc(Jx!#ohvSOIFesLtbM??Y9oqHjVGL0Z6*a03o)b$5*#qT}g@gG<)d`3K_VYD@!?KC96k-9LY7tp9M z@N2~8n6HptM0M&g!Q)%f%l(OhqnC(uFKL2y+17ko}DZFt35eIvx zJHWa+2n>x){V%ne2hFv*5@#iBKa?NR=DOt$Ucx%gA7z^i*O;Uw;klA>B|&F>85DQY zdxZ{e()JAYF^XtkmeE@C`dh%w^!A%5`un1ph9=Y`4G6KamP@23hY|;&nGQi@ZhbIz zyFG=*y+$2D6{LD>95l7vKTESa?t(LD&3D29Lp9({s!q8aQ|p&gxEPFcxr+-FVkj=b zkQTDV==*>bW&Q>#1WUnkh$&1b;UWIk(?9MQXhaUr3H#x>zut#y)KxGZBIm_XKkOjm z%H~6)cW=oGz@{^O=ZAl1LvewbunXuDuE+4HW<$qcw}%El*U4qm_6Ihz8x;dYLH%QgU8JRB$(i;OV`N(pJn}+ncx_t-T15tC(aE%~ zaVudjvLe>%y|DmNAc}g)aV?PJX^80@>-lC?j=bGAwt7wcK_{PB$&d7KMWE*4{Own# z(psiZhoW3h?qL&Dn(UKxqQmFx3joyYy7@X%L%@$NAuq8qj9?#({Pb#Wj0jw*3zL&(r;eZ9gb~0 zA91{)%BGLV_a_9F1%dz-CnUz9!MMja!Ih0V#LC3+%z>0d=s>Clqv=|wmers{#P}SG zu|eCJVl_Vc6YUC?2QXJW32b_)dz>AD!iwkyq4drPiN9v4!)H`fXIEFm<{PqnCNq zmo_Ir2o!|Dg2g}v_!>J+;mWUy(V8ke8PdttmuYVglEGY!Xqgt2dh|C<7gV=mPfFH5LJtJNcaA%25d-t z9P;7HS}NW>q7fwsDDcX`jjKVS)M#4CYwtB{-|NoLclyrn z3PIbnt3B(L2(mzzg6+~uvVP#>K;J~ED^XTARrQ*+0dK`|7zjs5` zH*5Q<8PnIRx{2h}u^B6Yeccx--kH{8E_~<}{a^r_;|H6aLZXH)qoqH~)vzFf+i{=$ z7HXp0$DUQAOCY{0u&mri7L)M=>?24|dXc|VI5zL7ZFLmxRutR~M6$kj+rq2zxV4KT zgKj_8hh_2RdjOuvR;o~9uN9R!yPLY5j$Zn*Q8&<};~z~chqZKT(<-5#OiG7NIgh7u zFiAmx!7NRUb8ZU(cu^zHKVe5V-N@qcbq^miPD!%!p^d?dc;{5z>t8?HP6b04#`rKn z>>P)&vQpoOf=*i1RW6mX{X3Z5ua_oNx!#KmovMe1UA`eoc*Vtp-Hv#qGT1Np{=QHNF7>XOe%ZH zkva|VAhhU}EnQSxq##%=XuHO@S?fZcTT58aJp^^8NObym;b4>Q)05{!0zMMg z3}7%XXF=8(+8oentGdE;{)f~hwsa?Dw!j?dOzvKB$nA}xmaSQho0JgkU+SL6S0!DC%8{dQU_yeau_#>eovvg<%<7W5y z!W#`rAJNM%ir)y`vD--&+tm~Q9vy%w&leV1s$N>L9G+Vn$KBnS3+hb#>nuU3ILfl$ zG)~RQLk}QSrn_cR)VnE<3K@bu!5c5unX@PL5N+DF^3S~K-tgi4q42FUb-m&dR_fdO zYxgEg_dg_Um2RUw;tFQVKkjX_hs!P7bjCi=4Bog)h))&>dqT$pK$M0u0nZ{KVjaf| zPvLs4i`r5}p7O|m6Yq;U_1i^fxVR~1d_B(_47!arRYDUXc2X>d*#S1ajpsKXrYBOe z>wH0EY91g&FP$^#5f4QaQ~%27&1hh9tuR(uvZqva%Fy#5NnS4MD(oJy7!1uNl9ICQ zm0{H?-3e)E`TiLTe`~eoV@erAtht8!3k%mhwLCA?;ISP-+2{H^7IN_+<461I>WT?R zQSICPz75xT!gH1Dziju9lvB;I5dCt>0NBE%e(eKs*=sI$?rUl4>GHE%KEirXPi8&L zU%6q~u=f4Oemod5_-!1D)xDmFB;=Rrq?rpx#UP_nyP7ICcmd6_d==mlv;L$g@2Zhg zXYrHU3_uP0pN$!SNC-Kh2J~Me4DafhtOx5^=7@c2e8`TKS$Tm}_1msr&vf60_blr9 zdTHA3?hf_wt@V^vetcY=r|Qsru@f!V+*Rru)ZCSjCV@_i>b*LQY86%2V6Hx66&dE> zVg^xp_#~xmVRo=V1shnEEAG<0O1%^K2Jw7zAO7%|);LiPR^~@tocr{9ZIkq#OT6f* z!5NV2Oyl7Q>9iSq40uH!uHAUE{PUgdhup%4YBaiawO2klUn zTfiKFXy1>yz+F_f$#SMJI{J3*VJW9mD!>Uk-5Lj^f>nsjka5Omt0_ z#WgF6_@ERP%&!?w0R<@=YE1v(rVv2Z(LD51CQ`>GpluSs7{SQ~OB_%#MZBN!Y@REy z@$+++bIBk=RW`^dBCYQ2)jYvU0j;>d`ZeqWhiu)L>Je~a4}Mb4Z45dxaxFqS60I6# ze$6vmsu&vF%ji-#jN;5;b9H*rsePQXOGcr-kVc+0xUCjZFUHWSHQuu_LsF!TBua@DD{LCIm#l1n2a?#XB@84ptU zgcF+XH+KkF1L6)N3#X`(fYj09b-}d}zgEGySgn}>lTe{}5x*03`X+4CEsLOxHadg) z3P9ksBhVYetpcYQMJT1^(vgO8_y6`=rvJUv>vS_-@%0#hu?*s0^!J z42T}C3~3Tm3NM;n3s=>z)X7c1`qo2r1c8E*IpS^1|6 z#2K&w%$@P%3}0=Lmt~v0dMJBJf_=9%G&L^fftR! z9x1WMPs4F}pBe@fqEgwSrCt$YN+<=hy6m8wmDlZwR&cNRp|5gaSkV^@6j)AekWAF(h=bCh<)+u)TS8+Pb(tXPbG_{kyA>^l;8s&S|{UeH#F=hnn z4$-|sJqn1#V~WvC=LOi|F`Y_t^~Pq7ok82gA+2U0vfmdQVAb$hTeIrFEr!prrbA+; zkm_$2yzBxM#?5_ot`CSFcw*_RtRV2%*A1$>l^j|;f4#!oTs}DF-S<|dOIbikhKOu^ z=7BWYW*FNW-Yt!BY&6}?@qo@w+Sq7&{Vm%MYv`kK0YecJES_GHvwTwlb+WbMJ5-Xv znX;ZB$I!?#z5ANV53?oF*dX6z<2_diOtCBec?w#FR3gI(HNr{}NsbL7ZaE7F>UTq& z9yywP^>-`kEQSQtKnMW^gS`}UPl|7w1?VUG&j#ry{jMCjJh7ZiwtrK(b=~=DH*vz} zNBp+Qpexyy3}jS&VW5t;f6RUSYgoqcw>DI+V4W9W_tZN}u33Lb*^M-8Hf%@f`5TRm zEjEImvH)}tE8~fTlng7y192(`y>b~Q^*{`e10iLp#>T4>D&_^vId@q*?FJtMBWRgnB^b^Huk-CHy(~ z5ePej>AXPE>Euk9w~l?Mk}nUMTT)Lh*JZoCdXbR}Y6CSSEjvobu*J z9n|pkez?glF;!3;9Cb)Ck9v9St9tw4vehq|KHA6Pb4G#kgpY)(L$BT5ze<4EC2eCQ z^$MWcIF?n!X-@q>AD95g&#)EKm3;_OsEXTN@)0Q?;D=G8GB(|q7YXwAw0}R zT3TRFijKl4&mT4q`}C)ZPoG5gCHd&FzGj=oY*d2xh3h_>QkjE1mN7^0&;0p7f~bM3 z&s^#DGF0b-LT|+cQ?0$7bq`##a0m3LeG}HFekWe zfe-YjHGYYFOOZ$FG<2k?qnKM|b9dD`;_?Jg$+v%0xT#-HNKP?eb zQ%aJ_?@Alg5T^TXvtPVl_NYCrWbXOs(glW`A>#>F800bTn=J<+G!}m39}b8#uqR7e zy@lOzD$z6h(%-zDv&_a6$`o=i$HFZbiiI;jS6#jqT(JtP1&4JflV)Yrv7{PNxPAoh zXn?tZPPy;HbZPb#y5ba=^+UcBFQIU};2~n>{SNCF>f=>Schs13RNP{hx}G{9bcy4P z)8oZysyDg39D9=5xN$cyj~NY)$)0Gcn9(AP9D(L`2#FSUXuJJ3fQ@bZcuZW=0Alp* zyUlM84nOtoQ9A4Sa=n@@DGH0M;leai3bLsalN)p}-Lt-}qFD*j{eDmvR>~{0!u6+w z9PH-(uUH7JzB@N}xqhGlo9CWQMDW65I9PCBO51BIHFo-HZk!5sb6Np7S#$e#BzI9v zjg1$}1*LREh~^v@@va9VKXfjTeAKBiJRRZ4AYRGq z=3+X@6N{^UX}-RFl}!D`=T@zo1HanS3wq*stNyiOZeGa9)6Nz!RIP44|5--~KzoiF z5;u+*M4as|S|}s;?!ncTznC`7E+ z`*rx`JuiZ23)V6cGM;1*k(kpxXRcZDO}qjMt~$gkN|EVOgNuS!BN3mK_nPCQcr(cK zo=3(yiPC9u9C%EYqB{u$RgGzZcj?QJ7lSEgRf#T_t)lh^@N`9f)@n8U$HXYwO!Yib zB#H^hdZdD;m8MXw=PcB~Dzmvr(kUgP!omSgesGr?3Le4j&~fi=xZKm^bG@Q)bqzVpNq%&{?Ho#7`9SQPqU_ z+m+13NWOsdY_gPe%}GblHYivg{8LujDC&dKu4DB9&TY=&=?~~Ouwi43RWPRa3BoC*PT&-=mj#?8&FYq@>)J>)m?2jei4m@AQR}8 z5PJ=Zon1p3w7$jFRw zxazp5X{7>%K{d;AsCiIBSqWdk^ z?%xPL`~JSM!7h4ceK)UrDV4FGn1zmpx8gNQ~ou$g`P7`x<18xZZ*5 z4xiz!k3*j>&$ztHt9YS7JJ}+K^w?ZD?BN-9$unz}3>~|ED#m@y3t+96X5j3`AVvoNLILO_1bwG_BAY=#}$^ zphvn%QHokCpn?Tfb?Q4-v~K~*i&0LdX;wzf+OY{XrPWs!){ofB!?;0xdMuNNHfJKK z9)f&9$iAm@nk=Fw7d(S=<29zA%|It=Uyv6ln-4$qwx~jutM2?6-BME0x!2OVcMU|6 zPR14`puk&CI*}hQnQP@Ws^EUZd|V@$kT^W!kMm9b;5OkOqfagyoBa65y^{U^CLV=tbv~vv z@qklspkjNA#RwHmv>FbB^Vx#8?E~2ohM1rrL$_yh6I%;IPhjeTd0|_q6=BM(e;>-N zgW^uLkbS^TX~3Q=Hbz>M{?jP8iV!JU2%V;tflc+)?rle4N@I+QmIWY(0YA3j`Mh-g zTM1f5w^ID|7Z?z*;V7yk;0xe9cSwy#&2yrkhR#+;@iv}E5l0yW$i(A*AkBs-udqkP z2x~(eG&rnFeR6S=WJf}ti4uC6Q5gV5M3a=5lOlh*%s>5$=kmADdd~?4j*_k)7G$QK zN8Ehas(CTU&x7O0YcgtQ50Rl-Xi%RX%GHKM#tOu>#QRei-waLxiHN=H!tUF`z43h= zSapZtpxsH<+qbJrxXxpEfk%tG(*Xi573j$x1XXqv7)hh-wIb}Tp#*5&*W@~fD&(aF zcHi|8YN-AA2~Wo1@nS8ht>B*x7|G{2ZU6uP literal 0 HcmV?d00001 From e09f1c9b378957be846dd24f6c74e5492723d274 Mon Sep 17 00:00:00 2001 From: Hippolyte HENRY Date: Wed, 15 Jan 2020 15:19:23 +0100 Subject: [PATCH 57/82] [go-experimental] Use builder pattern for requests (#4787) * [go-experimental] Use builder pattern for requests --- .../codegen/languages/AbstractGoCodegen.java | 6 +- .../GoClientExperimentalCodegen.java | 2 + .../resources/go-experimental/api.mustache | 171 ++- .../go-experimental/api_doc.mustache | 19 +- .../petstore/go-experimental/auth_test.go | 32 +- .../petstore/go-experimental/fake_api_test.go | 4 +- .../go-petstore/api_another_fake.go | 44 +- .../go-experimental/go-petstore/api_fake.go | 997 +++++++++++++----- .../go-petstore/api_fake_classname_tags123.go | 48 +- .../go-experimental/go-petstore/api_pet.go | 438 ++++++-- .../go-experimental/go-petstore/api_store.go | 152 ++- .../go-experimental/go-petstore/api_user.go | 310 +++++- .../go-petstore/docs/AnotherFakeApi.md | 15 +- .../go-petstore/docs/FakeApi.md | 336 +++--- .../docs/FakeClassnameTags123Api.md | 15 +- .../go-petstore/docs/PetApi.md | 132 ++- .../go-petstore/docs/StoreApi.md | 58 +- .../go-petstore/docs/UserApi.md | 116 +- .../petstore/go-experimental/pet_api_test.go | 33 +- .../go-experimental/store_api_test.go | 2 +- .../petstore/go-experimental/user_api_test.go | 18 +- .../go-petstore/api_another_fake.go | 44 +- .../go-petstore/api_default.go | 31 +- .../go-experimental/go-petstore/api_fake.go | 989 ++++++++++++----- .../go-petstore/api_fake_classname_tags123.go | 48 +- .../go-experimental/go-petstore/api_pet.go | 438 ++++++-- .../go-experimental/go-petstore/api_store.go | 152 ++- .../go-experimental/go-petstore/api_user.go | 310 +++++- .../go-petstore/docs/AnotherFakeApi.md | 15 +- .../go-petstore/docs/DefaultApi.md | 9 +- .../go-petstore/docs/FakeApi.md | 330 +++--- .../docs/FakeClassnameTags123Api.md | 15 +- .../go-petstore/docs/PetApi.md | 132 ++- .../go-petstore/docs/StoreApi.md | 58 +- .../go-petstore/docs/UserApi.md | 116 +- 35 files changed, 3935 insertions(+), 1700 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 6950cfa4e0..f83783b2d3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -46,6 +46,8 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege protected String packageName = "openapi"; protected Set numberTypes; + protected boolean usesOptionals = true; + public AbstractGoCodegen() { super(); @@ -400,7 +402,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } // import "time" if the operation has a required time parameter. - if (param.required) { + if (param.required || !usesOptionals) { if (!addedTimeImport && "time.Time".equals(param.dataType)) { imports.add(createMapping("import", "time")); addedTimeImport = true; @@ -414,7 +416,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } // import "optionals" package if the parameter is optional - if (!param.required) { + if (!param.required && usesOptionals) { if (!addedOptionalImport) { imports.add(createMapping("import", "github.com/antihax/optional")); addedOptionalImport = true; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java index 76d2650496..181363a972 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java @@ -36,6 +36,8 @@ public class GoClientExperimentalCodegen extends GoClientCodegen { outputFolder = "generated-code/go-experimental"; embeddedTemplateDir = templateDir = "go-experimental"; + usesOptionals = false; + generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata).stability(Stability.EXPERIMENTAL).build(); } diff --git a/modules/openapi-generator/src/main/resources/go-experimental/api.mustache b/modules/openapi-generator/src/main/resources/go-experimental/api.mustache index 507fdcfc0c..7d9baf079c 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/api.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/api.mustache @@ -18,115 +18,105 @@ var ( // {{classname}}Service {{classname}} service type {{classname}}Service service -{{#operation}} -{{#hasOptionalParams}} -// {{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts Optional parameters for the method '{{{nickname}}}' -type {{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts struct { -{{#allParams}} -{{^required}} -{{#isPrimitiveType}} -{{^isBinary}} - {{vendorExtensions.x-exportParamName}} optional.{{vendorExtensions.x-optionalDataType}} -{{/isBinary}} -{{#isBinary}} - {{vendorExtensions.x-exportParamName}} optional.Interface -{{/isBinary}} -{{/isPrimitiveType}} -{{^isPrimitiveType}} - {{vendorExtensions.x-exportParamName}} optional.Interface -{{/isPrimitiveType}} -{{/required}} -{{/allParams}} +{{#operation}} +type api{{operationId}}Request struct { + ctx _context.Context + apiService *{{classname}}Service{{#allParams}} + {{paramName}} {{^isPathParam}}*{{/isPathParam}}{{{dataType}}}{{/allParams}} } -{{/hasOptionalParams}} +{{#allParams}}{{^isPathParam}} +func (r api{{operationId}}Request) {{vendorExtensions.x-exportParamName}}({{paramName}} {{{dataType}}}) api{{operationId}}Request { + r.{{paramName}} = &{{paramName}} + return r +} +{{/isPathParam}}{{/allParams}} /* {{operationId}}{{#summary}} {{{.}}}{{/summary}}{{^summary}} Method for {{operationId}}{{/summary}} {{#notes}} -{{notes}} +{{{unescapedNotes}}} {{/notes}} - * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -{{#allParams}} -{{#required}} - * @param {{paramName}}{{#description}} {{{.}}}{{/description}} -{{/required}} -{{/allParams}} -{{#hasOptionalParams}} - * @param optional nil or *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts - Optional Parameters: -{{#allParams}} -{{^required}} - * @param "{{vendorExtensions.x-exportParamName}}" ({{#isPrimitiveType}}{{^isBinary}}optional.{{vendorExtensions.x-optionalDataType}}{{/isBinary}}{{#isBinary}}optional.Interface of {{dataType}}{{/isBinary}}{{/isPrimitiveType}}{{^isPrimitiveType}}optional.Interface of {{dataType}}{{/isPrimitiveType}}) - {{#description}} {{{.}}}{{/description}} -{{/required}} -{{/allParams}} -{{/hasOptionalParams}} -{{#returnType}} -@return {{{returnType}}} -{{/returnType}} + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}} + * @param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}} +@return api{{operationId}}Request */ -func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{#structPrefix}}{{&classname}}{{/structPrefix}}{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{returnType}}}, {{/returnType}}*_nethttp.Response, error) { +func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) api{{operationId}}Request { + return api{{operationId}}Request{ + apiService: a, + ctx: ctx,{{#pathParams}} + {{paramName}}: {{paramName}},{{/pathParams}} + } +} + +/* +Execute executes the request +{{#returnType}} @return {{{.}}}{{/returnType}} +*/ +func (r api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.Method{{httpMethod}} localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - {{#returnType}} - localVarReturnValue {{{returnType}}} - {{/returnType}} + {{#returnType}}localVarReturnValue {{{.}}}{{/returnType}} ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "{{{classname}}}Service.{{{nickname}}}") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}") if err != nil { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "{{{path}}}"{{#pathParams}} - localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", _neturl.QueryEscape(parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) , -1){{/pathParams}} + localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", _neturl.QueryEscape(parameterToString(r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) , -1){{/pathParams}} localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} {{#allParams}} - {{#required}} + {{#required}}{{^isPathParam}} + if r.{{paramName}} == nil { + return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} is required and must be specified") + }{{/isPathParam}} {{#minItems}} - if len({{paramName}}) < {{minItems}} { + if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minItems}} { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minItems}} elements") } {{/minItems}} {{#maxItems}} - if len({{paramName}}) > {{maxItems}} { + if len({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxItems}} { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxItems}} elements") } {{/maxItems}} {{#minLength}} - if strlen({{paramName}}) < {{minLength}} { + if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) < {{minLength}} { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have at least {{minLength}} elements") } {{/minLength}} {{#maxLength}} - if strlen({{paramName}}) > {{maxLength}} { + if strlen({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) > {{maxLength}} { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must have less than {{maxLength}} elements") } {{/maxLength}} {{#minimum}} {{#isString}} - {{paramName}}Txt, err := atoi({{paramName}}) + {{paramName}}Txt, err := atoi({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) if {{paramName}}Txt < {{minimum}} { {{/isString}} {{^isString}} - if {{paramName}} < {{minimum}} { + if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} < {{minimum}} { {{/isString}} return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be greater than {{minimum}}") } {{/minimum}} {{#maximum}} {{#isString}} - {{paramName}}Txt, err := atoi({{paramName}}) + {{paramName}}Txt, err := atoi({{^isPathParam}}*{{/isPathParam}}r.{{paramName}}) if {{paramName}}Txt > {{maximum}} { {{/isString}} {{^isString}} - if {{paramName}} > {{maximum}} { + if {{^isPathParam}}*{{/isPathParam}}r.{{paramName}} > {{maximum}} { {{/isString}} return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} must be less than {{maximum}}") } @@ -134,11 +124,10 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams {{/required}} {{/allParams}} - {{#hasQueryParams}} {{#queryParams}} {{#required}} {{#isCollectionFormatMulti}} - t:={{paramName}} + t := *r.{{paramName}} if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { @@ -149,13 +138,13 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - localVarQueryParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarQueryParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) {{/isCollectionFormatMulti}} {{/required}} {{^required}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { + if r.{{paramName}} != nil { {{#isCollectionFormatMulti}} - t:=localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value() + t := *r.{{paramName}} if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { @@ -166,12 +155,11 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - localVarQueryParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarQueryParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) {{/isCollectionFormatMulti}} } {{/required}} {{/queryParams}} - {{/hasQueryParams}} // to determine the Content-Type header {{=<% %>=}} localVarHTTPContentTypes := []string{<%#consumes%>"<%&mediaType%>"<%^-last%>, <%/-last%><%/consumes%>} @@ -193,33 +181,26 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } -{{#hasHeaderParams}} {{#headerParams}} {{#required}} - localVarHeaderParams["{{baseName}}"] = parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") + localVarHeaderParams["{{baseName}}"] = parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") {{/required}} {{^required}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { - localVarHeaderParams["{{baseName}}"] = parameterToString(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") + if r.{{paramName}} != nil { + localVarHeaderParams["{{baseName}}"] = parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}") } {{/required}} {{/headerParams}} -{{/hasHeaderParams}} -{{#hasFormParams}} {{#formParams}} {{#isFile}} localVarFormFileName = "{{baseName}}" {{#required}} - localVarFile := {{paramName}} + localVarFile := *r.{{paramName}} {{/required}} {{^required}} var localVarFile {{dataType}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { - localVarFileOk := false - localVarFile, localVarFileOk = localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value().({{dataType}}) - if !localVarFileOk { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} should be {{dataType}}") - } + if r.{{paramName}} != nil { + localVarFile = *r.{{paramName}} } {{/required}} if localVarFile != nil { @@ -231,12 +212,12 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams {{/isFile}} {{^isFile}} {{#required}} - localVarFormParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + localVarFormParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) {{/required}} {{^required}} {{#isModel}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { - paramJson, err := parameterToJson(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value()) + if r.{{paramName}} != nil { + paramJson, err := parameterToJson(*r.{{paramName}}) if err != nil { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err } @@ -244,43 +225,23 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{/isModel}} {{^isModel}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { - localVarFormParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) + if r.{{paramName}} != nil { + localVarFormParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}")) } {{/isModel}} {{/required}} {{/isFile}} {{/formParams}} -{{/hasFormParams}} -{{#hasBodyParam}} {{#bodyParams}} // body params -{{#required}} - localVarPostBody = &{{paramName}} -{{/required}} -{{^required}} - if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() { - {{#isPrimitiveType}} - localVarPostBody = localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value() - {{/isPrimitiveType}} - {{^isPrimitiveType}} - localVarOptional{{vendorExtensions.x-exportParamName}}, localVarOptional{{vendorExtensions.x-exportParamName}}ok := localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value().({{{dataType}}}) - if !localVarOptional{{vendorExtensions.x-exportParamName}}ok { - return {{#returnType}}localVarReturnValue, {{/returnType}}nil, reportError("{{paramName}} should be {{dataType}}") - } - localVarPostBody = &localVarOptional{{vendorExtensions.x-exportParamName}} - {{/isPrimitiveType}} - } - -{{/required}} + localVarPostBody = r.{{paramName}} {{/bodyParams}} -{{/hasBodyParam}} {{#authMethods}} {{#isApiKey}} {{^isKeyInCookie}} - if ctx != nil { + if r.ctx != nil { // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if auth, ok := auth["{{keyParamName}}"]; ok { var key string if auth.Prefix != "" { @@ -300,12 +261,12 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams {{/isKeyInCookie}} {{/isApiKey}} {{/authMethods}} - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err } @@ -327,7 +288,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams if localVarHTTPResponse.StatusCode == {{{code}}} { {{/wildcard}} var v {{{dataType}}} - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr @@ -345,7 +306,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams } {{#returnType}} - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache b/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache index d7eda37d71..6b5c236d39 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/api_doc.mustache @@ -14,29 +14,28 @@ Method | HTTP request | Description ## {{{operationId}}} -> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}(ctx, {{#allParams}}{{#required}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}}) +> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}(ctx{{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-exportParamName}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute() {{{summary}}}{{#notes}} -{{{notes}}}{{/notes}} +{{{unespacedNotes}}}{{/notes}} -### Required Parameters +### Path Parameters -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#pathParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.{{/-last}}{{/allParams}}{{#allParams}}{{#required}} -**{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}} - **optional** | ***{{{nickname}}}Opts** | optional parameters | nil if no parameters +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.{{/-last}}{{/pathParams}}{{#pathParams}} +**{{paramName}}** | {{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/pathParams}} -### Optional Parameters +### Other Parameters -Optional parameters are passed through a pointer to a {{{nickname}}}Opts struct +Other parameters are passed through a pointer to a api{{{nickname}}}Request struct via the builder pattern {{#allParams}}{{#-last}} Name | Type | Description | Notes ------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}} -{{^required}} **{{paramName}}** | {{#isFile}}**optional.Interface of {{dataType}}**{{/isFile}}{{#isPrimitiveType}}**optional.{{vendorExtensions.x-optionalDataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**optional.Interface of {{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/required}}{{/allParams}}{{/hasOptionalParams}} +{{^isPathParam}} **{{paramName}}** | {{^isPrimitiveType}}{{^isFile}}[{{/isFile}}{{/isPrimitiveType}}**{{dataType}}**{{^isPrimitiveType}}{{^isFile}}]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}} | {{description}} | {{#defaultValue}}[default to {{defaultValue}}]{{/defaultValue}}{{/isPathParam}}{{/allParams}} ### Return type diff --git a/samples/client/petstore/go-experimental/auth_test.go b/samples/client/petstore/go-experimental/auth_test.go index b788cc1199..0e532aeff3 100644 --- a/samples/client/petstore/go-experimental/auth_test.go +++ b/samples/client/petstore/go-experimental/auth_test.go @@ -41,7 +41,7 @@ func TestOAuth2(t *testing.T) { PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute() if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -50,7 +50,7 @@ func TestOAuth2(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetApi.DeletePet(auth, 12992).Execute() if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -76,7 +76,7 @@ func TestBasicAuth(t *testing.T) { PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(auth, newPet) + r, err := client.PetApi.AddPet(auth).Body(newPet).Execute() if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -85,7 +85,7 @@ func TestBasicAuth(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetApi.DeletePet(auth, 12992).Execute() if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -106,7 +106,7 @@ func TestAccessToken(t *testing.T) { PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(nil, newPet) + r, err := client.PetApi.AddPet(nil).Body(newPet).Execute() if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -115,7 +115,7 @@ func TestAccessToken(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetApi.DeletePet(auth, 12992).Execute() if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -136,7 +136,7 @@ func TestAPIKeyNoPrefix(t *testing.T) { PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute() if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -145,7 +145,7 @@ func TestAPIKeyNoPrefix(t *testing.T) { t.Log(r) } - _, r, err = client.PetApi.GetPetById(auth, 12992) + _, r, err = client.PetApi.GetPetById(auth, 12992).Execute() if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -155,7 +155,7 @@ func TestAPIKeyNoPrefix(t *testing.T) { t.Errorf("APIKey Authentication is missing") } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetApi.DeletePet(auth, 12992).Execute() if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -171,7 +171,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(nil, newPet) + r, err := client.PetApi.AddPet(nil).Body(newPet).Execute() if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -180,7 +180,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { t.Log(r) } - _, r, err = client.PetApi.GetPetById(auth, 12992) + _, r, err = client.PetApi.GetPetById(auth, 12992).Execute() if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -190,7 +190,7 @@ func TestAPIKeyWithPrefix(t *testing.T) { t.Errorf("APIKey Authentication is missing") } - r, err = client.PetApi.DeletePet(auth, 12992, nil) + r, err = client.PetApi.DeletePet(auth, 12992).Execute() if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) } @@ -204,7 +204,7 @@ func TestDefaultHeader(t *testing.T) { PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute() if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -213,7 +213,7 @@ func TestDefaultHeader(t *testing.T) { t.Log(r) } - r, err = client.PetApi.DeletePet(context.Background(), 12992, nil) + r, err = client.PetApi.DeletePet(context.Background(), 12992).Execute() if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -228,7 +228,7 @@ func TestDefaultHeader(t *testing.T) { } func TestHostOverride(t *testing.T) { - _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) + _, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status(nil).Execute() if err != nil { t.Fatalf("Error while finding pets by status: %v", err) @@ -240,7 +240,7 @@ func TestHostOverride(t *testing.T) { } func TestSchemeOverride(t *testing.T) { - _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) + _, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status(nil).Execute() if err != nil { t.Fatalf("Error while finding pets by status: %v", err) diff --git a/samples/client/petstore/go-experimental/fake_api_test.go b/samples/client/petstore/go-experimental/fake_api_test.go index e97bcb4846..d27137eeac 100644 --- a/samples/client/petstore/go-experimental/fake_api_test.go +++ b/samples/client/petstore/go-experimental/fake_api_test.go @@ -1,10 +1,10 @@ package main import ( + "context" "testing" sw "./go-petstore" - "golang.org/x/net/context" ) // TestPutBodyWithFileSchema ensures a model with the name 'File' @@ -17,7 +17,7 @@ func TestPutBodyWithFileSchema(t *testing.T) { File: &sw.File{SourceURI: sw.PtrString("https://example.com/image.png")}, Files: &[]sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}} - r, err := client.FakeApi.TestBodyWithFileSchema(context.Background(), schema) + r, err := client.FakeApi.TestBodyWithFileSchema(context.Background()).Body(schema).Execute() if err != nil { t.Fatalf("Error while adding pet: %v", err) diff --git a/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go index f5e420b84f..f58c0d405f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_another_fake.go @@ -24,14 +24,36 @@ var ( // AnotherFakeApiService AnotherFakeApi service type AnotherFakeApiService service +type apiCall123TestSpecialTagsRequest struct { + ctx _context.Context + apiService *AnotherFakeApiService + body *Client +} + + +func (r apiCall123TestSpecialTagsRequest) Body(body Client) apiCall123TestSpecialTagsRequest { + r.body = &body + return r +} + /* Call123TestSpecialTags To test special tags To test special tags and operation ID starting with number * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body client model -@return Client +@return apiCall123TestSpecialTagsRequest */ -func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) apiCall123TestSpecialTagsRequest { + return apiCall123TestSpecialTagsRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return Client +*/ +func (r apiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -41,7 +63,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "AnotherFakeApiService.Call123TestSpecialTags") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -51,6 +73,10 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -70,13 +96,13 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -94,7 +120,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod } if localVarHTTPResponse.StatusCode == 200 { var v Client - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -104,7 +130,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/client/petstore/go-experimental/go-petstore/api_fake.go index e055cf26d6..0a9b9b5f74 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_fake.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_fake.go @@ -14,8 +14,8 @@ import ( _ioutil "io/ioutil" _nethttp "net/http" _neturl "net/url" - "github.com/antihax/optional" "os" + "time" "reflect" ) @@ -27,22 +27,46 @@ var ( // FakeApiService FakeApi service type FakeApiService service +type apiCreateXmlItemRequest struct { + ctx _context.Context + apiService *FakeApiService + xmlItem *XmlItem +} + + +func (r apiCreateXmlItemRequest) XmlItem(xmlItem XmlItem) apiCreateXmlItemRequest { + r.xmlItem = &xmlItem + return r +} + /* CreateXmlItem creates an XmlItem this route creates an XmlItem * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param xmlItem XmlItem Body +@return apiCreateXmlItemRequest */ -func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (*_nethttp.Response, error) { +func (a *FakeApiService) CreateXmlItem(ctx _context.Context) apiCreateXmlItemRequest { + return apiCreateXmlItemRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiCreateXmlItemRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.CreateXmlItem") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.CreateXmlItem") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -52,6 +76,10 @@ func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (* localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.xmlItem == nil { + return nil, reportError("xmlItem is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"} @@ -71,13 +99,13 @@ func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (* localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &xmlItem - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.xmlItem + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -98,21 +126,36 @@ func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (* return localVarHTTPResponse, nil } +type apiFakeOuterBooleanSerializeRequest struct { + ctx _context.Context + apiService *FakeApiService + body *bool +} -// FakeOuterBooleanSerializeOpts Optional parameters for the method 'FakeOuterBooleanSerialize' -type FakeOuterBooleanSerializeOpts struct { - Body optional.Bool + +func (r apiFakeOuterBooleanSerializeRequest) Body(body bool) apiFakeOuterBooleanSerializeRequest { + r.body = &body + return r } /* FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize Test serialization of outer boolean types * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *FakeOuterBooleanSerializeOpts - Optional Parameters: - * @param "Body" (optional.Bool) - Input boolean as post body -@return bool +@return apiFakeOuterBooleanSerializeRequest */ -func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context) apiFakeOuterBooleanSerializeRequest { + return apiFakeOuterBooleanSerializeRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return bool +*/ +func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -122,7 +165,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa localVarReturnValue bool ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterBooleanSerialize") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterBooleanSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -132,7 +175,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -151,16 +194,13 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - localVarPostBody = localVarOptionals.Body.Value() - } - - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -178,7 +218,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa } if localVarHTTPResponse.StatusCode == 200 { var v bool - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -188,7 +228,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -199,21 +239,36 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, nil } +type apiFakeOuterCompositeSerializeRequest struct { + ctx _context.Context + apiService *FakeApiService + body *OuterComposite +} -// FakeOuterCompositeSerializeOpts Optional parameters for the method 'FakeOuterCompositeSerialize' -type FakeOuterCompositeSerializeOpts struct { - Body optional.Interface + +func (r apiFakeOuterCompositeSerializeRequest) Body(body OuterComposite) apiFakeOuterCompositeSerializeRequest { + r.body = &body + return r } /* FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize Test serialization of object with outer number type * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *FakeOuterCompositeSerializeOpts - Optional Parameters: - * @param "Body" (optional.Interface of OuterComposite) - Input composite as post body -@return OuterComposite +@return apiFakeOuterCompositeSerializeRequest */ -func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context) apiFakeOuterCompositeSerializeRequest { + return apiFakeOuterCompositeSerializeRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return OuterComposite +*/ +func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -223,7 +278,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local localVarReturnValue OuterComposite ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterCompositeSerialize") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterCompositeSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -233,7 +288,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -252,20 +307,13 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - localVarOptionalBody, localVarOptionalBodyok := localVarOptionals.Body.Value().(OuterComposite) - if !localVarOptionalBodyok { - return localVarReturnValue, nil, reportError("body should be OuterComposite") - } - localVarPostBody = &localVarOptionalBody - } - - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -283,7 +331,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local } if localVarHTTPResponse.StatusCode == 200 { var v OuterComposite - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -293,7 +341,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -304,21 +352,36 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, nil } +type apiFakeOuterNumberSerializeRequest struct { + ctx _context.Context + apiService *FakeApiService + body *float32 +} -// FakeOuterNumberSerializeOpts Optional parameters for the method 'FakeOuterNumberSerialize' -type FakeOuterNumberSerializeOpts struct { - Body optional.Float32 + +func (r apiFakeOuterNumberSerializeRequest) Body(body float32) apiFakeOuterNumberSerializeRequest { + r.body = &body + return r } /* FakeOuterNumberSerialize Method for FakeOuterNumberSerialize Test serialization of outer number types * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *FakeOuterNumberSerializeOpts - Optional Parameters: - * @param "Body" (optional.Float32) - Input number as post body -@return float32 +@return apiFakeOuterNumberSerializeRequest */ -func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context) apiFakeOuterNumberSerializeRequest { + return apiFakeOuterNumberSerializeRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return float32 +*/ +func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -328,7 +391,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar localVarReturnValue float32 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterNumberSerialize") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterNumberSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -338,7 +401,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -357,16 +420,13 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - localVarPostBody = localVarOptionals.Body.Value() - } - - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -384,7 +444,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar } if localVarHTTPResponse.StatusCode == 200 { var v float32 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -394,7 +454,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -405,21 +465,36 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, nil } +type apiFakeOuterStringSerializeRequest struct { + ctx _context.Context + apiService *FakeApiService + body *string +} -// FakeOuterStringSerializeOpts Optional parameters for the method 'FakeOuterStringSerialize' -type FakeOuterStringSerializeOpts struct { - Body optional.String + +func (r apiFakeOuterStringSerializeRequest) Body(body string) apiFakeOuterStringSerializeRequest { + r.body = &body + return r } /* FakeOuterStringSerialize Method for FakeOuterStringSerialize Test serialization of outer string types * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *FakeOuterStringSerializeOpts - Optional Parameters: - * @param "Body" (optional.String) - Input string as post body -@return string +@return apiFakeOuterStringSerializeRequest */ -func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context) apiFakeOuterStringSerializeRequest { + return apiFakeOuterStringSerializeRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return string +*/ +func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -429,7 +504,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar localVarReturnValue string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterStringSerialize") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterStringSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -439,7 +514,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -458,16 +533,13 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - localVarPostBody = localVarOptionals.Body.Value() - } - - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -485,7 +557,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar } if localVarHTTPResponse.StatusCode == 200 { var v string - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -495,7 +567,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -506,23 +578,46 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, nil } +type apiTestBodyWithFileSchemaRequest struct { + ctx _context.Context + apiService *FakeApiService + body *FileSchemaTestClass +} + + +func (r apiTestBodyWithFileSchemaRequest) Body(body FileSchemaTestClass) apiTestBodyWithFileSchemaRequest { + r.body = &body + return r +} /* TestBodyWithFileSchema Method for TestBodyWithFileSchema -For this test, the body for this request much reference a schema named `File`. +For this test, the body for this request much reference a schema named `File`. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body +@return apiTestBodyWithFileSchemaRequest */ -func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error) { +func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context) apiTestBodyWithFileSchemaRequest { + return apiTestBodyWithFileSchemaRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestBodyWithFileSchema") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithFileSchema") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -532,6 +627,10 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileS localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -551,13 +650,13 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileS localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -578,23 +677,51 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileS return localVarHTTPResponse, nil } +type apiTestBodyWithQueryParamsRequest struct { + ctx _context.Context + apiService *FakeApiService + query *string + body *User +} + + +func (r apiTestBodyWithQueryParamsRequest) Query(query string) apiTestBodyWithQueryParamsRequest { + r.query = &query + return r +} + +func (r apiTestBodyWithQueryParamsRequest) Body(body User) apiTestBodyWithQueryParamsRequest { + r.body = &body + return r +} /* TestBodyWithQueryParams Method for TestBodyWithQueryParams * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param query - * @param body +@return apiTestBodyWithQueryParamsRequest */ -func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error) { +func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context) apiTestBodyWithQueryParamsRequest { + return apiTestBodyWithQueryParamsRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestBodyWithQueryParams") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithQueryParams") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -604,8 +731,16 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.query == nil { + return nil, reportError("query is required and must be specified") + } + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } - localVarQueryParams.Add("query", parameterToString(query, "")) + localVarQueryParams.Add("query", parameterToString(*r.query, "")) // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -624,13 +759,13 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -651,15 +786,36 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str return localVarHTTPResponse, nil } +type apiTestClientModelRequest struct { + ctx _context.Context + apiService *FakeApiService + body *Client +} + + +func (r apiTestClientModelRequest) Body(body Client) apiTestClientModelRequest { + r.body = &body + return r +} /* TestClientModel To test \"client\" model -To test \"client\" model +To test "client" model * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body client model -@return Client +@return apiTestClientModelRequest */ -func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *FakeApiService) TestClientModel(ctx _context.Context) apiTestClientModelRequest { + return apiTestClientModelRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return Client +*/ +func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -669,7 +825,7 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestClientModel") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestClientModel") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -679,6 +835,10 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -698,13 +858,13 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -722,7 +882,7 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli } if localVarHTTPResponse.StatusCode == 200 { var v Client - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -732,7 +892,7 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -743,51 +903,127 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Cli return localVarReturnValue, localVarHTTPResponse, nil } +type apiTestEndpointParametersRequest struct { + ctx _context.Context + apiService *FakeApiService + number *float32 + double *float64 + patternWithoutDelimiter *string + byte_ *string + integer *int32 + int32_ *int32 + int64_ *int64 + float *float32 + string_ *string + binary **os.File + date *string + dateTime *time.Time + password *string + callback *string +} -// TestEndpointParametersOpts Optional parameters for the method 'TestEndpointParameters' -type TestEndpointParametersOpts struct { - Integer optional.Int32 - Int32_ optional.Int32 - Int64_ optional.Int64 - Float optional.Float32 - String_ optional.String - Binary optional.Interface - Date optional.String - DateTime optional.Time - Password optional.String - Callback optional.String + +func (r apiTestEndpointParametersRequest) Number(number float32) apiTestEndpointParametersRequest { + r.number = &number + return r +} + +func (r apiTestEndpointParametersRequest) Double(double float64) apiTestEndpointParametersRequest { + r.double = &double + return r +} + +func (r apiTestEndpointParametersRequest) PatternWithoutDelimiter(patternWithoutDelimiter string) apiTestEndpointParametersRequest { + r.patternWithoutDelimiter = &patternWithoutDelimiter + return r +} + +func (r apiTestEndpointParametersRequest) Byte_(byte_ string) apiTestEndpointParametersRequest { + r.byte_ = &byte_ + return r +} + +func (r apiTestEndpointParametersRequest) Integer(integer int32) apiTestEndpointParametersRequest { + r.integer = &integer + return r +} + +func (r apiTestEndpointParametersRequest) Int32_(int32_ int32) apiTestEndpointParametersRequest { + r.int32_ = &int32_ + return r +} + +func (r apiTestEndpointParametersRequest) Int64_(int64_ int64) apiTestEndpointParametersRequest { + r.int64_ = &int64_ + return r +} + +func (r apiTestEndpointParametersRequest) Float(float float32) apiTestEndpointParametersRequest { + r.float = &float + return r +} + +func (r apiTestEndpointParametersRequest) String_(string_ string) apiTestEndpointParametersRequest { + r.string_ = &string_ + return r +} + +func (r apiTestEndpointParametersRequest) Binary(binary *os.File) apiTestEndpointParametersRequest { + r.binary = &binary + return r +} + +func (r apiTestEndpointParametersRequest) Date(date string) apiTestEndpointParametersRequest { + r.date = &date + return r +} + +func (r apiTestEndpointParametersRequest) DateTime(dateTime time.Time) apiTestEndpointParametersRequest { + r.dateTime = &dateTime + return r +} + +func (r apiTestEndpointParametersRequest) Password(password string) apiTestEndpointParametersRequest { + r.password = &password + return r +} + +func (r apiTestEndpointParametersRequest) Callback(callback string) apiTestEndpointParametersRequest { + r.callback = &callback + return r } /* TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param number None - * @param double None - * @param patternWithoutDelimiter None - * @param byte_ None - * @param optional nil or *TestEndpointParametersOpts - Optional Parameters: - * @param "Integer" (optional.Int32) - None - * @param "Int32_" (optional.Int32) - None - * @param "Int64_" (optional.Int64) - None - * @param "Float" (optional.Float32) - None - * @param "String_" (optional.String) - None - * @param "Binary" (optional.Interface of *os.File) - None - * @param "Date" (optional.String) - None - * @param "DateTime" (optional.Time) - None - * @param "Password" (optional.String) - None - * @param "Callback" (optional.String) - None +@return apiTestEndpointParametersRequest */ -func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { +func (a *FakeApiService) TestEndpointParameters(ctx _context.Context) apiTestEndpointParametersRequest { + return apiTestEndpointParametersRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestEndpointParameters") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEndpointParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -797,19 +1033,35 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number flo localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if number < 32.1 { + + if r.number == nil { + return nil, reportError("number is required and must be specified") + } + if *r.number < 32.1 { return nil, reportError("number must be greater than 32.1") } - if number > 543.2 { + if *r.number > 543.2 { return nil, reportError("number must be less than 543.2") } - if double < 67.8 { + + if r.double == nil { + return nil, reportError("double is required and must be specified") + } + if *r.double < 67.8 { return nil, reportError("double must be greater than 67.8") } - if double > 123.4 { + if *r.double > 123.4 { return nil, reportError("double must be less than 123.4") } - + + if r.patternWithoutDelimiter == nil { + return nil, reportError("patternWithoutDelimiter is required and must be specified") + } + + if r.byte_ == nil { + return nil, reportError("byte_ is required and must be specified") + } + // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -827,33 +1079,29 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number flo if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.Integer.IsSet() { - localVarFormParams.Add("integer", parameterToString(localVarOptionals.Integer.Value(), "")) + if r.integer != nil { + localVarFormParams.Add("integer", parameterToString(*r.integer, "")) } - if localVarOptionals != nil && localVarOptionals.Int32_.IsSet() { - localVarFormParams.Add("int32", parameterToString(localVarOptionals.Int32_.Value(), "")) + if r.int32_ != nil { + localVarFormParams.Add("int32", parameterToString(*r.int32_, "")) } - if localVarOptionals != nil && localVarOptionals.Int64_.IsSet() { - localVarFormParams.Add("int64", parameterToString(localVarOptionals.Int64_.Value(), "")) + if r.int64_ != nil { + localVarFormParams.Add("int64", parameterToString(*r.int64_, "")) } - localVarFormParams.Add("number", parameterToString(number, "")) - if localVarOptionals != nil && localVarOptionals.Float.IsSet() { - localVarFormParams.Add("float", parameterToString(localVarOptionals.Float.Value(), "")) + localVarFormParams.Add("number", parameterToString(*r.number, "")) + if r.float != nil { + localVarFormParams.Add("float", parameterToString(*r.float, "")) } - localVarFormParams.Add("double", parameterToString(double, "")) - if localVarOptionals != nil && localVarOptionals.String_.IsSet() { - localVarFormParams.Add("string", parameterToString(localVarOptionals.String_.Value(), "")) + localVarFormParams.Add("double", parameterToString(*r.double, "")) + if r.string_ != nil { + localVarFormParams.Add("string", parameterToString(*r.string_, "")) } - localVarFormParams.Add("pattern_without_delimiter", parameterToString(patternWithoutDelimiter, "")) - localVarFormParams.Add("byte", parameterToString(byte_, "")) + localVarFormParams.Add("pattern_without_delimiter", parameterToString(*r.patternWithoutDelimiter, "")) + localVarFormParams.Add("byte", parameterToString(*r.byte_, "")) localVarFormFileName = "binary" var localVarFile *os.File - if localVarOptionals != nil && localVarOptionals.Binary.IsSet() { - localVarFileOk := false - localVarFile, localVarFileOk = localVarOptionals.Binary.Value().(*os.File) - if !localVarFileOk { - return nil, reportError("binary should be *os.File") - } + if r.binary != nil { + localVarFile = *r.binary } if localVarFile != nil { fbs, _ := _ioutil.ReadAll(localVarFile) @@ -861,24 +1109,24 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number flo localVarFileName = localVarFile.Name() localVarFile.Close() } - if localVarOptionals != nil && localVarOptionals.Date.IsSet() { - localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), "")) + if r.date != nil { + localVarFormParams.Add("date", parameterToString(*r.date, "")) } - if localVarOptionals != nil && localVarOptionals.DateTime.IsSet() { - localVarFormParams.Add("dateTime", parameterToString(localVarOptionals.DateTime.Value(), "")) + if r.dateTime != nil { + localVarFormParams.Add("dateTime", parameterToString(*r.dateTime, "")) } - if localVarOptionals != nil && localVarOptionals.Password.IsSet() { - localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), "")) + if r.password != nil { + localVarFormParams.Add("password", parameterToString(*r.password, "")) } - if localVarOptionals != nil && localVarOptionals.Callback.IsSet() { - localVarFormParams.Add("callback", parameterToString(localVarOptionals.Callback.Value(), "")) + if r.callback != nil { + localVarFormParams.Add("callback", parameterToString(*r.callback, "")) } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -899,43 +1147,88 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number flo return localVarHTTPResponse, nil } +type apiTestEnumParametersRequest struct { + ctx _context.Context + apiService *FakeApiService + enumHeaderStringArray *[]string + enumHeaderString *string + enumQueryStringArray *[]string + enumQueryString *string + enumQueryInteger *int32 + enumQueryDouble *float64 + enumFormStringArray *[]string + enumFormString *string +} -// TestEnumParametersOpts Optional parameters for the method 'TestEnumParameters' -type TestEnumParametersOpts struct { - EnumHeaderStringArray optional.Interface - EnumHeaderString optional.String - EnumQueryStringArray optional.Interface - EnumQueryString optional.String - EnumQueryInteger optional.Int32 - EnumQueryDouble optional.Float64 - EnumFormStringArray optional.Interface - EnumFormString optional.String + +func (r apiTestEnumParametersRequest) EnumHeaderStringArray(enumHeaderStringArray []string) apiTestEnumParametersRequest { + r.enumHeaderStringArray = &enumHeaderStringArray + return r +} + +func (r apiTestEnumParametersRequest) EnumHeaderString(enumHeaderString string) apiTestEnumParametersRequest { + r.enumHeaderString = &enumHeaderString + return r +} + +func (r apiTestEnumParametersRequest) EnumQueryStringArray(enumQueryStringArray []string) apiTestEnumParametersRequest { + r.enumQueryStringArray = &enumQueryStringArray + return r +} + +func (r apiTestEnumParametersRequest) EnumQueryString(enumQueryString string) apiTestEnumParametersRequest { + r.enumQueryString = &enumQueryString + return r +} + +func (r apiTestEnumParametersRequest) EnumQueryInteger(enumQueryInteger int32) apiTestEnumParametersRequest { + r.enumQueryInteger = &enumQueryInteger + return r +} + +func (r apiTestEnumParametersRequest) EnumQueryDouble(enumQueryDouble float64) apiTestEnumParametersRequest { + r.enumQueryDouble = &enumQueryDouble + return r +} + +func (r apiTestEnumParametersRequest) EnumFormStringArray(enumFormStringArray []string) apiTestEnumParametersRequest { + r.enumFormStringArray = &enumFormStringArray + return r +} + +func (r apiTestEnumParametersRequest) EnumFormString(enumFormString string) apiTestEnumParametersRequest { + r.enumFormString = &enumFormString + return r } /* TestEnumParameters To test enum parameters To test enum parameters * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TestEnumParametersOpts - Optional Parameters: - * @param "EnumHeaderStringArray" (optional.Interface of []string) - Header parameter enum test (string array) - * @param "EnumHeaderString" (optional.String) - Header parameter enum test (string) - * @param "EnumQueryStringArray" (optional.Interface of []string) - Query parameter enum test (string array) - * @param "EnumQueryString" (optional.String) - Query parameter enum test (string) - * @param "EnumQueryInteger" (optional.Int32) - Query parameter enum test (double) - * @param "EnumQueryDouble" (optional.Float64) - Query parameter enum test (double) - * @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array) - * @param "EnumFormString" (optional.String) - Form parameter enum test (string) +@return apiTestEnumParametersRequest */ -func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { +func (a *FakeApiService) TestEnumParameters(ctx _context.Context) apiTestEnumParametersRequest { + return apiTestEnumParametersRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestEnumParameters") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEnumParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -945,18 +1238,18 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOption localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - - if localVarOptionals != nil && localVarOptionals.EnumQueryStringArray.IsSet() { - localVarQueryParams.Add("enum_query_string_array", parameterToString(localVarOptionals.EnumQueryStringArray.Value(), "csv")) + + if r.enumQueryStringArray != nil { + localVarQueryParams.Add("enum_query_string_array", parameterToString(*r.enumQueryStringArray, "csv")) } - if localVarOptionals != nil && localVarOptionals.EnumQueryString.IsSet() { - localVarQueryParams.Add("enum_query_string", parameterToString(localVarOptionals.EnumQueryString.Value(), "")) + if r.enumQueryString != nil { + localVarQueryParams.Add("enum_query_string", parameterToString(*r.enumQueryString, "")) } - if localVarOptionals != nil && localVarOptionals.EnumQueryInteger.IsSet() { - localVarQueryParams.Add("enum_query_integer", parameterToString(localVarOptionals.EnumQueryInteger.Value(), "")) + if r.enumQueryInteger != nil { + localVarQueryParams.Add("enum_query_integer", parameterToString(*r.enumQueryInteger, "")) } - if localVarOptionals != nil && localVarOptionals.EnumQueryDouble.IsSet() { - localVarQueryParams.Add("enum_query_double", parameterToString(localVarOptionals.EnumQueryDouble.Value(), "")) + if r.enumQueryDouble != nil { + localVarQueryParams.Add("enum_query_double", parameterToString(*r.enumQueryDouble, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -975,24 +1268,24 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOption if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.EnumHeaderStringArray.IsSet() { - localVarHeaderParams["enum_header_string_array"] = parameterToString(localVarOptionals.EnumHeaderStringArray.Value(), "csv") + if r.enumHeaderStringArray != nil { + localVarHeaderParams["enum_header_string_array"] = parameterToString(*r.enumHeaderStringArray, "csv") } - if localVarOptionals != nil && localVarOptionals.EnumHeaderString.IsSet() { - localVarHeaderParams["enum_header_string"] = parameterToString(localVarOptionals.EnumHeaderString.Value(), "") + if r.enumHeaderString != nil { + localVarHeaderParams["enum_header_string"] = parameterToString(*r.enumHeaderString, "") } - if localVarOptionals != nil && localVarOptionals.EnumFormStringArray.IsSet() { - localVarFormParams.Add("enum_form_string_array", parameterToString(localVarOptionals.EnumFormStringArray.Value(), "csv")) + if r.enumFormStringArray != nil { + localVarFormParams.Add("enum_form_string_array", parameterToString(*r.enumFormStringArray, "csv")) } - if localVarOptionals != nil && localVarOptionals.EnumFormString.IsSet() { - localVarFormParams.Add("enum_form_string", parameterToString(localVarOptionals.EnumFormString.Value(), "")) + if r.enumFormString != nil { + localVarFormParams.Add("enum_form_string", parameterToString(*r.enumFormString, "")) } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -1013,36 +1306,76 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOption return localVarHTTPResponse, nil } +type apiTestGroupParametersRequest struct { + ctx _context.Context + apiService *FakeApiService + requiredStringGroup *int32 + requiredBooleanGroup *bool + requiredInt64Group *int64 + stringGroup *int32 + booleanGroup *bool + int64Group *int64 +} -// TestGroupParametersOpts Optional parameters for the method 'TestGroupParameters' -type TestGroupParametersOpts struct { - StringGroup optional.Int32 - BooleanGroup optional.Bool - Int64Group optional.Int64 + +func (r apiTestGroupParametersRequest) RequiredStringGroup(requiredStringGroup int32) apiTestGroupParametersRequest { + r.requiredStringGroup = &requiredStringGroup + return r +} + +func (r apiTestGroupParametersRequest) RequiredBooleanGroup(requiredBooleanGroup bool) apiTestGroupParametersRequest { + r.requiredBooleanGroup = &requiredBooleanGroup + return r +} + +func (r apiTestGroupParametersRequest) RequiredInt64Group(requiredInt64Group int64) apiTestGroupParametersRequest { + r.requiredInt64Group = &requiredInt64Group + return r +} + +func (r apiTestGroupParametersRequest) StringGroup(stringGroup int32) apiTestGroupParametersRequest { + r.stringGroup = &stringGroup + return r +} + +func (r apiTestGroupParametersRequest) BooleanGroup(booleanGroup bool) apiTestGroupParametersRequest { + r.booleanGroup = &booleanGroup + return r +} + +func (r apiTestGroupParametersRequest) Int64Group(int64Group int64) apiTestGroupParametersRequest { + r.int64Group = &int64Group + return r } /* TestGroupParameters Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param requiredStringGroup Required String in group parameters - * @param requiredBooleanGroup Required Boolean in group parameters - * @param requiredInt64Group Required Integer in group parameters - * @param optional nil or *TestGroupParametersOpts - Optional Parameters: - * @param "StringGroup" (optional.Int32) - String in group parameters - * @param "BooleanGroup" (optional.Bool) - Boolean in group parameters - * @param "Int64Group" (optional.Int64) - Integer in group parameters +@return apiTestGroupParametersRequest */ -func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { +func (a *FakeApiService) TestGroupParameters(ctx _context.Context) apiTestGroupParametersRequest { + return apiTestGroupParametersRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestGroupParameters") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestGroupParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1052,14 +1385,26 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - - localVarQueryParams.Add("required_string_group", parameterToString(requiredStringGroup, "")) - localVarQueryParams.Add("required_int64_group", parameterToString(requiredInt64Group, "")) - if localVarOptionals != nil && localVarOptionals.StringGroup.IsSet() { - localVarQueryParams.Add("string_group", parameterToString(localVarOptionals.StringGroup.Value(), "")) + + if r.requiredStringGroup == nil { + return nil, reportError("requiredStringGroup is required and must be specified") } - if localVarOptionals != nil && localVarOptionals.Int64Group.IsSet() { - localVarQueryParams.Add("int64_group", parameterToString(localVarOptionals.Int64Group.Value(), "")) + + if r.requiredBooleanGroup == nil { + return nil, reportError("requiredBooleanGroup is required and must be specified") + } + + if r.requiredInt64Group == nil { + return nil, reportError("requiredInt64Group is required and must be specified") + } + + localVarQueryParams.Add("required_string_group", parameterToString(*r.requiredStringGroup, "")) + localVarQueryParams.Add("required_int64_group", parameterToString(*r.requiredInt64Group, "")) + if r.stringGroup != nil { + localVarQueryParams.Add("string_group", parameterToString(*r.stringGroup, "")) + } + if r.int64Group != nil { + localVarQueryParams.Add("int64_group", parameterToString(*r.int64Group, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1078,16 +1423,16 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - localVarHeaderParams["required_boolean_group"] = parameterToString(requiredBooleanGroup, "") - if localVarOptionals != nil && localVarOptionals.BooleanGroup.IsSet() { - localVarHeaderParams["boolean_group"] = parameterToString(localVarOptionals.BooleanGroup.Value(), "") + localVarHeaderParams["required_boolean_group"] = parameterToString(*r.requiredBooleanGroup, "") + if r.booleanGroup != nil { + localVarHeaderParams["boolean_group"] = parameterToString(*r.booleanGroup, "") } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -1108,22 +1453,45 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin return localVarHTTPResponse, nil } +type apiTestInlineAdditionalPropertiesRequest struct { + ctx _context.Context + apiService *FakeApiService + param *map[string]string +} + + +func (r apiTestInlineAdditionalPropertiesRequest) Param(param map[string]string) apiTestInlineAdditionalPropertiesRequest { + r.param = ¶m + return r +} /* TestInlineAdditionalProperties test inline additionalProperties * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param param request body +@return apiTestInlineAdditionalPropertiesRequest */ -func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error) { +func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context) apiTestInlineAdditionalPropertiesRequest { + return apiTestInlineAdditionalPropertiesRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestInlineAdditionalProperties") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestInlineAdditionalProperties") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1133,6 +1501,10 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, pa localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.param == nil { + return nil, reportError("param is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -1152,13 +1524,13 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, pa localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = ¶m - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.param + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -1179,23 +1551,51 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, pa return localVarHTTPResponse, nil } +type apiTestJsonFormDataRequest struct { + ctx _context.Context + apiService *FakeApiService + param *string + param2 *string +} + + +func (r apiTestJsonFormDataRequest) Param(param string) apiTestJsonFormDataRequest { + r.param = ¶m + return r +} + +func (r apiTestJsonFormDataRequest) Param2(param2 string) apiTestJsonFormDataRequest { + r.param2 = ¶m2 + return r +} /* TestJsonFormData test json serialization of form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param param field1 - * @param param2 field2 +@return apiTestJsonFormDataRequest */ -func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { +func (a *FakeApiService) TestJsonFormData(ctx _context.Context) apiTestJsonFormDataRequest { + return apiTestJsonFormDataRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestJsonFormData") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestJsonFormData") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1205,6 +1605,14 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.param == nil { + return nil, reportError("param is required and must be specified") + } + + if r.param2 == nil { + return nil, reportError("param2 is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -1223,14 +1631,14 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - localVarFormParams.Add("param", parameterToString(param, "")) - localVarFormParams.Add("param2", parameterToString(param2, "")) - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarFormParams.Add("param", parameterToString(*r.param, "")) + localVarFormParams.Add("param2", parameterToString(*r.param2, "")) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -1251,27 +1659,70 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa return localVarHTTPResponse, nil } +type apiTestQueryParameterCollectionFormatRequest struct { + ctx _context.Context + apiService *FakeApiService + pipe *[]string + ioutil *[]string + http *[]string + url *[]string + context *[]string +} + + +func (r apiTestQueryParameterCollectionFormatRequest) Pipe(pipe []string) apiTestQueryParameterCollectionFormatRequest { + r.pipe = &pipe + return r +} + +func (r apiTestQueryParameterCollectionFormatRequest) Ioutil(ioutil []string) apiTestQueryParameterCollectionFormatRequest { + r.ioutil = &ioutil + return r +} + +func (r apiTestQueryParameterCollectionFormatRequest) Http(http []string) apiTestQueryParameterCollectionFormatRequest { + r.http = &http + return r +} + +func (r apiTestQueryParameterCollectionFormatRequest) Url(url []string) apiTestQueryParameterCollectionFormatRequest { + r.url = &url + return r +} + +func (r apiTestQueryParameterCollectionFormatRequest) Context(context []string) apiTestQueryParameterCollectionFormatRequest { + r.context = &context + return r +} /* TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat To test the collection format in query parameters * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param pipe - * @param ioutil - * @param http - * @param url - * @param context +@return apiTestQueryParameterCollectionFormatRequest */ -func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) { +func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context) apiTestQueryParameterCollectionFormatRequest { + return apiTestQueryParameterCollectionFormatRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestQueryParameterCollectionFormat") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryParameterCollectionFormat") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1281,12 +1732,32 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.pipe == nil { + return nil, reportError("pipe is required and must be specified") + } + + if r.ioutil == nil { + return nil, reportError("ioutil is required and must be specified") + } + + if r.http == nil { + return nil, reportError("http is required and must be specified") + } + + if r.url == nil { + return nil, reportError("url is required and must be specified") + } + + if r.context == nil { + return nil, reportError("context is required and must be specified") + } - localVarQueryParams.Add("pipe", parameterToString(pipe, "csv")) - localVarQueryParams.Add("ioutil", parameterToString(ioutil, "csv")) - localVarQueryParams.Add("http", parameterToString(http, "space")) - localVarQueryParams.Add("url", parameterToString(url, "csv")) - t:=context + localVarQueryParams.Add("pipe", parameterToString(*r.pipe, "csv")) + localVarQueryParams.Add("ioutil", parameterToString(*r.ioutil, "csv")) + localVarQueryParams.Add("http", parameterToString(*r.http, "space")) + localVarQueryParams.Add("url", parameterToString(*r.url, "csv")) + t := *r.context if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { @@ -1312,12 +1783,12 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } diff --git a/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go index ef129021d8..e8d6b36879 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go @@ -24,14 +24,36 @@ var ( // FakeClassnameTags123ApiService FakeClassnameTags123Api service type FakeClassnameTags123ApiService service +type apiTestClassnameRequest struct { + ctx _context.Context + apiService *FakeClassnameTags123ApiService + body *Client +} + + +func (r apiTestClassnameRequest) Body(body Client) apiTestClassnameRequest { + r.body = &body + return r +} + /* TestClassname To test class name in snake case To test class name in snake case * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body client model -@return Client +@return apiTestClassnameRequest */ -func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) { +func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) apiTestClassnameRequest { + return apiTestClassnameRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return Client +*/ +func (r apiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -41,7 +63,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeClassnameTags123ApiService.TestClassname") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -51,6 +73,10 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -70,10 +96,10 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - if ctx != nil { + localVarPostBody = r.body + if r.ctx != nil { // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if auth, ok := auth["api_key_query"]; ok { var key string if auth.Prefix != "" { @@ -85,12 +111,12 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod } } } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -108,7 +134,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod } if localVarHTTPResponse.StatusCode == 200 { var v Client - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -118,7 +144,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, bod return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/samples/client/petstore/go-experimental/go-petstore/api_pet.go b/samples/client/petstore/go-experimental/go-petstore/api_pet.go index 9b397dabb9..94f6e4fa9d 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_pet.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_pet.go @@ -15,7 +15,6 @@ import ( _nethttp "net/http" _neturl "net/url" "strings" - "github.com/antihax/optional" "os" ) @@ -27,21 +26,45 @@ var ( // PetApiService PetApi service type PetApiService service +type apiAddPetRequest struct { + ctx _context.Context + apiService *PetApiService + body *Pet +} + + +func (r apiAddPetRequest) Body(body Pet) apiAddPetRequest { + r.body = &body + return r +} + /* AddPet Add a new pet to the store * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Pet object that needs to be added to the store +@return apiAddPetRequest */ -func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { +func (a *PetApiService) AddPet(ctx _context.Context) apiAddPetRequest { + return apiAddPetRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiAddPetRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.AddPet") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -51,6 +74,10 @@ func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Respon localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json", "application/xml"} @@ -70,13 +97,13 @@ func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Respon localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -97,40 +124,60 @@ func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Respon return localVarHTTPResponse, nil } +type apiDeletePetRequest struct { + ctx _context.Context + apiService *PetApiService + petId int64 + apiKey *string +} -// DeletePetOpts Optional parameters for the method 'DeletePet' -type DeletePetOpts struct { - ApiKey optional.String + +func (r apiDeletePetRequest) ApiKey(apiKey string) apiDeletePetRequest { + r.apiKey = &apiKey + return r } /* DeletePet Deletes a pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId Pet id to delete - * @param optional nil or *DeletePetOpts - Optional Parameters: - * @param "ApiKey" (optional.String) - +@return apiDeletePetRequest */ -func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { +func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) apiDeletePetRequest { + return apiDeletePetRequest{ + apiService: a, + ctx: ctx, + petId: petId, + } +} + +/* +Execute executes the request + +*/ +func (r apiDeletePetRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.DeletePet") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(r.petId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -148,15 +195,15 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() { - localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.Value(), "") + if r.apiKey != nil { + localVarHeaderParams["api_key"] = parameterToString(*r.apiKey, "") } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -177,15 +224,36 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt return localVarHTTPResponse, nil } +type apiFindPetsByStatusRequest struct { + ctx _context.Context + apiService *PetApiService + status *[]string +} + + +func (r apiFindPetsByStatusRequest) Status(status []string) apiFindPetsByStatusRequest { + r.status = &status + return r +} /* FindPetsByStatus Finds Pets by status Multiple status values can be provided with comma separated strings * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param status Status values that need to be considered for filter -@return []Pet +@return apiFindPetsByStatusRequest */ -func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetApiService) FindPetsByStatus(ctx _context.Context) apiFindPetsByStatusRequest { + return apiFindPetsByStatusRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return []Pet +*/ +func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -195,7 +263,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) localVarReturnValue []Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.FindPetsByStatus") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -205,8 +273,12 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.status == nil { + return localVarReturnValue, nil, reportError("status is required and must be specified") + } - localVarQueryParams.Add("status", parameterToString(status, "csv")) + localVarQueryParams.Add("status", parameterToString(*r.status, "csv")) // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -224,12 +296,12 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -247,7 +319,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) } if localVarHTTPResponse.StatusCode == 200 { var v []Pet - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -258,7 +330,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -269,15 +341,36 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) return localVarReturnValue, localVarHTTPResponse, nil } +type apiFindPetsByTagsRequest struct { + ctx _context.Context + apiService *PetApiService + tags *[]string +} + + +func (r apiFindPetsByTagsRequest) Tags(tags []string) apiFindPetsByTagsRequest { + r.tags = &tags + return r +} /* FindPetsByTags Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param tags Tags to filter by -@return []Pet +@return apiFindPetsByTagsRequest */ -func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetApiService) FindPetsByTags(ctx _context.Context) apiFindPetsByTagsRequest { + return apiFindPetsByTagsRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return []Pet +*/ +func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -287,7 +380,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P localVarReturnValue []Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.FindPetsByTags") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -297,8 +390,12 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.tags == nil { + return localVarReturnValue, nil, reportError("tags is required and must be specified") + } - localVarQueryParams.Add("tags", parameterToString(tags, "csv")) + localVarQueryParams.Add("tags", parameterToString(*r.tags, "csv")) // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -316,12 +413,12 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -339,7 +436,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P } if localVarHTTPResponse.StatusCode == 200 { var v []Pet - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -350,7 +447,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -361,15 +458,33 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P return localVarReturnValue, localVarHTTPResponse, nil } +type apiGetPetByIdRequest struct { + ctx _context.Context + apiService *PetApiService + petId int64 +} + /* GetPetById Find pet by ID Returns a single pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId ID of pet to return -@return Pet +@return apiGetPetByIdRequest */ -func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) { +func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) apiGetPetByIdRequest { + return apiGetPetByIdRequest{ + apiService: a, + ctx: ctx, + petId: petId, + } +} + +/* +Execute executes the request + @return Pet +*/ +func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -379,17 +494,18 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne localVarReturnValue Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.GetPetById") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(r.petId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -408,9 +524,9 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if ctx != nil { + if r.ctx != nil { // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if auth, ok := auth["api_key"]; ok { var key string if auth.Prefix != "" { @@ -422,12 +538,12 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne } } } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -445,7 +561,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne } if localVarHTTPResponse.StatusCode == 200 { var v Pet - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -456,7 +572,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -467,22 +583,45 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne return localVarReturnValue, localVarHTTPResponse, nil } +type apiUpdatePetRequest struct { + ctx _context.Context + apiService *PetApiService + body *Pet +} + + +func (r apiUpdatePetRequest) Body(body Pet) apiUpdatePetRequest { + r.body = &body + return r +} /* UpdatePet Update an existing pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Pet object that needs to be added to the store +@return apiUpdatePetRequest */ -func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error) { +func (a *PetApiService) UpdatePet(ctx _context.Context) apiUpdatePetRequest { + return apiUpdatePetRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiUpdatePetRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UpdatePet") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -492,6 +631,10 @@ func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Res localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json", "application/xml"} @@ -511,13 +654,13 @@ func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Res localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -538,42 +681,66 @@ func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Res return localVarHTTPResponse, nil } +type apiUpdatePetWithFormRequest struct { + ctx _context.Context + apiService *PetApiService + petId int64 + name *string + status *string +} -// UpdatePetWithFormOpts Optional parameters for the method 'UpdatePetWithForm' -type UpdatePetWithFormOpts struct { - Name optional.String - Status optional.String + +func (r apiUpdatePetWithFormRequest) Name(name string) apiUpdatePetWithFormRequest { + r.name = &name + return r +} + +func (r apiUpdatePetWithFormRequest) Status(status string) apiUpdatePetWithFormRequest { + r.status = &status + return r } /* UpdatePetWithForm Updates a pet in the store with form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId ID of pet that needs to be updated - * @param optional nil or *UpdatePetWithFormOpts - Optional Parameters: - * @param "Name" (optional.String) - Updated name of the pet - * @param "Status" (optional.String) - Updated status of the pet +@return apiUpdatePetWithFormRequest */ -func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { +func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) apiUpdatePetWithFormRequest { + return apiUpdatePetWithFormRequest{ + apiService: a, + ctx: ctx, + petId: petId, + } +} + +/* +Execute executes the request + +*/ +func (r apiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UpdatePetWithForm") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(r.petId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + + // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -591,18 +758,18 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, loc if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.Name.IsSet() { - localVarFormParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) + if r.name != nil { + localVarFormParams.Add("name", parameterToString(*r.name, "")) } - if localVarOptionals != nil && localVarOptionals.Status.IsSet() { - localVarFormParams.Add("status", parameterToString(localVarOptionals.Status.Value(), "")) + if r.status != nil { + localVarFormParams.Add("status", parameterToString(*r.status, "")) } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -623,23 +790,44 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, loc return localVarHTTPResponse, nil } +type apiUploadFileRequest struct { + ctx _context.Context + apiService *PetApiService + petId int64 + additionalMetadata *string + file **os.File +} -// UploadFileOpts Optional parameters for the method 'UploadFile' -type UploadFileOpts struct { - AdditionalMetadata optional.String - File optional.Interface + +func (r apiUploadFileRequest) AdditionalMetadata(additionalMetadata string) apiUploadFileRequest { + r.additionalMetadata = &additionalMetadata + return r +} + +func (r apiUploadFileRequest) File(file *os.File) apiUploadFileRequest { + r.file = &file + return r } /* UploadFile uploads an image * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId ID of pet to update - * @param optional nil or *UploadFileOpts - Optional Parameters: - * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server - * @param "File" (optional.Interface of *os.File) - file to upload -@return ApiResponse +@return apiUploadFileRequest */ -func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) apiUploadFileRequest { + return apiUploadFileRequest{ + apiService: a, + ctx: ctx, + petId: petId, + } +} + +/* +Execute executes the request + @return ApiResponse +*/ +func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -649,18 +837,19 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp localVarReturnValue ApiResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UploadFile") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}/uploadImage" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(r.petId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + + // to determine the Content-Type header localVarHTTPContentTypes := []string{"multipart/form-data"} @@ -678,17 +867,13 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { - localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) + if r.additionalMetadata != nil { + localVarFormParams.Add("additionalMetadata", parameterToString(*r.additionalMetadata, "")) } localVarFormFileName = "file" var localVarFile *os.File - if localVarOptionals != nil && localVarOptionals.File.IsSet() { - localVarFileOk := false - localVarFile, localVarFileOk = localVarOptionals.File.Value().(*os.File) - if !localVarFileOk { - return localVarReturnValue, nil, reportError("file should be *os.File") - } + if r.file != nil { + localVarFile = *r.file } if localVarFile != nil { fbs, _ := _ioutil.ReadAll(localVarFile) @@ -696,12 +881,12 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp localVarFileName = localVarFile.Name() localVarFile.Close() } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -719,7 +904,7 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp } if localVarHTTPResponse.StatusCode == 200 { var v ApiResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -729,7 +914,7 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -740,22 +925,44 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, nil } +type apiUploadFileWithRequiredFileRequest struct { + ctx _context.Context + apiService *PetApiService + petId int64 + requiredFile **os.File + additionalMetadata *string +} -// UploadFileWithRequiredFileOpts Optional parameters for the method 'UploadFileWithRequiredFile' -type UploadFileWithRequiredFileOpts struct { - AdditionalMetadata optional.String + +func (r apiUploadFileWithRequiredFileRequest) RequiredFile(requiredFile *os.File) apiUploadFileWithRequiredFileRequest { + r.requiredFile = &requiredFile + return r +} + +func (r apiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetadata string) apiUploadFileWithRequiredFileRequest { + r.additionalMetadata = &additionalMetadata + return r } /* UploadFileWithRequiredFile uploads an image (required) * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId ID of pet to update - * @param requiredFile file to upload - * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: - * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server -@return ApiResponse +@return apiUploadFileWithRequiredFileRequest */ -func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64) apiUploadFileWithRequiredFileRequest { + return apiUploadFileWithRequiredFileRequest{ + apiService: a, + ctx: ctx, + petId: petId, + } +} + +/* +Execute executes the request + @return ApiResponse +*/ +func (r apiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -765,18 +972,23 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i localVarReturnValue ApiResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UploadFileWithRequiredFile") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(r.petId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + + + if r.requiredFile == nil { + return localVarReturnValue, nil, reportError("requiredFile is required and must be specified") + } + // to determine the Content-Type header localVarHTTPContentTypes := []string{"multipart/form-data"} @@ -794,23 +1006,23 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { - localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) + if r.additionalMetadata != nil { + localVarFormParams.Add("additionalMetadata", parameterToString(*r.additionalMetadata, "")) } localVarFormFileName = "requiredFile" - localVarFile := requiredFile + localVarFile := *r.requiredFile if localVarFile != nil { fbs, _ := _ioutil.ReadAll(localVarFile) localVarFileBytes = fbs localVarFileName = localVarFile.Name() localVarFile.Close() } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -828,7 +1040,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i } if localVarHTTPResponse.StatusCode == 200 { var v ApiResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -838,7 +1050,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/samples/client/petstore/go-experimental/go-petstore/api_store.go b/samples/client/petstore/go-experimental/go-petstore/api_store.go index 12047d1735..cea4e105c2 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_store.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_store.go @@ -25,32 +25,54 @@ var ( // StoreApiService StoreApi service type StoreApiService service +type apiDeleteOrderRequest struct { + ctx _context.Context + apiService *StoreApiService + orderId string +} + + /* DeleteOrder Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orderId ID of the order that needs to be deleted +@return apiDeleteOrderRequest */ -func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) { +func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) apiDeleteOrderRequest { + return apiDeleteOrderRequest{ + apiService: a, + ctx: ctx, + orderId: orderId, + } +} + +/* +Execute executes the request + +*/ +func (r apiDeleteOrderRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.DeleteOrder") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(r.orderId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -69,12 +91,12 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -95,14 +117,30 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n return localVarHTTPResponse, nil } +type apiGetInventoryRequest struct { + ctx _context.Context + apiService *StoreApiService +} + /* GetInventory Returns pet inventories by status Returns a map of status codes to quantities * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return map[string]int32 +@return apiGetInventoryRequest */ -func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { +func (a *StoreApiService) GetInventory(ctx _context.Context) apiGetInventoryRequest { + return apiGetInventoryRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return map[string]int32 +*/ +func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -112,7 +150,7 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, localVarReturnValue map[string]int32 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.GetInventory") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -140,9 +178,9 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if ctx != nil { + if r.ctx != nil { // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if auth, ok := auth["api_key"]; ok { var key string if auth.Prefix != "" { @@ -154,12 +192,12 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, } } } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -177,7 +215,7 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, } if localVarHTTPResponse.StatusCode == 200 { var v map[string]int32 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -187,7 +225,7 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -198,15 +236,33 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, nil } +type apiGetOrderByIdRequest struct { + ctx _context.Context + apiService *StoreApiService + orderId int64 +} + /* GetOrderById Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orderId ID of pet that needs to be fetched -@return Order +@return apiGetOrderByIdRequest */ -func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) { +func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) apiGetOrderByIdRequest { + return apiGetOrderByIdRequest{ + apiService: a, + ctx: ctx, + orderId: orderId, + } +} + +/* +Execute executes the request + @return Order +*/ +func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -216,21 +272,22 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord localVarReturnValue Order ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.GetOrderById") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(r.orderId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if orderId < 1 { + + if r.orderId < 1 { return localVarReturnValue, nil, reportError("orderId must be greater than 1") } - if orderId > 5 { + if r.orderId > 5 { return localVarReturnValue, nil, reportError("orderId must be less than 5") } @@ -251,12 +308,12 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -274,7 +331,7 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord } if localVarHTTPResponse.StatusCode == 200 { var v Order - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -285,7 +342,7 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -296,14 +353,35 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord return localVarReturnValue, localVarHTTPResponse, nil } +type apiPlaceOrderRequest struct { + ctx _context.Context + apiService *StoreApiService + body *Order +} + + +func (r apiPlaceOrderRequest) Body(body Order) apiPlaceOrderRequest { + r.body = &body + return r +} /* PlaceOrder Place an order for a pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body order placed for purchasing the pet -@return Order +@return apiPlaceOrderRequest */ -func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error) { +func (a *StoreApiService) PlaceOrder(ctx _context.Context) apiPlaceOrderRequest { + return apiPlaceOrderRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return Order +*/ +func (r apiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -313,7 +391,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, * localVarReturnValue Order ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.PlaceOrder") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -323,6 +401,10 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, * localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -342,13 +424,13 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, * localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -366,7 +448,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, * } if localVarHTTPResponse.StatusCode == 200 { var v Order - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -377,7 +459,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, * return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/samples/client/petstore/go-experimental/go-petstore/api_user.go b/samples/client/petstore/go-experimental/go-petstore/api_user.go index 5689de23b6..1af43a5acb 100644 --- a/samples/client/petstore/go-experimental/go-petstore/api_user.go +++ b/samples/client/petstore/go-experimental/go-petstore/api_user.go @@ -25,22 +25,46 @@ var ( // UserApiService UserApi service type UserApiService service +type apiCreateUserRequest struct { + ctx _context.Context + apiService *UserApiService + body *User +} + + +func (r apiCreateUserRequest) Body(body User) apiCreateUserRequest { + r.body = &body + return r +} + /* CreateUser Create user This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body Created user object +@return apiCreateUserRequest */ -func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUser(ctx _context.Context) apiCreateUserRequest { + return apiCreateUserRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiCreateUserRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -50,6 +74,10 @@ func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp. localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -69,13 +97,13 @@ func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp. localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -96,22 +124,45 @@ func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp. return localVarHTTPResponse, nil } +type apiCreateUsersWithArrayInputRequest struct { + ctx _context.Context + apiService *UserApiService + body *[]User +} + + +func (r apiCreateUsersWithArrayInputRequest) Body(body []User) apiCreateUsersWithArrayInputRequest { + r.body = &body + return r +} /* CreateUsersWithArrayInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body List of user object +@return apiCreateUsersWithArrayInputRequest */ -func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) apiCreateUsersWithArrayInputRequest { + return apiCreateUsersWithArrayInputRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUsersWithArrayInput") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -121,6 +172,10 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body [] localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -140,13 +195,13 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body [] localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -167,22 +222,45 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body [] return localVarHTTPResponse, nil } +type apiCreateUsersWithListInputRequest struct { + ctx _context.Context + apiService *UserApiService + body *[]User +} + + +func (r apiCreateUsersWithListInputRequest) Body(body []User) apiCreateUsersWithListInputRequest { + r.body = &body + return r +} /* CreateUsersWithListInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param body List of user object +@return apiCreateUsersWithListInputRequest */ -func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) apiCreateUsersWithListInputRequest { + return apiCreateUsersWithListInputRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUsersWithListInput") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -192,6 +270,10 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []U localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -211,13 +293,13 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []U localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -238,33 +320,54 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []U return localVarHTTPResponse, nil } +type apiDeleteUserRequest struct { + ctx _context.Context + apiService *UserApiService + username string +} + /* DeleteUser Delete user This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username The name that needs to be deleted +@return apiDeleteUserRequest */ -func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { +func (a *UserApiService) DeleteUser(ctx _context.Context, username string) apiDeleteUserRequest { + return apiDeleteUserRequest{ + apiService: a, + ctx: ctx, + username: username, + } +} + +/* +Execute executes the request + +*/ +func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.DeleteUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(username, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(r.username, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -283,12 +386,12 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_ne if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -309,14 +412,32 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_ne return localVarHTTPResponse, nil } +type apiGetUserByNameRequest struct { + ctx _context.Context + apiService *UserApiService + username string +} + /* GetUserByName Get user by user name * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username The name that needs to be fetched. Use user1 for testing. -@return User +@return apiGetUserByNameRequest */ -func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { +func (a *UserApiService) GetUserByName(ctx _context.Context, username string) apiGetUserByNameRequest { + return apiGetUserByNameRequest{ + apiService: a, + ctx: ctx, + username: username, + } +} + +/* +Execute executes the request + @return User +*/ +func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -326,17 +447,18 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U localVarReturnValue User ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.GetUserByName") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(username, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(r.username, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -355,12 +477,12 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -378,7 +500,7 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U } if localVarHTTPResponse.StatusCode == 200 { var v User - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -389,7 +511,7 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -400,15 +522,41 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U return localVarReturnValue, localVarHTTPResponse, nil } +type apiLoginUserRequest struct { + ctx _context.Context + apiService *UserApiService + username *string + password *string +} + + +func (r apiLoginUserRequest) Username(username string) apiLoginUserRequest { + r.username = &username + return r +} + +func (r apiLoginUserRequest) Password(password string) apiLoginUserRequest { + r.password = &password + return r +} /* LoginUser Logs user into the system * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param username The user name for login - * @param password The password for login in clear text -@return string +@return apiLoginUserRequest */ -func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { +func (a *UserApiService) LoginUser(ctx _context.Context) apiLoginUserRequest { + return apiLoginUserRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return string +*/ +func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -418,7 +566,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo localVarReturnValue string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.LoginUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -428,9 +576,17 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.username == nil { + return localVarReturnValue, nil, reportError("username is required and must be specified") + } + + if r.password == nil { + return localVarReturnValue, nil, reportError("password is required and must be specified") + } - localVarQueryParams.Add("username", parameterToString(username, "")) - localVarQueryParams.Add("password", parameterToString(password, "")) + localVarQueryParams.Add("username", parameterToString(*r.username, "")) + localVarQueryParams.Add("password", parameterToString(*r.password, "")) // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -448,12 +604,12 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -471,7 +627,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo } if localVarHTTPResponse.StatusCode == 200 { var v string - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -482,7 +638,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -493,21 +649,39 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo return localVarReturnValue, localVarHTTPResponse, nil } +type apiLogoutUserRequest struct { + ctx _context.Context + apiService *UserApiService +} + /* LogoutUser Logs out current logged in user session * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@return apiLogoutUserRequest */ -func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { +func (a *UserApiService) LogoutUser(ctx _context.Context) apiLogoutUserRequest { + return apiLogoutUserRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiLogoutUserRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.LogoutUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -535,12 +709,12 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, e if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -561,34 +735,64 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, e return localVarHTTPResponse, nil } +type apiUpdateUserRequest struct { + ctx _context.Context + apiService *UserApiService + username string + body *User +} + + +func (r apiUpdateUserRequest) Body(body User) apiUpdateUserRequest { + r.body = &body + return r +} /* UpdateUser Updated user This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username name that need to be deleted - * @param body Updated user object +@return apiUpdateUserRequest */ -func (a *UserApiService) UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error) { +func (a *UserApiService) UpdateUser(ctx _context.Context, username string) apiUpdateUserRequest { + return apiUpdateUserRequest{ + apiService: a, + ctx: ctx, + username: username, + } +} + +/* +Execute executes the request + +*/ +func (r apiUpdateUserRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.UpdateUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(username, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(r.username, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -608,13 +812,13 @@ func (a *UserApiService) UpdateUser(ctx _context.Context, username string, body localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &body - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md index 2c22f8f1b3..1c5c2b28dd 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md @@ -10,19 +10,24 @@ Method | HTTP request | Description ## Call123TestSpecialTags -> Client Call123TestSpecialTags(ctx, body) +> Client Call123TestSpecialTags(ctx).Body(body).Execute() To test special tags -To test special tags and operation ID starting with number -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCall123TestSpecialTagsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**Client**](Client.md)| client model | + **body** | [**Client**](Client.md) | client model | ### Return type diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md index 6ba47e807f..c81d452382 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FakeApi.md @@ -23,19 +23,24 @@ Method | HTTP request | Description ## CreateXmlItem -> CreateXmlItem(ctx, xmlItem) +> CreateXmlItem(ctx).XmlItem(xmlItem).Execute() creates an XmlItem -this route creates an XmlItem -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateXmlItemRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | + **xmlItem** | [**XmlItem**](XmlItem.md) | XmlItem Body | ### Return type @@ -57,28 +62,24 @@ No authorization required ## FakeOuterBooleanSerialize -> bool FakeOuterBooleanSerialize(ctx, optional) +> bool FakeOuterBooleanSerialize(ctx).Body(body).Execute() -Test serialization of outer boolean types -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFakeOuterBooleanSerializeRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***FakeOuterBooleanSerializeOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FakeOuterBooleanSerializeOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **optional.Bool**| Input boolean as post body | + **body** | **bool** | Input boolean as post body | ### Return type @@ -100,28 +101,24 @@ No authorization required ## FakeOuterCompositeSerialize -> OuterComposite FakeOuterCompositeSerialize(ctx, optional) +> OuterComposite FakeOuterCompositeSerialize(ctx).Body(body).Execute() -Test serialization of object with outer number type -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFakeOuterCompositeSerializeRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***FakeOuterCompositeSerializeOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FakeOuterCompositeSerializeOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**optional.Interface of OuterComposite**](OuterComposite.md)| Input composite as post body | + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | ### Return type @@ -143,28 +140,24 @@ No authorization required ## FakeOuterNumberSerialize -> float32 FakeOuterNumberSerialize(ctx, optional) +> float32 FakeOuterNumberSerialize(ctx).Body(body).Execute() -Test serialization of outer number types -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFakeOuterNumberSerializeRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***FakeOuterNumberSerializeOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FakeOuterNumberSerializeOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **optional.Float32**| Input number as post body | + **body** | **float32** | Input number as post body | ### Return type @@ -186,28 +179,24 @@ No authorization required ## FakeOuterStringSerialize -> string FakeOuterStringSerialize(ctx, optional) +> string FakeOuterStringSerialize(ctx).Body(body).Execute() -Test serialization of outer string types -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFakeOuterStringSerializeRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***FakeOuterStringSerializeOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FakeOuterStringSerializeOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **optional.String**| Input string as post body | + **body** | **string** | Input string as post body | ### Return type @@ -229,19 +218,24 @@ No authorization required ## TestBodyWithFileSchema -> TestBodyWithFileSchema(ctx, body) +> TestBodyWithFileSchema(ctx).Body(body).Execute() -For this test, the body for this request much reference a schema named `File`. -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestBodyWithFileSchemaRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | ### Return type @@ -263,18 +257,23 @@ No authorization required ## TestBodyWithQueryParams -> TestBodyWithQueryParams(ctx, query, body) +> TestBodyWithQueryParams(ctx).Query(query).Body(body).Execute() -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestBodyWithQueryParamsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**query** | **string**| | -**body** | [**User**](User.md)| | + **query** | **string** | | + **body** | [**User**](User.md) | | ### Return type @@ -296,19 +295,24 @@ No authorization required ## TestClientModel -> Client TestClientModel(ctx, body) +> Client TestClientModel(ctx).Body(body).Execute() To test \"client\" model -To test \"client\" model -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestClientModelRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**Client**](Client.md)| client model | + **body** | [**Client**](Client.md) | client model | ### Return type @@ -330,45 +334,37 @@ No authorization required ## TestEndpointParameters -> TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) +> TestEndpointParameters(ctx).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestEndpointParametersRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**number** | **float32**| None | -**double** | **float64**| None | -**patternWithoutDelimiter** | **string**| None | -**byte_** | **string**| None | - **optional** | ***TestEndpointParametersOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a TestEndpointParametersOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - - **integer** | **optional.Int32**| None | - **int32_** | **optional.Int32**| None | - **int64_** | **optional.Int64**| None | - **float** | **optional.Float32**| None | - **string_** | **optional.String**| None | - **binary** | **optional.Interface of *os.File****optional.*os.File**| None | - **date** | **optional.String**| None | - **dateTime** | **optional.Time**| None | - **password** | **optional.String**| None | - **callback** | **optional.String**| None | + **number** | **float32** | None | + **double** | **float64** | None | + **patternWithoutDelimiter** | **string** | None | + **byte_** | **string** | None | + **integer** | **int32** | None | + **int32_** | **int32** | None | + **int64_** | **int64** | None | + **float** | **float32** | None | + **string_** | **string** | None | + **binary** | ***os.File** | None | + **date** | **string** | None | + **dateTime** | **time.Time** | None | + **password** | **string** | None | + **callback** | **string** | None | ### Return type @@ -390,35 +386,31 @@ Name | Type | Description | Notes ## TestEnumParameters -> TestEnumParameters(ctx, optional) +> TestEnumParameters(ctx).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() To test enum parameters -To test enum parameters -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestEnumParametersRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TestEnumParametersOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a TestEnumParametersOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**optional.Interface of []string**](string.md)| Header parameter enum test (string array) | - **enumHeaderString** | **optional.String**| Header parameter enum test (string) | [default to -efg] - **enumQueryStringArray** | [**optional.Interface of []string**](string.md)| Query parameter enum test (string array) | - **enumQueryString** | **optional.String**| Query parameter enum test (string) | [default to -efg] - **enumQueryInteger** | **optional.Int32**| Query parameter enum test (double) | - **enumQueryDouble** | **optional.Float64**| Query parameter enum test (double) | - **enumFormStringArray** | [**optional.Interface of []string**](string.md)| Form parameter enum test (string array) | [default to $] - **enumFormString** | **optional.String**| Form parameter enum test (string) | [default to -efg] + **enumHeaderStringArray** | [**[]string**](string.md) | Header parameter enum test (string array) | + **enumHeaderString** | **string** | Header parameter enum test (string) | [default to -efg] + **enumQueryStringArray** | [**[]string**](string.md) | Query parameter enum test (string array) | + **enumQueryString** | **string** | Query parameter enum test (string) | [default to -efg] + **enumQueryInteger** | **int32** | Query parameter enum test (double) | + **enumQueryDouble** | **float64** | Query parameter enum test (double) | + **enumFormStringArray** | [**[]string**](string.md) | Form parameter enum test (string array) | [default to $] + **enumFormString** | **string** | Form parameter enum test (string) | [default to -efg] ### Return type @@ -440,36 +432,29 @@ No authorization required ## TestGroupParameters -> TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) +> TestGroupParameters(ctx).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() Fake endpoint to test group parameters (optional) -Fake endpoint to test group parameters (optional) -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestGroupParametersRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**requiredStringGroup** | **int32**| Required String in group parameters | -**requiredBooleanGroup** | **bool**| Required Boolean in group parameters | -**requiredInt64Group** | **int64**| Required Integer in group parameters | - **optional** | ***TestGroupParametersOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a TestGroupParametersOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **stringGroup** | **optional.Int32**| String in group parameters | - **booleanGroup** | **optional.Bool**| Boolean in group parameters | - **int64Group** | **optional.Int64**| Integer in group parameters | + **requiredStringGroup** | **int32** | Required String in group parameters | + **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | + **requiredInt64Group** | **int64** | Required Integer in group parameters | + **stringGroup** | **int32** | String in group parameters | + **booleanGroup** | **bool** | Boolean in group parameters | + **int64Group** | **int64** | Integer in group parameters | ### Return type @@ -491,17 +476,22 @@ No authorization required ## TestInlineAdditionalProperties -> TestInlineAdditionalProperties(ctx, param) +> TestInlineAdditionalProperties(ctx).Param(param).Execute() test inline additionalProperties -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestInlineAdditionalPropertiesRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**param** | [**map[string]string**](string.md)| request body | + **param** | [**map[string]string**](string.md) | request body | ### Return type @@ -523,18 +513,23 @@ No authorization required ## TestJsonFormData -> TestJsonFormData(ctx, param, param2) +> TestJsonFormData(ctx).Param(param).Param2(param2).Execute() test json serialization of form data -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestJsonFormDataRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**param** | **string**| field1 | -**param2** | **string**| field2 | + **param** | **string** | field1 | + **param2** | **string** | field2 | ### Return type @@ -556,23 +551,28 @@ No authorization required ## TestQueryParameterCollectionFormat -> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) +> TestQueryParameterCollectionFormat(ctx).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() -To test the collection format in query parameters -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestQueryParameterCollectionFormatRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**pipe** | [**[]string**](string.md)| | -**ioutil** | [**[]string**](string.md)| | -**http** | [**[]string**](string.md)| | -**url** | [**[]string**](string.md)| | -**context** | [**[]string**](string.md)| | + **pipe** | [**[]string**](string.md) | | + **ioutil** | [**[]string**](string.md) | | + **http** | [**[]string**](string.md) | | + **url** | [**[]string**](string.md) | | + **context** | [**[]string**](string.md) | | ### Return type diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md b/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md index 224542b705..8047122187 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md @@ -10,19 +10,24 @@ Method | HTTP request | Description ## TestClassname -> Client TestClassname(ctx, body) +> Client TestClassname(ctx).Body(body).Execute() To test class name in snake case -To test class name in snake case -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestClassnameRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**Client**](Client.md)| client model | + **body** | [**Client**](Client.md) | client model | ### Return type diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md index 6ee9afef75..9d07d9e64f 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/PetApi.md @@ -18,17 +18,22 @@ Method | HTTP request | Description ## AddPet -> AddPet(ctx, body) +> AddPet(ctx).Body(body).Execute() Add a new pet to the store -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddPetRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | ### Return type @@ -50,28 +55,27 @@ Name | Type | Description | Notes ## DeletePet -> DeletePet(ctx, petId, optional) +> DeletePet(ctx, petId).ApiKey(apiKey).Execute() Deletes a pet -### Required Parameters +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| Pet id to delete | - **optional** | ***DeletePetOpts** | optional parameters | nil if no parameters +**petId** | **int64** | Pet id to delete | -### Optional Parameters +### Other Parameters -Optional parameters are passed through a pointer to a DeletePetOpts struct +Other parameters are passed through a pointer to a apiDeletePetRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **apiKey** | **optional.String**| | + **apiKey** | **string** | | ### Return type @@ -93,19 +97,24 @@ Name | Type | Description | Notes ## FindPetsByStatus -> []Pet FindPetsByStatus(ctx, status) +> []Pet FindPetsByStatus(ctx).Status(status).Execute() Finds Pets by status -Multiple status values can be provided with comma separated strings -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFindPetsByStatusRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**status** | [**[]string**](string.md)| Status values that need to be considered for filter | + **status** | [**[]string**](string.md) | Status values that need to be considered for filter | ### Return type @@ -127,19 +136,24 @@ Name | Type | Description | Notes ## FindPetsByTags -> []Pet FindPetsByTags(ctx, tags) +> []Pet FindPetsByTags(ctx).Tags(tags).Execute() Finds Pets by tags -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFindPetsByTagsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tags** | [**[]string**](string.md)| Tags to filter by | + **tags** | [**[]string**](string.md) | Tags to filter by | ### Return type @@ -161,19 +175,28 @@ Name | Type | Description | Notes ## GetPetById -> Pet GetPetById(ctx, petId) +> Pet GetPetById(ctx, petId).Execute() Find pet by ID -Returns a single pet -### Required Parameters + +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to return | +**petId** | **int64** | ID of pet to return | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetPetByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -195,17 +218,22 @@ Name | Type | Description | Notes ## UpdatePet -> UpdatePet(ctx, body) +> UpdatePet(ctx).Body(body).Execute() Update an existing pet -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdatePetRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | ### Return type @@ -227,29 +255,28 @@ Name | Type | Description | Notes ## UpdatePetWithForm -> UpdatePetWithForm(ctx, petId, optional) +> UpdatePetWithForm(ctx, petId).Name(name).Status(status).Execute() Updates a pet in the store with form data -### Required Parameters +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet that needs to be updated | - **optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters +**petId** | **int64** | ID of pet that needs to be updated | -### Optional Parameters +### Other Parameters -Optional parameters are passed through a pointer to a UpdatePetWithFormOpts struct +Other parameters are passed through a pointer to a apiUpdatePetWithFormRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **optional.String**| Updated name of the pet | - **status** | **optional.String**| Updated status of the pet | + **name** | **string** | Updated name of the pet | + **status** | **string** | Updated status of the pet | ### Return type @@ -271,29 +298,28 @@ Name | Type | Description | Notes ## UploadFile -> ApiResponse UploadFile(ctx, petId, optional) +> ApiResponse UploadFile(ctx, petId).AdditionalMetadata(additionalMetadata).File(file).Execute() uploads an image -### Required Parameters +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | - **optional** | ***UploadFileOpts** | optional parameters | nil if no parameters +**petId** | **int64** | ID of pet to update | -### Optional Parameters +### Other Parameters -Optional parameters are passed through a pointer to a UploadFileOpts struct +Other parameters are passed through a pointer to a apiUploadFileRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **additionalMetadata** | **optional.String**| Additional data to pass to server | - **file** | **optional.Interface of *os.File****optional.*os.File**| file to upload | + **additionalMetadata** | **string** | Additional data to pass to server | + **file** | ***os.File** | file to upload | ### Return type @@ -315,30 +341,28 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile -> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) +> ApiResponse UploadFileWithRequiredFile(ctx, petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute() uploads an image (required) -### Required Parameters +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | -**requiredFile** | ***os.File*****os.File**| file to upload | - **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters +**petId** | **int64** | ID of pet to update | -### Optional Parameters +### Other Parameters -Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct +Other parameters are passed through a pointer to a apiUploadFileWithRequiredFileRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - **additionalMetadata** | **optional.String**| Additional data to pass to server | + **requiredFile** | ***os.File** | file to upload | + **additionalMetadata** | **string** | Additional data to pass to server | ### Return type diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md index 531ab09ff6..3d75ce0a56 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/StoreApi.md @@ -13,19 +13,28 @@ Method | HTTP request | Description ## DeleteOrder -> DeleteOrder(ctx, orderId) +> DeleteOrder(ctx, orderId).Execute() Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Required Parameters + +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **string**| ID of the order that needs to be deleted | +**orderId** | **string** | ID of the order that needs to be deleted | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrderRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -47,16 +56,21 @@ No authorization required ## GetInventory -> map[string]int32 GetInventory(ctx, ) +> map[string]int32 GetInventory(ctx).Execute() Returns pet inventories by status -Returns a map of status codes to quantities -### Required Parameters + +### Path Parameters This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiGetInventoryRequest struct via the builder pattern + + ### Return type **map[string]int32** @@ -77,19 +91,28 @@ This endpoint does not need any parameter. ## GetOrderById -> Order GetOrderById(ctx, orderId) +> Order GetOrderById(ctx, orderId).Execute() Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Required Parameters + +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **int64**| ID of pet that needs to be fetched | +**orderId** | **int64** | ID of pet that needs to be fetched | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrderByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -111,17 +134,22 @@ No authorization required ## PlaceOrder -> Order PlaceOrder(ctx, body) +> Order PlaceOrder(ctx).Body(body).Execute() Place an order for a pet -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiPlaceOrderRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**Order**](Order.md)| order placed for purchasing the pet | + **body** | [**Order**](Order.md) | order placed for purchasing the pet | ### Return type diff --git a/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md b/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md index d9f16bb5fb..cee3024a24 100644 --- a/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md +++ b/samples/client/petstore/go-experimental/go-petstore/docs/UserApi.md @@ -17,19 +17,24 @@ Method | HTTP request | Description ## CreateUser -> CreateUser(ctx, body) +> CreateUser(ctx).Body(body).Execute() Create user -This can only be done by the logged in user. -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUserRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**User**](User.md)| Created user object | + **body** | [**User**](User.md) | Created user object | ### Return type @@ -51,17 +56,22 @@ No authorization required ## CreateUsersWithArrayInput -> CreateUsersWithArrayInput(ctx, body) +> CreateUsersWithArrayInput(ctx).Body(body).Execute() Creates list of users with given input array -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUsersWithArrayInputRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**[]User**](User.md)| List of user object | + **body** | [**[]User**](User.md) | List of user object | ### Return type @@ -83,17 +93,22 @@ No authorization required ## CreateUsersWithListInput -> CreateUsersWithListInput(ctx, body) +> CreateUsersWithListInput(ctx).Body(body).Execute() Creates list of users with given input array -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUsersWithListInputRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**body** | [**[]User**](User.md)| List of user object | + **body** | [**[]User**](User.md) | List of user object | ### Return type @@ -115,19 +130,28 @@ No authorization required ## DeleteUser -> DeleteUser(ctx, username) +> DeleteUser(ctx, username).Execute() Delete user -This can only be done by the logged in user. -### Required Parameters + +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**username** | **string**| The name that needs to be deleted | +**username** | **string** | The name that needs to be deleted | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -149,17 +173,26 @@ No authorization required ## GetUserByName -> User GetUserByName(ctx, username) +> User GetUserByName(ctx, username).Execute() Get user by user name -### Required Parameters +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**username** | **string**| The name that needs to be fetched. Use user1 for testing. | +**username** | **string** | The name that needs to be fetched. Use user1 for testing. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserByNameRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -181,18 +214,23 @@ No authorization required ## LoginUser -> string LoginUser(ctx, username, password) +> string LoginUser(ctx).Username(username).Password(password).Execute() Logs user into the system -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoginUserRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**username** | **string**| The user name for login | -**password** | **string**| The password for login in clear text | + **username** | **string** | The user name for login | + **password** | **string** | The password for login in clear text | ### Return type @@ -214,14 +252,19 @@ No authorization required ## LogoutUser -> LogoutUser(ctx, ) +> LogoutUser(ctx).Execute() Logs out current logged in user session -### Required Parameters +### Path Parameters This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiLogoutUserRequest struct via the builder pattern + + ### Return type (empty response body) @@ -242,20 +285,29 @@ No authorization required ## UpdateUser -> UpdateUser(ctx, username, body) +> UpdateUser(ctx, username).Body(body).Execute() Updated user -This can only be done by the logged in user. -### Required Parameters + +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**username** | **string**| name that need to be deleted | -**body** | [**User**](User.md)| Updated user object | +**username** | **string** | name that need to be deleted | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**User**](User.md) | Updated user object | ### Return type diff --git a/samples/client/petstore/go-experimental/pet_api_test.go b/samples/client/petstore/go-experimental/pet_api_test.go index 847aa517af..6cc33a62e1 100644 --- a/samples/client/petstore/go-experimental/pet_api_test.go +++ b/samples/client/petstore/go-experimental/pet_api_test.go @@ -6,7 +6,6 @@ import ( "os" "testing" - "github.com/antihax/optional" "github.com/stretchr/testify/assert" sw "./go-petstore" @@ -32,7 +31,7 @@ func TestAddPet(t *testing.T) { PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - r, err := client.PetApi.AddPet(context.Background(), newPet) + r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute() if err != nil { t.Fatalf("Error while adding pet: %v", err) @@ -43,7 +42,7 @@ func TestAddPet(t *testing.T) { } func TestFindPetsByStatusWithMissingParam(t *testing.T) { - _, r, err := client.PetApi.FindPetsByStatus(context.Background(), nil) + _, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status(nil).Execute() if err != nil { t.Fatalf("Error while testing TestFindPetsByStatusWithMissingParam: %v", err) @@ -58,7 +57,7 @@ func TestGetPetById(t *testing.T) { } func TestGetPetByIdWithInvalidID(t *testing.T) { - resp, r, err := client.PetApi.GetPetById(context.Background(), 999999999) + resp, r, err := client.PetApi.GetPetById(context.Background(), 999999999).Execute() if r != nil && r.StatusCode == 404 { assertedError, ok := err.(sw.GenericOpenAPIError) a := assert.New(t) @@ -75,10 +74,7 @@ func TestGetPetByIdWithInvalidID(t *testing.T) { } func TestUpdatePetWithForm(t *testing.T) { - r, err := client.PetApi.UpdatePetWithForm(context.Background(), 12830, &sw.UpdatePetWithFormOpts{ - Name: optional.NewString("golang"), - Status: optional.NewString("available"), - }) + r, err := client.PetApi.UpdatePetWithForm(context.Background(), 12830).Name("golang").Status("available").Execute() if err != nil { t.Fatalf("Error while updating pet by id: %v", err) t.Log(r) @@ -93,7 +89,7 @@ func TestUpdatePetWithForm(t *testing.T) { func TestFindPetsByTag(t *testing.T) { var found = false - resp, r, err := client.PetApi.FindPetsByTags(context.Background(), []string{"tag2"}) + resp, r, err := client.PetApi.FindPetsByTags(context.Background()).Tags([]string{"tag2"}).Execute() if err != nil { t.Fatalf("Error while getting pet by tag: %v", err) t.Log(r) @@ -122,7 +118,7 @@ func TestFindPetsByTag(t *testing.T) { } func TestFindPetsByStatus(t *testing.T) { - resp, r, err := client.PetApi.FindPetsByStatus(context.Background(), []string{"available"}) + resp, r, err := client.PetApi.FindPetsByStatus(context.Background()).Status([]string{"available"}).Execute() if err != nil { t.Fatalf("Error while getting pet by id: %v", err) t.Log(r) @@ -145,10 +141,7 @@ func TestFindPetsByStatus(t *testing.T) { func TestUploadFile(t *testing.T) { file, _ := os.Open("../python/testfiles/foo.png") - _, r, err := client.PetApi.UploadFile(context.Background(), 12830, &sw.UploadFileOpts{ - AdditionalMetadata: optional.NewString("golang"), - File: optional.NewInterface(file), - }) + _, r, err := client.PetApi.UploadFile(context.Background(), 12830).AdditionalMetadata("golang").File(file).Execute() if err != nil { t.Fatalf("Error while uploading file: %v", err) @@ -163,11 +156,7 @@ func TestUploadFileRequired(t *testing.T) { return // remove when server supports this endpoint file, _ := os.Open("../python/testfiles/foo.png") - _, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830, - file, - &sw.UploadFileWithRequiredFileOpts{ - AdditionalMetadata: optional.NewString("golang"), - }) + _, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830).RequiredFile(file).AdditionalMetadata("golang").Execute() if err != nil { t.Fatalf("Error while uploading file: %v", err) @@ -179,7 +168,7 @@ func TestUploadFileRequired(t *testing.T) { } func TestDeletePet(t *testing.T) { - r, err := client.PetApi.DeletePet(context.Background(), 12830, nil) + r, err := client.PetApi.DeletePet(context.Background(), 12830).Execute() if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -269,7 +258,7 @@ func waitOnFunctions(t *testing.T, errc chan error, n int) { } func deletePet(t *testing.T, id int64) { - r, err := client.PetApi.DeletePet(context.Background(), id, nil) + r, err := client.PetApi.DeletePet(context.Background(), id).Execute() if err != nil { t.Fatalf("Error while deleting pet by id: %v", err) @@ -281,7 +270,7 @@ func deletePet(t *testing.T, id int64) { func isPetCorrect(t *testing.T, id int64, name string, status string) { assert := assert.New(t) - resp, r, err := client.PetApi.GetPetById(context.Background(), id) + resp, r, err := client.PetApi.GetPetById(context.Background(), id).Execute() if err != nil { t.Fatalf("Error while getting pet by id: %v", err) } else { diff --git a/samples/client/petstore/go-experimental/store_api_test.go b/samples/client/petstore/go-experimental/store_api_test.go index 81f4fd7e33..f9f55273eb 100644 --- a/samples/client/petstore/go-experimental/store_api_test.go +++ b/samples/client/petstore/go-experimental/store_api_test.go @@ -18,7 +18,7 @@ func TestPlaceOrder(t *testing.T) { Status: sw.PtrString("placed"), Complete: sw.PtrBool(false)} - _, r, err := client.StoreApi.PlaceOrder(context.Background(), newOrder) + _, r, err := client.StoreApi.PlaceOrder(context.Background()).Body(newOrder).Execute() if err != nil { // Skip parsing time error due to error in Petstore Test Server diff --git a/samples/client/petstore/go-experimental/user_api_test.go b/samples/client/petstore/go-experimental/user_api_test.go index 8826087020..720b14848f 100644 --- a/samples/client/petstore/go-experimental/user_api_test.go +++ b/samples/client/petstore/go-experimental/user_api_test.go @@ -20,7 +20,7 @@ func TestCreateUser(t *testing.T) { Phone: sw.PtrString("5101112222"), UserStatus: sw.PtrInt32(1)} - apiResponse, err := client.UserApi.CreateUser(context.Background(), newUser) + apiResponse, err := client.UserApi.CreateUser(context.Background()).Body(newUser).Execute() if err != nil { t.Fatalf("Error while adding user: %v", err) @@ -55,7 +55,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { }, } - apiResponse, err := client.UserApi.CreateUsersWithArrayInput(context.Background(), newUsers) + apiResponse, err := client.UserApi.CreateUsersWithArrayInput(context.Background()).Body(newUsers).Execute() if err != nil { t.Fatalf("Error while adding users: %v", err) } @@ -64,13 +64,13 @@ func TestCreateUsersWithArrayInput(t *testing.T) { } //tear down - _, err1 := client.UserApi.DeleteUser(context.Background(), "gopher1") + _, err1 := client.UserApi.DeleteUser(context.Background(), "gopher1").Execute() if err1 != nil { t.Errorf("Error while deleting user") t.Log(err1) } - _, err2 := client.UserApi.DeleteUser(context.Background(), "gopher2") + _, err2 := client.UserApi.DeleteUser(context.Background(), "gopher2").Execute() if err2 != nil { t.Errorf("Error while deleting user") t.Log(err2) @@ -80,7 +80,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) { func TestGetUserByName(t *testing.T) { assert := assert.New(t) - resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher") + resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher").Execute() if err != nil { t.Fatalf("Error while getting user by id: %v", err) } else { @@ -95,7 +95,7 @@ func TestGetUserByName(t *testing.T) { } func TestGetUserByNameWithInvalidID(t *testing.T) { - resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "999999999") + resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "999999999").Execute() if apiResponse != nil && apiResponse.StatusCode == 404 { return // This is a pass condition. API will return with a 404 error. } else if err != nil { @@ -122,7 +122,7 @@ func TestUpdateUser(t *testing.T) { Phone: sw.PtrString("5101112222"), UserStatus: sw.PtrInt32(1)} - apiResponse, err := client.UserApi.UpdateUser(context.Background(), "gopher", newUser) + apiResponse, err := client.UserApi.UpdateUser(context.Background(), "gopher").Body(newUser).Execute() if err != nil { t.Fatalf("Error while deleting user by id: %v", err) } @@ -131,7 +131,7 @@ func TestUpdateUser(t *testing.T) { } //verify changings are correct - resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher") + resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher").Execute() if err != nil { t.Fatalf("Error while getting user by id: %v", err) } else { @@ -142,7 +142,7 @@ func TestUpdateUser(t *testing.T) { } func TestDeleteUser(t *testing.T) { - apiResponse, err := client.UserApi.DeleteUser(context.Background(), "gopher") + apiResponse, err := client.UserApi.DeleteUser(context.Background(), "gopher").Execute() if err != nil { t.Fatalf("Error while deleting user: %v", err) diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go index 70a24791ad..16dc072e96 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_another_fake.go @@ -24,14 +24,36 @@ var ( // AnotherFakeApiService AnotherFakeApi service type AnotherFakeApiService service +type apiCall123TestSpecialTagsRequest struct { + ctx _context.Context + apiService *AnotherFakeApiService + client *Client +} + + +func (r apiCall123TestSpecialTagsRequest) Client(client Client) apiCall123TestSpecialTagsRequest { + r.client = &client + return r +} + /* Call123TestSpecialTags To test special tags To test special tags and operation ID starting with number * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param client client model -@return Client +@return apiCall123TestSpecialTagsRequest */ -func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { +func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) apiCall123TestSpecialTagsRequest { + return apiCall123TestSpecialTagsRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return Client +*/ +func (r apiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -41,7 +63,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "AnotherFakeApiService.Call123TestSpecialTags") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -51,6 +73,10 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.client == nil { + return localVarReturnValue, nil, reportError("client is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -70,13 +96,13 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &client - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.client + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -94,7 +120,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli } if localVarHTTPResponse.StatusCode == 200 { var v Client - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -104,7 +130,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, cli return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go index dd977e26c0..6fce4e6b2e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_default.go @@ -24,12 +24,29 @@ var ( // DefaultApiService DefaultApi service type DefaultApiService service +type apiFooGetRequest struct { + ctx _context.Context + apiService *DefaultApiService +} + + /* FooGet Method for FooGet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return InlineResponseDefault +@return apiFooGetRequest */ -func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, *_nethttp.Response, error) { +func (a *DefaultApiService) FooGet(ctx _context.Context) apiFooGetRequest { + return apiFooGetRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return InlineResponseDefault +*/ +func (r apiFooGetRequest) Execute() (InlineResponseDefault, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -39,7 +56,7 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, localVarReturnValue InlineResponseDefault ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "DefaultApiService.FooGet") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.FooGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -67,12 +84,12 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -89,7 +106,7 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, error: localVarHTTPResponse.Status, } var v InlineResponseDefault - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -98,7 +115,7 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) (InlineResponseDefault, return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go index 7f38a45547..11699dfe9a 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake.go @@ -14,8 +14,8 @@ import ( _ioutil "io/ioutil" _nethttp "net/http" _neturl "net/url" - "github.com/antihax/optional" "os" + "time" "reflect" ) @@ -27,12 +27,29 @@ var ( // FakeApiService FakeApi service type FakeApiService service +type apiFakeHealthGetRequest struct { + ctx _context.Context + apiService *FakeApiService +} + + /* FakeHealthGet Health check endpoint * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return HealthCheckResult +@return apiFakeHealthGetRequest */ -func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, *_nethttp.Response, error) { +func (a *FakeApiService) FakeHealthGet(ctx _context.Context) apiFakeHealthGetRequest { + return apiFakeHealthGetRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return HealthCheckResult +*/ +func (r apiFakeHealthGetRequest) Execute() (HealthCheckResult, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -42,7 +59,7 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, localVarReturnValue HealthCheckResult ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeHealthGet") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeHealthGet") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -70,12 +87,12 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -93,7 +110,7 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, } if localVarHTTPResponse.StatusCode == 200 { var v HealthCheckResult - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -103,7 +120,7 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -114,21 +131,36 @@ func (a *FakeApiService) FakeHealthGet(ctx _context.Context) (HealthCheckResult, return localVarReturnValue, localVarHTTPResponse, nil } +type apiFakeOuterBooleanSerializeRequest struct { + ctx _context.Context + apiService *FakeApiService + body *bool +} -// FakeOuterBooleanSerializeOpts Optional parameters for the method 'FakeOuterBooleanSerialize' -type FakeOuterBooleanSerializeOpts struct { - Body optional.Bool + +func (r apiFakeOuterBooleanSerializeRequest) Body(body bool) apiFakeOuterBooleanSerializeRequest { + r.body = &body + return r } /* FakeOuterBooleanSerialize Method for FakeOuterBooleanSerialize Test serialization of outer boolean types * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *FakeOuterBooleanSerializeOpts - Optional Parameters: - * @param "Body" (optional.Bool) - Input boolean as post body -@return bool +@return apiFakeOuterBooleanSerializeRequest */ -func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context) apiFakeOuterBooleanSerializeRequest { + return apiFakeOuterBooleanSerializeRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return bool +*/ +func (r apiFakeOuterBooleanSerializeRequest) Execute() (bool, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -138,7 +170,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa localVarReturnValue bool ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterBooleanSerialize") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterBooleanSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -148,7 +180,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -167,16 +199,13 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - localVarPostBody = localVarOptionals.Body.Value() - } - - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -194,7 +223,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa } if localVarHTTPResponse.StatusCode == 200 { var v bool - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -204,7 +233,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -215,21 +244,36 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVa return localVarReturnValue, localVarHTTPResponse, nil } +type apiFakeOuterCompositeSerializeRequest struct { + ctx _context.Context + apiService *FakeApiService + outerComposite *OuterComposite +} -// FakeOuterCompositeSerializeOpts Optional parameters for the method 'FakeOuterCompositeSerialize' -type FakeOuterCompositeSerializeOpts struct { - OuterComposite optional.Interface + +func (r apiFakeOuterCompositeSerializeRequest) OuterComposite(outerComposite OuterComposite) apiFakeOuterCompositeSerializeRequest { + r.outerComposite = &outerComposite + return r } /* FakeOuterCompositeSerialize Method for FakeOuterCompositeSerialize Test serialization of object with outer number type * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *FakeOuterCompositeSerializeOpts - Optional Parameters: - * @param "OuterComposite" (optional.Interface of OuterComposite) - Input composite as post body -@return OuterComposite +@return apiFakeOuterCompositeSerializeRequest */ -func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context) apiFakeOuterCompositeSerializeRequest { + return apiFakeOuterCompositeSerializeRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return OuterComposite +*/ +func (r apiFakeOuterCompositeSerializeRequest) Execute() (OuterComposite, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -239,7 +283,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local localVarReturnValue OuterComposite ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterCompositeSerialize") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterCompositeSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -249,7 +293,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -268,20 +312,13 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.OuterComposite.IsSet() { - localVarOptionalOuterComposite, localVarOptionalOuterCompositeok := localVarOptionals.OuterComposite.Value().(OuterComposite) - if !localVarOptionalOuterCompositeok { - return localVarReturnValue, nil, reportError("outerComposite should be OuterComposite") - } - localVarPostBody = &localVarOptionalOuterComposite - } - - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.outerComposite + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -299,7 +336,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local } if localVarHTTPResponse.StatusCode == 200 { var v OuterComposite - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -309,7 +346,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -320,21 +357,36 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, local return localVarReturnValue, localVarHTTPResponse, nil } +type apiFakeOuterNumberSerializeRequest struct { + ctx _context.Context + apiService *FakeApiService + body *float32 +} -// FakeOuterNumberSerializeOpts Optional parameters for the method 'FakeOuterNumberSerialize' -type FakeOuterNumberSerializeOpts struct { - Body optional.Float32 + +func (r apiFakeOuterNumberSerializeRequest) Body(body float32) apiFakeOuterNumberSerializeRequest { + r.body = &body + return r } /* FakeOuterNumberSerialize Method for FakeOuterNumberSerialize Test serialization of outer number types * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *FakeOuterNumberSerializeOpts - Optional Parameters: - * @param "Body" (optional.Float32) - Input number as post body -@return float32 +@return apiFakeOuterNumberSerializeRequest */ -func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context) apiFakeOuterNumberSerializeRequest { + return apiFakeOuterNumberSerializeRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return float32 +*/ +func (r apiFakeOuterNumberSerializeRequest) Execute() (float32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -344,7 +396,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar localVarReturnValue float32 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterNumberSerialize") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterNumberSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -354,7 +406,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -373,16 +425,13 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - localVarPostBody = localVarOptionals.Body.Value() - } - - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -400,7 +449,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar } if localVarHTTPResponse.StatusCode == 200 { var v float32 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -410,7 +459,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -421,21 +470,36 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, nil } +type apiFakeOuterStringSerializeRequest struct { + ctx _context.Context + apiService *FakeApiService + body *string +} -// FakeOuterStringSerializeOpts Optional parameters for the method 'FakeOuterStringSerialize' -type FakeOuterStringSerializeOpts struct { - Body optional.String + +func (r apiFakeOuterStringSerializeRequest) Body(body string) apiFakeOuterStringSerializeRequest { + r.body = &body + return r } /* FakeOuterStringSerialize Method for FakeOuterStringSerialize Test serialization of outer string types * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *FakeOuterStringSerializeOpts - Optional Parameters: - * @param "Body" (optional.String) - Input string as post body -@return string +@return apiFakeOuterStringSerializeRequest */ -func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) { +func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context) apiFakeOuterStringSerializeRequest { + return apiFakeOuterStringSerializeRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return string +*/ +func (r apiFakeOuterStringSerializeRequest) Execute() (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -445,7 +509,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar localVarReturnValue string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.FakeOuterStringSerialize") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.FakeOuterStringSerialize") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -455,7 +519,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -474,16 +538,13 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - if localVarOptionals != nil && localVarOptionals.Body.IsSet() { - localVarPostBody = localVarOptionals.Body.Value() - } - - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.body + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -501,7 +562,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar } if localVarHTTPResponse.StatusCode == 200 { var v string - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -511,7 +572,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -522,23 +583,46 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVar return localVarReturnValue, localVarHTTPResponse, nil } +type apiTestBodyWithFileSchemaRequest struct { + ctx _context.Context + apiService *FakeApiService + fileSchemaTestClass *FileSchemaTestClass +} + + +func (r apiTestBodyWithFileSchemaRequest) FileSchemaTestClass(fileSchemaTestClass FileSchemaTestClass) apiTestBodyWithFileSchemaRequest { + r.fileSchemaTestClass = &fileSchemaTestClass + return r +} /* TestBodyWithFileSchema Method for TestBodyWithFileSchema -For this test, the body for this request much reference a schema named `File`. +For this test, the body for this request much reference a schema named `File`. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param fileSchemaTestClass +@return apiTestBodyWithFileSchemaRequest */ -func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, fileSchemaTestClass FileSchemaTestClass) (*_nethttp.Response, error) { +func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context) apiTestBodyWithFileSchemaRequest { + return apiTestBodyWithFileSchemaRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestBodyWithFileSchemaRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestBodyWithFileSchema") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithFileSchema") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -548,6 +632,10 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, fileSchema localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.fileSchemaTestClass == nil { + return nil, reportError("fileSchemaTestClass is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -567,13 +655,13 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, fileSchema localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &fileSchemaTestClass - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.fileSchemaTestClass + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -594,23 +682,51 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, fileSchema return localVarHTTPResponse, nil } +type apiTestBodyWithQueryParamsRequest struct { + ctx _context.Context + apiService *FakeApiService + query *string + user *User +} + + +func (r apiTestBodyWithQueryParamsRequest) Query(query string) apiTestBodyWithQueryParamsRequest { + r.query = &query + return r +} + +func (r apiTestBodyWithQueryParamsRequest) User(user User) apiTestBodyWithQueryParamsRequest { + r.user = &user + return r +} /* TestBodyWithQueryParams Method for TestBodyWithQueryParams * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param query - * @param user +@return apiTestBodyWithQueryParamsRequest */ -func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, user User) (*_nethttp.Response, error) { +func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context) apiTestBodyWithQueryParamsRequest { + return apiTestBodyWithQueryParamsRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestBodyWithQueryParamsRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestBodyWithQueryParams") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestBodyWithQueryParams") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -620,8 +736,16 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.query == nil { + return nil, reportError("query is required and must be specified") + } + + if r.user == nil { + return nil, reportError("user is required and must be specified") + } - localVarQueryParams.Add("query", parameterToString(query, "")) + localVarQueryParams.Add("query", parameterToString(*r.query, "")) // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -640,13 +764,13 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &user - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.user + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -667,15 +791,36 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query str return localVarHTTPResponse, nil } +type apiTestClientModelRequest struct { + ctx _context.Context + apiService *FakeApiService + client *Client +} + + +func (r apiTestClientModelRequest) Client(client Client) apiTestClientModelRequest { + r.client = &client + return r +} /* TestClientModel To test \"client\" model -To test \"client\" model +To test "client" model * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param client client model -@return Client +@return apiTestClientModelRequest */ -func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { +func (a *FakeApiService) TestClientModel(ctx _context.Context) apiTestClientModelRequest { + return apiTestClientModelRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return Client +*/ +func (r apiTestClientModelRequest) Execute() (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -685,7 +830,7 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestClientModel") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestClientModel") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -695,6 +840,10 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.client == nil { + return localVarReturnValue, nil, reportError("client is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -714,13 +863,13 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &client - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.client + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -738,7 +887,7 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C } if localVarHTTPResponse.StatusCode == 200 { var v Client - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -748,7 +897,7 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -759,51 +908,128 @@ func (a *FakeApiService) TestClientModel(ctx _context.Context, client Client) (C return localVarReturnValue, localVarHTTPResponse, nil } +type apiTestEndpointParametersRequest struct { + ctx _context.Context + apiService *FakeApiService + number *float32 + double *float64 + patternWithoutDelimiter *string + byte_ *string + integer *int32 + int32_ *int32 + int64_ *int64 + float *float32 + string_ *string + binary **os.File + date *string + dateTime *time.Time + password *string + callback *string +} -// TestEndpointParametersOpts Optional parameters for the method 'TestEndpointParameters' -type TestEndpointParametersOpts struct { - Integer optional.Int32 - Int32_ optional.Int32 - Int64_ optional.Int64 - Float optional.Float32 - String_ optional.String - Binary optional.Interface - Date optional.String - DateTime optional.Time - Password optional.String - Callback optional.String + +func (r apiTestEndpointParametersRequest) Number(number float32) apiTestEndpointParametersRequest { + r.number = &number + return r +} + +func (r apiTestEndpointParametersRequest) Double(double float64) apiTestEndpointParametersRequest { + r.double = &double + return r +} + +func (r apiTestEndpointParametersRequest) PatternWithoutDelimiter(patternWithoutDelimiter string) apiTestEndpointParametersRequest { + r.patternWithoutDelimiter = &patternWithoutDelimiter + return r +} + +func (r apiTestEndpointParametersRequest) Byte_(byte_ string) apiTestEndpointParametersRequest { + r.byte_ = &byte_ + return r +} + +func (r apiTestEndpointParametersRequest) Integer(integer int32) apiTestEndpointParametersRequest { + r.integer = &integer + return r +} + +func (r apiTestEndpointParametersRequest) Int32_(int32_ int32) apiTestEndpointParametersRequest { + r.int32_ = &int32_ + return r +} + +func (r apiTestEndpointParametersRequest) Int64_(int64_ int64) apiTestEndpointParametersRequest { + r.int64_ = &int64_ + return r +} + +func (r apiTestEndpointParametersRequest) Float(float float32) apiTestEndpointParametersRequest { + r.float = &float + return r +} + +func (r apiTestEndpointParametersRequest) String_(string_ string) apiTestEndpointParametersRequest { + r.string_ = &string_ + return r +} + +func (r apiTestEndpointParametersRequest) Binary(binary *os.File) apiTestEndpointParametersRequest { + r.binary = &binary + return r +} + +func (r apiTestEndpointParametersRequest) Date(date string) apiTestEndpointParametersRequest { + r.date = &date + return r +} + +func (r apiTestEndpointParametersRequest) DateTime(dateTime time.Time) apiTestEndpointParametersRequest { + r.dateTime = &dateTime + return r +} + +func (r apiTestEndpointParametersRequest) Password(password string) apiTestEndpointParametersRequest { + r.password = &password + return r +} + +func (r apiTestEndpointParametersRequest) Callback(callback string) apiTestEndpointParametersRequest { + r.callback = &callback + return r } /* TestEndpointParameters Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters +假端點 +偽のエンドポイント +가짜 엔드 포인트 + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param number None - * @param double None - * @param patternWithoutDelimiter None - * @param byte_ None - * @param optional nil or *TestEndpointParametersOpts - Optional Parameters: - * @param "Integer" (optional.Int32) - None - * @param "Int32_" (optional.Int32) - None - * @param "Int64_" (optional.Int64) - None - * @param "Float" (optional.Float32) - None - * @param "String_" (optional.String) - None - * @param "Binary" (optional.Interface of *os.File) - None - * @param "Date" (optional.String) - None - * @param "DateTime" (optional.Time) - None - * @param "Password" (optional.String) - None - * @param "Callback" (optional.String) - None +@return apiTestEndpointParametersRequest */ -func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) { +func (a *FakeApiService) TestEndpointParameters(ctx _context.Context) apiTestEndpointParametersRequest { + return apiTestEndpointParametersRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestEndpointParametersRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestEndpointParameters") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEndpointParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -813,19 +1039,35 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number flo localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if number < 32.1 { + + if r.number == nil { + return nil, reportError("number is required and must be specified") + } + if *r.number < 32.1 { return nil, reportError("number must be greater than 32.1") } - if number > 543.2 { + if *r.number > 543.2 { return nil, reportError("number must be less than 543.2") } - if double < 67.8 { + + if r.double == nil { + return nil, reportError("double is required and must be specified") + } + if *r.double < 67.8 { return nil, reportError("double must be greater than 67.8") } - if double > 123.4 { + if *r.double > 123.4 { return nil, reportError("double must be less than 123.4") } - + + if r.patternWithoutDelimiter == nil { + return nil, reportError("patternWithoutDelimiter is required and must be specified") + } + + if r.byte_ == nil { + return nil, reportError("byte_ is required and must be specified") + } + // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -843,33 +1085,29 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number flo if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.Integer.IsSet() { - localVarFormParams.Add("integer", parameterToString(localVarOptionals.Integer.Value(), "")) + if r.integer != nil { + localVarFormParams.Add("integer", parameterToString(*r.integer, "")) } - if localVarOptionals != nil && localVarOptionals.Int32_.IsSet() { - localVarFormParams.Add("int32", parameterToString(localVarOptionals.Int32_.Value(), "")) + if r.int32_ != nil { + localVarFormParams.Add("int32", parameterToString(*r.int32_, "")) } - if localVarOptionals != nil && localVarOptionals.Int64_.IsSet() { - localVarFormParams.Add("int64", parameterToString(localVarOptionals.Int64_.Value(), "")) + if r.int64_ != nil { + localVarFormParams.Add("int64", parameterToString(*r.int64_, "")) } - localVarFormParams.Add("number", parameterToString(number, "")) - if localVarOptionals != nil && localVarOptionals.Float.IsSet() { - localVarFormParams.Add("float", parameterToString(localVarOptionals.Float.Value(), "")) + localVarFormParams.Add("number", parameterToString(*r.number, "")) + if r.float != nil { + localVarFormParams.Add("float", parameterToString(*r.float, "")) } - localVarFormParams.Add("double", parameterToString(double, "")) - if localVarOptionals != nil && localVarOptionals.String_.IsSet() { - localVarFormParams.Add("string", parameterToString(localVarOptionals.String_.Value(), "")) + localVarFormParams.Add("double", parameterToString(*r.double, "")) + if r.string_ != nil { + localVarFormParams.Add("string", parameterToString(*r.string_, "")) } - localVarFormParams.Add("pattern_without_delimiter", parameterToString(patternWithoutDelimiter, "")) - localVarFormParams.Add("byte", parameterToString(byte_, "")) + localVarFormParams.Add("pattern_without_delimiter", parameterToString(*r.patternWithoutDelimiter, "")) + localVarFormParams.Add("byte", parameterToString(*r.byte_, "")) localVarFormFileName = "binary" var localVarFile *os.File - if localVarOptionals != nil && localVarOptionals.Binary.IsSet() { - localVarFileOk := false - localVarFile, localVarFileOk = localVarOptionals.Binary.Value().(*os.File) - if !localVarFileOk { - return nil, reportError("binary should be *os.File") - } + if r.binary != nil { + localVarFile = *r.binary } if localVarFile != nil { fbs, _ := _ioutil.ReadAll(localVarFile) @@ -877,24 +1115,24 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number flo localVarFileName = localVarFile.Name() localVarFile.Close() } - if localVarOptionals != nil && localVarOptionals.Date.IsSet() { - localVarFormParams.Add("date", parameterToString(localVarOptionals.Date.Value(), "")) + if r.date != nil { + localVarFormParams.Add("date", parameterToString(*r.date, "")) } - if localVarOptionals != nil && localVarOptionals.DateTime.IsSet() { - localVarFormParams.Add("dateTime", parameterToString(localVarOptionals.DateTime.Value(), "")) + if r.dateTime != nil { + localVarFormParams.Add("dateTime", parameterToString(*r.dateTime, "")) } - if localVarOptionals != nil && localVarOptionals.Password.IsSet() { - localVarFormParams.Add("password", parameterToString(localVarOptionals.Password.Value(), "")) + if r.password != nil { + localVarFormParams.Add("password", parameterToString(*r.password, "")) } - if localVarOptionals != nil && localVarOptionals.Callback.IsSet() { - localVarFormParams.Add("callback", parameterToString(localVarOptionals.Callback.Value(), "")) + if r.callback != nil { + localVarFormParams.Add("callback", parameterToString(*r.callback, "")) } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -915,43 +1153,88 @@ func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number flo return localVarHTTPResponse, nil } +type apiTestEnumParametersRequest struct { + ctx _context.Context + apiService *FakeApiService + enumHeaderStringArray *[]string + enumHeaderString *string + enumQueryStringArray *[]string + enumQueryString *string + enumQueryInteger *int32 + enumQueryDouble *float64 + enumFormStringArray *[]string + enumFormString *string +} -// TestEnumParametersOpts Optional parameters for the method 'TestEnumParameters' -type TestEnumParametersOpts struct { - EnumHeaderStringArray optional.Interface - EnumHeaderString optional.String - EnumQueryStringArray optional.Interface - EnumQueryString optional.String - EnumQueryInteger optional.Int32 - EnumQueryDouble optional.Float64 - EnumFormStringArray optional.Interface - EnumFormString optional.String + +func (r apiTestEnumParametersRequest) EnumHeaderStringArray(enumHeaderStringArray []string) apiTestEnumParametersRequest { + r.enumHeaderStringArray = &enumHeaderStringArray + return r +} + +func (r apiTestEnumParametersRequest) EnumHeaderString(enumHeaderString string) apiTestEnumParametersRequest { + r.enumHeaderString = &enumHeaderString + return r +} + +func (r apiTestEnumParametersRequest) EnumQueryStringArray(enumQueryStringArray []string) apiTestEnumParametersRequest { + r.enumQueryStringArray = &enumQueryStringArray + return r +} + +func (r apiTestEnumParametersRequest) EnumQueryString(enumQueryString string) apiTestEnumParametersRequest { + r.enumQueryString = &enumQueryString + return r +} + +func (r apiTestEnumParametersRequest) EnumQueryInteger(enumQueryInteger int32) apiTestEnumParametersRequest { + r.enumQueryInteger = &enumQueryInteger + return r +} + +func (r apiTestEnumParametersRequest) EnumQueryDouble(enumQueryDouble float64) apiTestEnumParametersRequest { + r.enumQueryDouble = &enumQueryDouble + return r +} + +func (r apiTestEnumParametersRequest) EnumFormStringArray(enumFormStringArray []string) apiTestEnumParametersRequest { + r.enumFormStringArray = &enumFormStringArray + return r +} + +func (r apiTestEnumParametersRequest) EnumFormString(enumFormString string) apiTestEnumParametersRequest { + r.enumFormString = &enumFormString + return r } /* TestEnumParameters To test enum parameters To test enum parameters * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param optional nil or *TestEnumParametersOpts - Optional Parameters: - * @param "EnumHeaderStringArray" (optional.Interface of []string) - Header parameter enum test (string array) - * @param "EnumHeaderString" (optional.String) - Header parameter enum test (string) - * @param "EnumQueryStringArray" (optional.Interface of []string) - Query parameter enum test (string array) - * @param "EnumQueryString" (optional.String) - Query parameter enum test (string) - * @param "EnumQueryInteger" (optional.Int32) - Query parameter enum test (double) - * @param "EnumQueryDouble" (optional.Float64) - Query parameter enum test (double) - * @param "EnumFormStringArray" (optional.Interface of []string) - Form parameter enum test (string array) - * @param "EnumFormString" (optional.String) - Form parameter enum test (string) +@return apiTestEnumParametersRequest */ -func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) { +func (a *FakeApiService) TestEnumParameters(ctx _context.Context) apiTestEnumParametersRequest { + return apiTestEnumParametersRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestEnumParametersRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestEnumParameters") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestEnumParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -961,9 +1244,9 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOption localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - - if localVarOptionals != nil && localVarOptionals.EnumQueryStringArray.IsSet() { - t:=localVarOptionals.EnumQueryStringArray.Value() + + if r.enumQueryStringArray != nil { + t := *r.enumQueryStringArray if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { @@ -973,14 +1256,14 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOption localVarQueryParams.Add("enum_query_string_array", parameterToString(t, "multi")) } } - if localVarOptionals != nil && localVarOptionals.EnumQueryString.IsSet() { - localVarQueryParams.Add("enum_query_string", parameterToString(localVarOptionals.EnumQueryString.Value(), "")) + if r.enumQueryString != nil { + localVarQueryParams.Add("enum_query_string", parameterToString(*r.enumQueryString, "")) } - if localVarOptionals != nil && localVarOptionals.EnumQueryInteger.IsSet() { - localVarQueryParams.Add("enum_query_integer", parameterToString(localVarOptionals.EnumQueryInteger.Value(), "")) + if r.enumQueryInteger != nil { + localVarQueryParams.Add("enum_query_integer", parameterToString(*r.enumQueryInteger, "")) } - if localVarOptionals != nil && localVarOptionals.EnumQueryDouble.IsSet() { - localVarQueryParams.Add("enum_query_double", parameterToString(localVarOptionals.EnumQueryDouble.Value(), "")) + if r.enumQueryDouble != nil { + localVarQueryParams.Add("enum_query_double", parameterToString(*r.enumQueryDouble, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -999,24 +1282,24 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOption if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.EnumHeaderStringArray.IsSet() { - localVarHeaderParams["enum_header_string_array"] = parameterToString(localVarOptionals.EnumHeaderStringArray.Value(), "csv") + if r.enumHeaderStringArray != nil { + localVarHeaderParams["enum_header_string_array"] = parameterToString(*r.enumHeaderStringArray, "csv") } - if localVarOptionals != nil && localVarOptionals.EnumHeaderString.IsSet() { - localVarHeaderParams["enum_header_string"] = parameterToString(localVarOptionals.EnumHeaderString.Value(), "") + if r.enumHeaderString != nil { + localVarHeaderParams["enum_header_string"] = parameterToString(*r.enumHeaderString, "") } - if localVarOptionals != nil && localVarOptionals.EnumFormStringArray.IsSet() { - localVarFormParams.Add("enum_form_string_array", parameterToString(localVarOptionals.EnumFormStringArray.Value(), "csv")) + if r.enumFormStringArray != nil { + localVarFormParams.Add("enum_form_string_array", parameterToString(*r.enumFormStringArray, "csv")) } - if localVarOptionals != nil && localVarOptionals.EnumFormString.IsSet() { - localVarFormParams.Add("enum_form_string", parameterToString(localVarOptionals.EnumFormString.Value(), "")) + if r.enumFormString != nil { + localVarFormParams.Add("enum_form_string", parameterToString(*r.enumFormString, "")) } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -1037,36 +1320,76 @@ func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOption return localVarHTTPResponse, nil } +type apiTestGroupParametersRequest struct { + ctx _context.Context + apiService *FakeApiService + requiredStringGroup *int32 + requiredBooleanGroup *bool + requiredInt64Group *int64 + stringGroup *int32 + booleanGroup *bool + int64Group *int64 +} -// TestGroupParametersOpts Optional parameters for the method 'TestGroupParameters' -type TestGroupParametersOpts struct { - StringGroup optional.Int32 - BooleanGroup optional.Bool - Int64Group optional.Int64 + +func (r apiTestGroupParametersRequest) RequiredStringGroup(requiredStringGroup int32) apiTestGroupParametersRequest { + r.requiredStringGroup = &requiredStringGroup + return r +} + +func (r apiTestGroupParametersRequest) RequiredBooleanGroup(requiredBooleanGroup bool) apiTestGroupParametersRequest { + r.requiredBooleanGroup = &requiredBooleanGroup + return r +} + +func (r apiTestGroupParametersRequest) RequiredInt64Group(requiredInt64Group int64) apiTestGroupParametersRequest { + r.requiredInt64Group = &requiredInt64Group + return r +} + +func (r apiTestGroupParametersRequest) StringGroup(stringGroup int32) apiTestGroupParametersRequest { + r.stringGroup = &stringGroup + return r +} + +func (r apiTestGroupParametersRequest) BooleanGroup(booleanGroup bool) apiTestGroupParametersRequest { + r.booleanGroup = &booleanGroup + return r +} + +func (r apiTestGroupParametersRequest) Int64Group(int64Group int64) apiTestGroupParametersRequest { + r.int64Group = &int64Group + return r } /* TestGroupParameters Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param requiredStringGroup Required String in group parameters - * @param requiredBooleanGroup Required Boolean in group parameters - * @param requiredInt64Group Required Integer in group parameters - * @param optional nil or *TestGroupParametersOpts - Optional Parameters: - * @param "StringGroup" (optional.Int32) - String in group parameters - * @param "BooleanGroup" (optional.Bool) - Boolean in group parameters - * @param "Int64Group" (optional.Int64) - Integer in group parameters +@return apiTestGroupParametersRequest */ -func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) { +func (a *FakeApiService) TestGroupParameters(ctx _context.Context) apiTestGroupParametersRequest { + return apiTestGroupParametersRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestGroupParametersRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestGroupParameters") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestGroupParameters") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1076,14 +1399,26 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - - localVarQueryParams.Add("required_string_group", parameterToString(requiredStringGroup, "")) - localVarQueryParams.Add("required_int64_group", parameterToString(requiredInt64Group, "")) - if localVarOptionals != nil && localVarOptionals.StringGroup.IsSet() { - localVarQueryParams.Add("string_group", parameterToString(localVarOptionals.StringGroup.Value(), "")) + + if r.requiredStringGroup == nil { + return nil, reportError("requiredStringGroup is required and must be specified") } - if localVarOptionals != nil && localVarOptionals.Int64Group.IsSet() { - localVarQueryParams.Add("int64_group", parameterToString(localVarOptionals.Int64Group.Value(), "")) + + if r.requiredBooleanGroup == nil { + return nil, reportError("requiredBooleanGroup is required and must be specified") + } + + if r.requiredInt64Group == nil { + return nil, reportError("requiredInt64Group is required and must be specified") + } + + localVarQueryParams.Add("required_string_group", parameterToString(*r.requiredStringGroup, "")) + localVarQueryParams.Add("required_int64_group", parameterToString(*r.requiredInt64Group, "")) + if r.stringGroup != nil { + localVarQueryParams.Add("string_group", parameterToString(*r.stringGroup, "")) + } + if r.int64Group != nil { + localVarQueryParams.Add("int64_group", parameterToString(*r.int64Group, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1102,16 +1437,16 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - localVarHeaderParams["required_boolean_group"] = parameterToString(requiredBooleanGroup, "") - if localVarOptionals != nil && localVarOptionals.BooleanGroup.IsSet() { - localVarHeaderParams["boolean_group"] = parameterToString(localVarOptionals.BooleanGroup.Value(), "") + localVarHeaderParams["required_boolean_group"] = parameterToString(*r.requiredBooleanGroup, "") + if r.booleanGroup != nil { + localVarHeaderParams["boolean_group"] = parameterToString(*r.booleanGroup, "") } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -1132,22 +1467,45 @@ func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStrin return localVarHTTPResponse, nil } +type apiTestInlineAdditionalPropertiesRequest struct { + ctx _context.Context + apiService *FakeApiService + requestBody *map[string]string +} + + +func (r apiTestInlineAdditionalPropertiesRequest) RequestBody(requestBody map[string]string) apiTestInlineAdditionalPropertiesRequest { + r.requestBody = &requestBody + return r +} /* TestInlineAdditionalProperties test inline additionalProperties * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param requestBody request body +@return apiTestInlineAdditionalPropertiesRequest */ -func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, requestBody map[string]string) (*_nethttp.Response, error) { +func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context) apiTestInlineAdditionalPropertiesRequest { + return apiTestInlineAdditionalPropertiesRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestInlineAdditionalPropertiesRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestInlineAdditionalProperties") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestInlineAdditionalProperties") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1157,6 +1515,10 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, re localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.requestBody == nil { + return nil, reportError("requestBody is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -1176,13 +1538,13 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, re localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &requestBody - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.requestBody + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -1203,23 +1565,51 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, re return localVarHTTPResponse, nil } +type apiTestJsonFormDataRequest struct { + ctx _context.Context + apiService *FakeApiService + param *string + param2 *string +} + + +func (r apiTestJsonFormDataRequest) Param(param string) apiTestJsonFormDataRequest { + r.param = ¶m + return r +} + +func (r apiTestJsonFormDataRequest) Param2(param2 string) apiTestJsonFormDataRequest { + r.param2 = ¶m2 + return r +} /* TestJsonFormData test json serialization of form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param param field1 - * @param param2 field2 +@return apiTestJsonFormDataRequest */ -func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) { +func (a *FakeApiService) TestJsonFormData(ctx _context.Context) apiTestJsonFormDataRequest { + return apiTestJsonFormDataRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestJsonFormDataRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestJsonFormData") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestJsonFormData") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1229,6 +1619,14 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.param == nil { + return nil, reportError("param is required and must be specified") + } + + if r.param2 == nil { + return nil, reportError("param2 is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -1247,14 +1645,14 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - localVarFormParams.Add("param", parameterToString(param, "")) - localVarFormParams.Add("param2", parameterToString(param2, "")) - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarFormParams.Add("param", parameterToString(*r.param, "")) + localVarFormParams.Add("param2", parameterToString(*r.param2, "")) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -1275,27 +1673,70 @@ func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, pa return localVarHTTPResponse, nil } +type apiTestQueryParameterCollectionFormatRequest struct { + ctx _context.Context + apiService *FakeApiService + pipe *[]string + ioutil *[]string + http *[]string + url *[]string + context *[]string +} + + +func (r apiTestQueryParameterCollectionFormatRequest) Pipe(pipe []string) apiTestQueryParameterCollectionFormatRequest { + r.pipe = &pipe + return r +} + +func (r apiTestQueryParameterCollectionFormatRequest) Ioutil(ioutil []string) apiTestQueryParameterCollectionFormatRequest { + r.ioutil = &ioutil + return r +} + +func (r apiTestQueryParameterCollectionFormatRequest) Http(http []string) apiTestQueryParameterCollectionFormatRequest { + r.http = &http + return r +} + +func (r apiTestQueryParameterCollectionFormatRequest) Url(url []string) apiTestQueryParameterCollectionFormatRequest { + r.url = &url + return r +} + +func (r apiTestQueryParameterCollectionFormatRequest) Context(context []string) apiTestQueryParameterCollectionFormatRequest { + r.context = &context + return r +} /* TestQueryParameterCollectionFormat Method for TestQueryParameterCollectionFormat To test the collection format in query parameters * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param pipe - * @param ioutil - * @param http - * @param url - * @param context +@return apiTestQueryParameterCollectionFormatRequest */ -func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) { +func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context) apiTestQueryParameterCollectionFormatRequest { + return apiTestQueryParameterCollectionFormatRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiTestQueryParameterCollectionFormatRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeApiService.TestQueryParameterCollectionFormat") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryParameterCollectionFormat") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -1305,8 +1746,28 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.pipe == nil { + return nil, reportError("pipe is required and must be specified") + } + + if r.ioutil == nil { + return nil, reportError("ioutil is required and must be specified") + } + + if r.http == nil { + return nil, reportError("http is required and must be specified") + } + + if r.url == nil { + return nil, reportError("url is required and must be specified") + } + + if r.context == nil { + return nil, reportError("context is required and must be specified") + } - t:=pipe + t := *r.pipe if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { @@ -1315,10 +1776,10 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context } else { localVarQueryParams.Add("pipe", parameterToString(t, "multi")) } - localVarQueryParams.Add("ioutil", parameterToString(ioutil, "csv")) - localVarQueryParams.Add("http", parameterToString(http, "space")) - localVarQueryParams.Add("url", parameterToString(url, "csv")) - t:=context + localVarQueryParams.Add("ioutil", parameterToString(*r.ioutil, "csv")) + localVarQueryParams.Add("http", parameterToString(*r.http, "space")) + localVarQueryParams.Add("url", parameterToString(*r.url, "csv")) + t := *r.context if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { @@ -1344,12 +1805,12 @@ func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go index a85385b85f..d305d41b1e 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_fake_classname_tags123.go @@ -24,14 +24,36 @@ var ( // FakeClassnameTags123ApiService FakeClassnameTags123Api service type FakeClassnameTags123ApiService service +type apiTestClassnameRequest struct { + ctx _context.Context + apiService *FakeClassnameTags123ApiService + client *Client +} + + +func (r apiTestClassnameRequest) Client(client Client) apiTestClassnameRequest { + r.client = &client + return r +} + /* TestClassname To test class name in snake case To test class name in snake case * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param client client model -@return Client +@return apiTestClassnameRequest */ -func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, client Client) (Client, *_nethttp.Response, error) { +func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) apiTestClassnameRequest { + return apiTestClassnameRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return Client +*/ +func (r apiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPatch localVarPostBody interface{} @@ -41,7 +63,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli localVarReturnValue Client ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "FakeClassnameTags123ApiService.TestClassname") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -51,6 +73,10 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.client == nil { + return localVarReturnValue, nil, reportError("client is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -70,10 +96,10 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &client - if ctx != nil { + localVarPostBody = r.client + if r.ctx != nil { // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if auth, ok := auth["api_key_query"]; ok { var key string if auth.Prefix != "" { @@ -85,12 +111,12 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli } } } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -108,7 +134,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli } if localVarHTTPResponse.StatusCode == 200 { var v Client - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -118,7 +144,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, cli return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go index e52c8158f5..d304344051 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_pet.go @@ -15,7 +15,6 @@ import ( _nethttp "net/http" _neturl "net/url" "strings" - "github.com/antihax/optional" "os" ) @@ -27,21 +26,45 @@ var ( // PetApiService PetApi service type PetApiService service +type apiAddPetRequest struct { + ctx _context.Context + apiService *PetApiService + pet *Pet +} + + +func (r apiAddPetRequest) Pet(pet Pet) apiAddPetRequest { + r.pet = &pet + return r +} + /* AddPet Add a new pet to the store * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param pet Pet object that needs to be added to the store +@return apiAddPetRequest */ -func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { +func (a *PetApiService) AddPet(ctx _context.Context) apiAddPetRequest { + return apiAddPetRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiAddPetRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.AddPet") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -51,6 +74,10 @@ func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Respons localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.pet == nil { + return nil, reportError("pet is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json", "application/xml"} @@ -70,13 +97,13 @@ func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Respons localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &pet - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.pet + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -97,40 +124,60 @@ func (a *PetApiService) AddPet(ctx _context.Context, pet Pet) (*_nethttp.Respons return localVarHTTPResponse, nil } +type apiDeletePetRequest struct { + ctx _context.Context + apiService *PetApiService + petId int64 + apiKey *string +} -// DeletePetOpts Optional parameters for the method 'DeletePet' -type DeletePetOpts struct { - ApiKey optional.String + +func (r apiDeletePetRequest) ApiKey(apiKey string) apiDeletePetRequest { + r.apiKey = &apiKey + return r } /* DeletePet Deletes a pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId Pet id to delete - * @param optional nil or *DeletePetOpts - Optional Parameters: - * @param "ApiKey" (optional.String) - +@return apiDeletePetRequest */ -func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) { +func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) apiDeletePetRequest { + return apiDeletePetRequest{ + apiService: a, + ctx: ctx, + petId: petId, + } +} + +/* +Execute executes the request + +*/ +func (r apiDeletePetRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.DeletePet") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(r.petId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -148,15 +195,15 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() { - localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.Value(), "") + if r.apiKey != nil { + localVarHeaderParams["api_key"] = parameterToString(*r.apiKey, "") } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -177,15 +224,36 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOpt return localVarHTTPResponse, nil } +type apiFindPetsByStatusRequest struct { + ctx _context.Context + apiService *PetApiService + status *[]string +} + + +func (r apiFindPetsByStatusRequest) Status(status []string) apiFindPetsByStatusRequest { + r.status = &status + return r +} /* FindPetsByStatus Finds Pets by status Multiple status values can be provided with comma separated strings * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param status Status values that need to be considered for filter -@return []Pet +@return apiFindPetsByStatusRequest */ -func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetApiService) FindPetsByStatus(ctx _context.Context) apiFindPetsByStatusRequest { + return apiFindPetsByStatusRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return []Pet +*/ +func (r apiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -195,7 +263,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) localVarReturnValue []Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.FindPetsByStatus") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -205,8 +273,12 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.status == nil { + return localVarReturnValue, nil, reportError("status is required and must be specified") + } - localVarQueryParams.Add("status", parameterToString(status, "csv")) + localVarQueryParams.Add("status", parameterToString(*r.status, "csv")) // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -224,12 +296,12 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -247,7 +319,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) } if localVarHTTPResponse.StatusCode == 200 { var v []Pet - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -258,7 +330,7 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -269,15 +341,36 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) return localVarReturnValue, localVarHTTPResponse, nil } +type apiFindPetsByTagsRequest struct { + ctx _context.Context + apiService *PetApiService + tags *[]string +} + + +func (r apiFindPetsByTagsRequest) Tags(tags []string) apiFindPetsByTagsRequest { + r.tags = &tags + return r +} /* FindPetsByTags Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param tags Tags to filter by -@return []Pet +@return apiFindPetsByTagsRequest */ -func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) { +func (a *PetApiService) FindPetsByTags(ctx _context.Context) apiFindPetsByTagsRequest { + return apiFindPetsByTagsRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return []Pet +*/ +func (r apiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -287,7 +380,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P localVarReturnValue []Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.FindPetsByTags") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -297,8 +390,12 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.tags == nil { + return localVarReturnValue, nil, reportError("tags is required and must be specified") + } - localVarQueryParams.Add("tags", parameterToString(tags, "csv")) + localVarQueryParams.Add("tags", parameterToString(*r.tags, "csv")) // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -316,12 +413,12 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -339,7 +436,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P } if localVarHTTPResponse.StatusCode == 200 { var v []Pet - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -350,7 +447,7 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -361,15 +458,33 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]P return localVarReturnValue, localVarHTTPResponse, nil } +type apiGetPetByIdRequest struct { + ctx _context.Context + apiService *PetApiService + petId int64 +} + /* GetPetById Find pet by ID Returns a single pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId ID of pet to return -@return Pet +@return apiGetPetByIdRequest */ -func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) { +func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) apiGetPetByIdRequest { + return apiGetPetByIdRequest{ + apiService: a, + ctx: ctx, + petId: petId, + } +} + +/* +Execute executes the request + @return Pet +*/ +func (r apiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -379,17 +494,18 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne localVarReturnValue Pet ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.GetPetById") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(r.petId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -408,9 +524,9 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if ctx != nil { + if r.ctx != nil { // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if auth, ok := auth["api_key"]; ok { var key string if auth.Prefix != "" { @@ -422,12 +538,12 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne } } } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -445,7 +561,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne } if localVarHTTPResponse.StatusCode == 200 { var v Pet - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -456,7 +572,7 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -467,22 +583,45 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_ne return localVarReturnValue, localVarHTTPResponse, nil } +type apiUpdatePetRequest struct { + ctx _context.Context + apiService *PetApiService + pet *Pet +} + + +func (r apiUpdatePetRequest) Pet(pet Pet) apiUpdatePetRequest { + r.pet = &pet + return r +} /* UpdatePet Update an existing pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param pet Pet object that needs to be added to the store +@return apiUpdatePetRequest */ -func (a *PetApiService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Response, error) { +func (a *PetApiService) UpdatePet(ctx _context.Context) apiUpdatePetRequest { + return apiUpdatePetRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiUpdatePetRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UpdatePet") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -492,6 +631,10 @@ func (a *PetApiService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Resp localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.pet == nil { + return nil, reportError("pet is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json", "application/xml"} @@ -511,13 +654,13 @@ func (a *PetApiService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Resp localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &pet - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.pet + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -538,42 +681,66 @@ func (a *PetApiService) UpdatePet(ctx _context.Context, pet Pet) (*_nethttp.Resp return localVarHTTPResponse, nil } +type apiUpdatePetWithFormRequest struct { + ctx _context.Context + apiService *PetApiService + petId int64 + name *string + status *string +} -// UpdatePetWithFormOpts Optional parameters for the method 'UpdatePetWithForm' -type UpdatePetWithFormOpts struct { - Name optional.String - Status optional.String + +func (r apiUpdatePetWithFormRequest) Name(name string) apiUpdatePetWithFormRequest { + r.name = &name + return r +} + +func (r apiUpdatePetWithFormRequest) Status(status string) apiUpdatePetWithFormRequest { + r.status = &status + return r } /* UpdatePetWithForm Updates a pet in the store with form data * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId ID of pet that needs to be updated - * @param optional nil or *UpdatePetWithFormOpts - Optional Parameters: - * @param "Name" (optional.String) - Updated name of the pet - * @param "Status" (optional.String) - Updated status of the pet +@return apiUpdatePetWithFormRequest */ -func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) { +func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) apiUpdatePetWithFormRequest { + return apiUpdatePetWithFormRequest{ + apiService: a, + ctx: ctx, + petId: petId, + } +} + +/* +Execute executes the request + +*/ +func (r apiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UpdatePetWithForm") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(r.petId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + + // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -591,18 +758,18 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, loc if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.Name.IsSet() { - localVarFormParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) + if r.name != nil { + localVarFormParams.Add("name", parameterToString(*r.name, "")) } - if localVarOptionals != nil && localVarOptionals.Status.IsSet() { - localVarFormParams.Add("status", parameterToString(localVarOptionals.Status.Value(), "")) + if r.status != nil { + localVarFormParams.Add("status", parameterToString(*r.status, "")) } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -623,23 +790,44 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, loc return localVarHTTPResponse, nil } +type apiUploadFileRequest struct { + ctx _context.Context + apiService *PetApiService + petId int64 + additionalMetadata *string + file **os.File +} -// UploadFileOpts Optional parameters for the method 'UploadFile' -type UploadFileOpts struct { - AdditionalMetadata optional.String - File optional.Interface + +func (r apiUploadFileRequest) AdditionalMetadata(additionalMetadata string) apiUploadFileRequest { + r.additionalMetadata = &additionalMetadata + return r +} + +func (r apiUploadFileRequest) File(file *os.File) apiUploadFileRequest { + r.file = &file + return r } /* UploadFile uploads an image * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId ID of pet to update - * @param optional nil or *UploadFileOpts - Optional Parameters: - * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server - * @param "File" (optional.Interface of *os.File) - file to upload -@return ApiResponse +@return apiUploadFileRequest */ -func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) apiUploadFileRequest { + return apiUploadFileRequest{ + apiService: a, + ctx: ctx, + petId: petId, + } +} + +/* +Execute executes the request + @return ApiResponse +*/ +func (r apiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -649,18 +837,19 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp localVarReturnValue ApiResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UploadFile") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/pet/{petId}/uploadImage" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(r.petId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + + // to determine the Content-Type header localVarHTTPContentTypes := []string{"multipart/form-data"} @@ -678,17 +867,13 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { - localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) + if r.additionalMetadata != nil { + localVarFormParams.Add("additionalMetadata", parameterToString(*r.additionalMetadata, "")) } localVarFormFileName = "file" var localVarFile *os.File - if localVarOptionals != nil && localVarOptionals.File.IsSet() { - localVarFileOk := false - localVarFile, localVarFileOk = localVarOptionals.File.Value().(*os.File) - if !localVarFileOk { - return localVarReturnValue, nil, reportError("file should be *os.File") - } + if r.file != nil { + localVarFile = *r.file } if localVarFile != nil { fbs, _ := _ioutil.ReadAll(localVarFile) @@ -696,12 +881,12 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp localVarFileName = localVarFile.Name() localVarFile.Close() } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -719,7 +904,7 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp } if localVarHTTPResponse.StatusCode == 200 { var v ApiResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -729,7 +914,7 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -740,22 +925,44 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOp return localVarReturnValue, localVarHTTPResponse, nil } +type apiUploadFileWithRequiredFileRequest struct { + ctx _context.Context + apiService *PetApiService + petId int64 + requiredFile **os.File + additionalMetadata *string +} -// UploadFileWithRequiredFileOpts Optional parameters for the method 'UploadFileWithRequiredFile' -type UploadFileWithRequiredFileOpts struct { - AdditionalMetadata optional.String + +func (r apiUploadFileWithRequiredFileRequest) RequiredFile(requiredFile *os.File) apiUploadFileWithRequiredFileRequest { + r.requiredFile = &requiredFile + return r +} + +func (r apiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetadata string) apiUploadFileWithRequiredFileRequest { + r.additionalMetadata = &additionalMetadata + return r } /* UploadFileWithRequiredFile uploads an image (required) * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param petId ID of pet to update - * @param requiredFile file to upload - * @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters: - * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server -@return ApiResponse +@return apiUploadFileWithRequiredFileRequest */ -func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) { +func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64) apiUploadFileWithRequiredFileRequest { + return apiUploadFileWithRequiredFileRequest{ + apiService: a, + ctx: ctx, + petId: petId, + } +} + +/* +Execute executes the request + @return ApiResponse +*/ +func (r apiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -765,18 +972,23 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i localVarReturnValue ApiResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "PetApiService.UploadFileWithRequiredFile") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/fake/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(petId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(parameterToString(r.petId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - + + + if r.requiredFile == nil { + return localVarReturnValue, nil, reportError("requiredFile is required and must be specified") + } + // to determine the Content-Type header localVarHTTPContentTypes := []string{"multipart/form-data"} @@ -794,23 +1006,23 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() { - localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), "")) + if r.additionalMetadata != nil { + localVarFormParams.Add("additionalMetadata", parameterToString(*r.additionalMetadata, "")) } localVarFormFileName = "requiredFile" - localVarFile := requiredFile + localVarFile := *r.requiredFile if localVarFile != nil { fbs, _ := _ioutil.ReadAll(localVarFile) localVarFileBytes = fbs localVarFileName = localVarFile.Name() localVarFile.Close() } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -828,7 +1040,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i } if localVarHTTPResponse.StatusCode == 200 { var v ApiResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -838,7 +1050,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go index f1162bb61c..3e82fd51a7 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_store.go @@ -25,32 +25,54 @@ var ( // StoreApiService StoreApi service type StoreApiService service +type apiDeleteOrderRequest struct { + ctx _context.Context + apiService *StoreApiService + orderId string +} + + /* DeleteOrder Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orderId ID of the order that needs to be deleted +@return apiDeleteOrderRequest */ -func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) { +func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) apiDeleteOrderRequest { + return apiDeleteOrderRequest{ + apiService: a, + ctx: ctx, + orderId: orderId, + } +} + +/* +Execute executes the request + +*/ +func (r apiDeleteOrderRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.DeleteOrder") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(r.orderId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -69,12 +91,12 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -95,14 +117,30 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_n return localVarHTTPResponse, nil } +type apiGetInventoryRequest struct { + ctx _context.Context + apiService *StoreApiService +} + /* GetInventory Returns pet inventories by status Returns a map of status codes to quantities * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return map[string]int32 +@return apiGetInventoryRequest */ -func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) { +func (a *StoreApiService) GetInventory(ctx _context.Context) apiGetInventoryRequest { + return apiGetInventoryRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return map[string]int32 +*/ +func (r apiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -112,7 +150,7 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, localVarReturnValue map[string]int32 ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.GetInventory") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -140,9 +178,9 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if ctx != nil { + if r.ctx != nil { // API Key Authentication - if auth, ok := ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { if auth, ok := auth["api_key"]; ok { var key string if auth.Prefix != "" { @@ -154,12 +192,12 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, } } } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -177,7 +215,7 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, } if localVarHTTPResponse.StatusCode == 200 { var v map[string]int32 - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -187,7 +225,7 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -198,15 +236,33 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, return localVarReturnValue, localVarHTTPResponse, nil } +type apiGetOrderByIdRequest struct { + ctx _context.Context + apiService *StoreApiService + orderId int64 +} + /* GetOrderById Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param orderId ID of pet that needs to be fetched -@return Order +@return apiGetOrderByIdRequest */ -func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) { +func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) apiGetOrderByIdRequest { + return apiGetOrderByIdRequest{ + apiService: a, + ctx: ctx, + orderId: orderId, + } +} + +/* +Execute executes the request + @return Order +*/ +func (r apiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -216,21 +272,22 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord localVarReturnValue Order ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.GetOrderById") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(orderId, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(parameterToString(r.orderId, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if orderId < 1 { + + if r.orderId < 1 { return localVarReturnValue, nil, reportError("orderId must be greater than 1") } - if orderId > 5 { + if r.orderId > 5 { return localVarReturnValue, nil, reportError("orderId must be less than 5") } @@ -251,12 +308,12 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -274,7 +331,7 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord } if localVarHTTPResponse.StatusCode == 200 { var v Order - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -285,7 +342,7 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -296,14 +353,35 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Ord return localVarReturnValue, localVarHTTPResponse, nil } +type apiPlaceOrderRequest struct { + ctx _context.Context + apiService *StoreApiService + order *Order +} + + +func (r apiPlaceOrderRequest) Order(order Order) apiPlaceOrderRequest { + r.order = &order + return r +} /* PlaceOrder Place an order for a pet * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param order order placed for purchasing the pet -@return Order +@return apiPlaceOrderRequest */ -func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, *_nethttp.Response, error) { +func (a *StoreApiService) PlaceOrder(ctx _context.Context) apiPlaceOrderRequest { + return apiPlaceOrderRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return Order +*/ +func (r apiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -313,7 +391,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, localVarReturnValue Order ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "StoreApiService.PlaceOrder") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -323,6 +401,10 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.order == nil { + return localVarReturnValue, nil, reportError("order is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -342,13 +424,13 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &order - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.order + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -366,7 +448,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, } if localVarHTTPResponse.StatusCode == 200 { var v Order - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -377,7 +459,7 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context, order Order) (Order, return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go index 3d3d76f52a..318759017a 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api_user.go @@ -25,22 +25,46 @@ var ( // UserApiService UserApi service type UserApiService service +type apiCreateUserRequest struct { + ctx _context.Context + apiService *UserApiService + user *User +} + + +func (r apiCreateUserRequest) User(user User) apiCreateUserRequest { + r.user = &user + return r +} + /* CreateUser Create user This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param user Created user object +@return apiCreateUserRequest */ -func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUser(ctx _context.Context) apiCreateUserRequest { + return apiCreateUserRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiCreateUserRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -50,6 +74,10 @@ func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp. localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.user == nil { + return nil, reportError("user is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -69,13 +97,13 @@ func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp. localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &user - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.user + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -96,22 +124,45 @@ func (a *UserApiService) CreateUser(ctx _context.Context, user User) (*_nethttp. return localVarHTTPResponse, nil } +type apiCreateUsersWithArrayInputRequest struct { + ctx _context.Context + apiService *UserApiService + user *[]User +} + + +func (r apiCreateUsersWithArrayInputRequest) User(user []User) apiCreateUsersWithArrayInputRequest { + r.user = &user + return r +} /* CreateUsersWithArrayInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param user List of user object +@return apiCreateUsersWithArrayInputRequest */ -func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) apiCreateUsersWithArrayInputRequest { + return apiCreateUsersWithArrayInputRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUsersWithArrayInput") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -121,6 +172,10 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user [] localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.user == nil { + return nil, reportError("user is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -140,13 +195,13 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user [] localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &user - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.user + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -167,22 +222,45 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, user [] return localVarHTTPResponse, nil } +type apiCreateUsersWithListInputRequest struct { + ctx _context.Context + apiService *UserApiService + user *[]User +} + + +func (r apiCreateUsersWithListInputRequest) User(user []User) apiCreateUsersWithListInputRequest { + r.user = &user + return r +} /* CreateUsersWithListInput Creates list of users with given input array * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param user List of user object +@return apiCreateUsersWithListInputRequest */ -func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []User) (*_nethttp.Response, error) { +func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) apiCreateUsersWithListInputRequest { + return apiCreateUsersWithListInputRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.CreateUsersWithListInput") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -192,6 +270,10 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []U localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.user == nil { + return nil, reportError("user is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -211,13 +293,13 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []U localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &user - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.user + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -238,33 +320,54 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, user []U return localVarHTTPResponse, nil } +type apiDeleteUserRequest struct { + ctx _context.Context + apiService *UserApiService + username string +} + /* DeleteUser Delete user This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username The name that needs to be deleted +@return apiDeleteUserRequest */ -func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) { +func (a *UserApiService) DeleteUser(ctx _context.Context, username string) apiDeleteUserRequest { + return apiDeleteUserRequest{ + apiService: a, + ctx: ctx, + username: username, + } +} + +/* +Execute executes the request + +*/ +func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.DeleteUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(username, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(r.username, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -283,12 +386,12 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_ne if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -309,14 +412,32 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_ne return localVarHTTPResponse, nil } +type apiGetUserByNameRequest struct { + ctx _context.Context + apiService *UserApiService + username string +} + /* GetUserByName Get user by user name * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username The name that needs to be fetched. Use user1 for testing. -@return User +@return apiGetUserByNameRequest */ -func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) { +func (a *UserApiService) GetUserByName(ctx _context.Context, username string) apiGetUserByNameRequest { + return apiGetUserByNameRequest{ + apiService: a, + ctx: ctx, + username: username, + } +} + +/* +Execute executes the request + @return User +*/ +func (r apiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -326,17 +447,18 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U localVarReturnValue User ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.GetUserByName") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(username, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(r.username, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -355,12 +477,12 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -378,7 +500,7 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U } if localVarHTTPResponse.StatusCode == 200 { var v User - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -389,7 +511,7 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -400,15 +522,41 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (U return localVarReturnValue, localVarHTTPResponse, nil } +type apiLoginUserRequest struct { + ctx _context.Context + apiService *UserApiService + username *string + password *string +} + + +func (r apiLoginUserRequest) Username(username string) apiLoginUserRequest { + r.username = &username + return r +} + +func (r apiLoginUserRequest) Password(password string) apiLoginUserRequest { + r.password = &password + return r +} /* LoginUser Logs user into the system * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param username The user name for login - * @param password The password for login in clear text -@return string +@return apiLoginUserRequest */ -func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) { +func (a *UserApiService) LoginUser(ctx _context.Context) apiLoginUserRequest { + return apiLoginUserRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + @return string +*/ +func (r apiLoginUserRequest) Execute() (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -418,7 +566,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo localVarReturnValue string ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.LoginUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } @@ -428,9 +576,17 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + if r.username == nil { + return localVarReturnValue, nil, reportError("username is required and must be specified") + } + + if r.password == nil { + return localVarReturnValue, nil, reportError("password is required and must be specified") + } - localVarQueryParams.Add("username", parameterToString(username, "")) - localVarQueryParams.Add("password", parameterToString(password, "")) + localVarQueryParams.Add("username", parameterToString(*r.username, "")) + localVarQueryParams.Add("password", parameterToString(*r.password, "")) // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -448,12 +604,12 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarReturnValue, localVarHTTPResponse, err } @@ -471,7 +627,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo } if localVarHTTPResponse.StatusCode == 200 { var v string - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr @@ -482,7 +638,7 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo return localVarReturnValue, localVarHTTPResponse, newErr } - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr := GenericOpenAPIError{ body: localVarBody, @@ -493,21 +649,39 @@ func (a *UserApiService) LoginUser(ctx _context.Context, username string, passwo return localVarReturnValue, localVarHTTPResponse, nil } +type apiLogoutUserRequest struct { + ctx _context.Context + apiService *UserApiService +} + /* LogoutUser Logs out current logged in user session * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +@return apiLogoutUserRequest */ -func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) { +func (a *UserApiService) LogoutUser(ctx _context.Context) apiLogoutUserRequest { + return apiLogoutUserRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + +*/ +func (r apiLogoutUserRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.LogoutUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } @@ -535,12 +709,12 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, e if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } @@ -561,34 +735,64 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, e return localVarHTTPResponse, nil } +type apiUpdateUserRequest struct { + ctx _context.Context + apiService *UserApiService + username string + user *User +} + + +func (r apiUpdateUserRequest) User(user User) apiUpdateUserRequest { + r.user = &user + return r +} /* UpdateUser Updated user This can only be done by the logged in user. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param username name that need to be deleted - * @param user Updated user object +@return apiUpdateUserRequest */ -func (a *UserApiService) UpdateUser(ctx _context.Context, username string, user User) (*_nethttp.Response, error) { +func (a *UserApiService) UpdateUser(ctx _context.Context, username string) apiUpdateUserRequest { + return apiUpdateUserRequest{ + apiService: a, + ctx: ctx, + username: username, + } +} + +/* +Execute executes the request + +*/ +func (r apiUpdateUserRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + ) - localBasePath, err := a.client.cfg.ServerURLWithContext(ctx, "UserApiService.UpdateUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(username, "")) , -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(parameterToString(r.username, "")) , -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + + + if r.user == nil { + return nil, reportError("user is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -608,13 +812,13 @@ func (a *UserApiService) UpdateUser(ctx _context.Context, username string, user localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = &user - r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + localVarPostBody = r.user + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err } - localVarHTTPResponse, err := a.client.callAPI(r) + localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { return localVarHTTPResponse, err } diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md index fb674f202e..c4e2c2863b 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/AnotherFakeApi.md @@ -10,19 +10,24 @@ Method | HTTP request | Description ## Call123TestSpecialTags -> Client Call123TestSpecialTags(ctx, client) +> Client Call123TestSpecialTags(ctx).Client(client).Execute() To test special tags -To test special tags and operation ID starting with number -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCall123TestSpecialTagsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**client** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md) | client model | ### Return type diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md index daf779c8e3..4dd83db246 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/DefaultApi.md @@ -10,14 +10,19 @@ Method | HTTP request | Description ## FooGet -> InlineResponseDefault FooGet(ctx, ) +> InlineResponseDefault FooGet(ctx).Execute() -### Required Parameters +### Path Parameters This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiFooGetRequest struct via the builder pattern + + ### Return type [**InlineResponseDefault**](inline_response_default.md) diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md index 3634a8771e..ca23691233 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeApi.md @@ -23,14 +23,19 @@ Method | HTTP request | Description ## FakeHealthGet -> HealthCheckResult FakeHealthGet(ctx, ) +> HealthCheckResult FakeHealthGet(ctx).Execute() Health check endpoint -### Required Parameters +### Path Parameters This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiFakeHealthGetRequest struct via the builder pattern + + ### Return type [**HealthCheckResult**](HealthCheckResult.md) @@ -51,28 +56,24 @@ No authorization required ## FakeOuterBooleanSerialize -> bool FakeOuterBooleanSerialize(ctx, optional) +> bool FakeOuterBooleanSerialize(ctx).Body(body).Execute() -Test serialization of outer boolean types -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFakeOuterBooleanSerializeRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***FakeOuterBooleanSerializeOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FakeOuterBooleanSerializeOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **optional.Bool**| Input boolean as post body | + **body** | **bool** | Input boolean as post body | ### Return type @@ -94,28 +95,24 @@ No authorization required ## FakeOuterCompositeSerialize -> OuterComposite FakeOuterCompositeSerialize(ctx, optional) +> OuterComposite FakeOuterCompositeSerialize(ctx).OuterComposite(outerComposite).Execute() -Test serialization of object with outer number type -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFakeOuterCompositeSerializeRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***FakeOuterCompositeSerializeOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FakeOuterCompositeSerializeOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerComposite** | [**optional.Interface of OuterComposite**](OuterComposite.md)| Input composite as post body | + **outerComposite** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | ### Return type @@ -137,28 +134,24 @@ No authorization required ## FakeOuterNumberSerialize -> float32 FakeOuterNumberSerialize(ctx, optional) +> float32 FakeOuterNumberSerialize(ctx).Body(body).Execute() -Test serialization of outer number types -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFakeOuterNumberSerializeRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***FakeOuterNumberSerializeOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FakeOuterNumberSerializeOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **optional.Float32**| Input number as post body | + **body** | **float32** | Input number as post body | ### Return type @@ -180,28 +173,24 @@ No authorization required ## FakeOuterStringSerialize -> string FakeOuterStringSerialize(ctx, optional) +> string FakeOuterStringSerialize(ctx).Body(body).Execute() -Test serialization of outer string types -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFakeOuterStringSerializeRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***FakeOuterStringSerializeOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a FakeOuterStringSerializeOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **optional.String**| Input string as post body | + **body** | **string** | Input string as post body | ### Return type @@ -223,19 +212,24 @@ No authorization required ## TestBodyWithFileSchema -> TestBodyWithFileSchema(ctx, fileSchemaTestClass) +> TestBodyWithFileSchema(ctx).FileSchemaTestClass(fileSchemaTestClass).Execute() -For this test, the body for this request much reference a schema named `File`. -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestBodyWithFileSchemaRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | ### Return type @@ -257,18 +251,23 @@ No authorization required ## TestBodyWithQueryParams -> TestBodyWithQueryParams(ctx, query, user) +> TestBodyWithQueryParams(ctx).Query(query).User(user).Execute() -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestBodyWithQueryParamsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**query** | **string**| | -**user** | [**User**](User.md)| | + **query** | **string** | | + **user** | [**User**](User.md) | | ### Return type @@ -290,19 +289,24 @@ No authorization required ## TestClientModel -> Client TestClientModel(ctx, client) +> Client TestClientModel(ctx).Client(client).Execute() To test \"client\" model -To test \"client\" model -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestClientModelRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**client** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md) | client model | ### Return type @@ -324,45 +328,37 @@ No authorization required ## TestEndpointParameters -> TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional) +> TestEndpointParameters(ctx).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute() Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestEndpointParametersRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**number** | **float32**| None | -**double** | **float64**| None | -**patternWithoutDelimiter** | **string**| None | -**byte_** | **string**| None | - **optional** | ***TestEndpointParametersOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a TestEndpointParametersOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - - **integer** | **optional.Int32**| None | - **int32_** | **optional.Int32**| None | - **int64_** | **optional.Int64**| None | - **float** | **optional.Float32**| None | - **string_** | **optional.String**| None | - **binary** | **optional.Interface of *os.File****optional.*os.File**| None | - **date** | **optional.String**| None | - **dateTime** | **optional.Time**| None | - **password** | **optional.String**| None | - **callback** | **optional.String**| None | + **number** | **float32** | None | + **double** | **float64** | None | + **patternWithoutDelimiter** | **string** | None | + **byte_** | **string** | None | + **integer** | **int32** | None | + **int32_** | **int32** | None | + **int64_** | **int64** | None | + **float** | **float32** | None | + **string_** | **string** | None | + **binary** | ***os.File** | None | + **date** | **string** | None | + **dateTime** | **time.Time** | None | + **password** | **string** | None | + **callback** | **string** | None | ### Return type @@ -384,35 +380,31 @@ Name | Type | Description | Notes ## TestEnumParameters -> TestEnumParameters(ctx, optional) +> TestEnumParameters(ctx).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute() To test enum parameters -To test enum parameters -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestEnumParametersRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. - **optional** | ***TestEnumParametersOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a TestEnumParametersOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**optional.Interface of []string**](string.md)| Header parameter enum test (string array) | - **enumHeaderString** | **optional.String**| Header parameter enum test (string) | [default to -efg] - **enumQueryStringArray** | [**optional.Interface of []string**](string.md)| Query parameter enum test (string array) | - **enumQueryString** | **optional.String**| Query parameter enum test (string) | [default to -efg] - **enumQueryInteger** | **optional.Int32**| Query parameter enum test (double) | - **enumQueryDouble** | **optional.Float64**| Query parameter enum test (double) | - **enumFormStringArray** | [**optional.Interface of []string**](string.md)| Form parameter enum test (string array) | [default to $] - **enumFormString** | **optional.String**| Form parameter enum test (string) | [default to -efg] + **enumHeaderStringArray** | [**[]string**](string.md) | Header parameter enum test (string array) | + **enumHeaderString** | **string** | Header parameter enum test (string) | [default to -efg] + **enumQueryStringArray** | [**[]string**](string.md) | Query parameter enum test (string array) | + **enumQueryString** | **string** | Query parameter enum test (string) | [default to -efg] + **enumQueryInteger** | **int32** | Query parameter enum test (double) | + **enumQueryDouble** | **float64** | Query parameter enum test (double) | + **enumFormStringArray** | [**[]string**](string.md) | Form parameter enum test (string array) | [default to $] + **enumFormString** | **string** | Form parameter enum test (string) | [default to -efg] ### Return type @@ -434,36 +426,29 @@ No authorization required ## TestGroupParameters -> TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional) +> TestGroupParameters(ctx).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute() Fake endpoint to test group parameters (optional) -Fake endpoint to test group parameters (optional) -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestGroupParametersRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**requiredStringGroup** | **int32**| Required String in group parameters | -**requiredBooleanGroup** | **bool**| Required Boolean in group parameters | -**requiredInt64Group** | **int64**| Required Integer in group parameters | - **optional** | ***TestGroupParametersOpts** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a pointer to a TestGroupParametersOpts struct - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - - **stringGroup** | **optional.Int32**| String in group parameters | - **booleanGroup** | **optional.Bool**| Boolean in group parameters | - **int64Group** | **optional.Int64**| Integer in group parameters | + **requiredStringGroup** | **int32** | Required String in group parameters | + **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | + **requiredInt64Group** | **int64** | Required Integer in group parameters | + **stringGroup** | **int32** | String in group parameters | + **booleanGroup** | **bool** | Boolean in group parameters | + **int64Group** | **int64** | Integer in group parameters | ### Return type @@ -485,17 +470,22 @@ Name | Type | Description | Notes ## TestInlineAdditionalProperties -> TestInlineAdditionalProperties(ctx, requestBody) +> TestInlineAdditionalProperties(ctx).RequestBody(requestBody).Execute() test inline additionalProperties -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestInlineAdditionalPropertiesRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**requestBody** | [**map[string]string**](string.md)| request body | + **requestBody** | [**map[string]string**](string.md) | request body | ### Return type @@ -517,18 +507,23 @@ No authorization required ## TestJsonFormData -> TestJsonFormData(ctx, param, param2) +> TestJsonFormData(ctx).Param(param).Param2(param2).Execute() test json serialization of form data -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestJsonFormDataRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**param** | **string**| field1 | -**param2** | **string**| field2 | + **param** | **string** | field1 | + **param2** | **string** | field2 | ### Return type @@ -550,23 +545,28 @@ No authorization required ## TestQueryParameterCollectionFormat -> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context) +> TestQueryParameterCollectionFormat(ctx).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() -To test the collection format in query parameters -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestQueryParameterCollectionFormatRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**pipe** | [**[]string**](string.md)| | -**ioutil** | [**[]string**](string.md)| | -**http** | [**[]string**](string.md)| | -**url** | [**[]string**](string.md)| | -**context** | [**[]string**](string.md)| | + **pipe** | [**[]string**](string.md) | | + **ioutil** | [**[]string**](string.md) | | + **http** | [**[]string**](string.md) | | + **url** | [**[]string**](string.md) | | + **context** | [**[]string**](string.md) | | ### Return type diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md index b070326cc3..4a1ce5a56f 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/FakeClassnameTags123Api.md @@ -10,19 +10,24 @@ Method | HTTP request | Description ## TestClassname -> Client TestClassname(ctx, client) +> Client TestClassname(ctx).Client(client).Execute() To test class name in snake case -To test class name in snake case -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestClassnameRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**client** | [**Client**](Client.md)| client model | + **client** | [**Client**](Client.md) | client model | ### Return type diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md index 8118df7009..a3c4f94577 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/PetApi.md @@ -18,17 +18,22 @@ Method | HTTP request | Description ## AddPet -> AddPet(ctx, pet) +> AddPet(ctx).Pet(pet).Execute() Add a new pet to the store -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddPetRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | ### Return type @@ -50,28 +55,27 @@ Name | Type | Description | Notes ## DeletePet -> DeletePet(ctx, petId, optional) +> DeletePet(ctx, petId).ApiKey(apiKey).Execute() Deletes a pet -### Required Parameters +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| Pet id to delete | - **optional** | ***DeletePetOpts** | optional parameters | nil if no parameters +**petId** | **int64** | Pet id to delete | -### Optional Parameters +### Other Parameters -Optional parameters are passed through a pointer to a DeletePetOpts struct +Other parameters are passed through a pointer to a apiDeletePetRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **apiKey** | **optional.String**| | + **apiKey** | **string** | | ### Return type @@ -93,19 +97,24 @@ Name | Type | Description | Notes ## FindPetsByStatus -> []Pet FindPetsByStatus(ctx, status) +> []Pet FindPetsByStatus(ctx).Status(status).Execute() Finds Pets by status -Multiple status values can be provided with comma separated strings -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFindPetsByStatusRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**status** | [**[]string**](string.md)| Status values that need to be considered for filter | + **status** | [**[]string**](string.md) | Status values that need to be considered for filter | ### Return type @@ -127,19 +136,24 @@ Name | Type | Description | Notes ## FindPetsByTags -> []Pet FindPetsByTags(ctx, tags) +> []Pet FindPetsByTags(ctx).Tags(tags).Execute() Finds Pets by tags -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiFindPetsByTagsRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tags** | [**[]string**](string.md)| Tags to filter by | + **tags** | [**[]string**](string.md) | Tags to filter by | ### Return type @@ -161,19 +175,28 @@ Name | Type | Description | Notes ## GetPetById -> Pet GetPetById(ctx, petId) +> Pet GetPetById(ctx, petId).Execute() Find pet by ID -Returns a single pet -### Required Parameters + +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to return | +**petId** | **int64** | ID of pet to return | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetPetByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -195,17 +218,22 @@ Name | Type | Description | Notes ## UpdatePet -> UpdatePet(ctx, pet) +> UpdatePet(ctx).Pet(pet).Execute() Update an existing pet -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdatePetRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | ### Return type @@ -227,29 +255,28 @@ Name | Type | Description | Notes ## UpdatePetWithForm -> UpdatePetWithForm(ctx, petId, optional) +> UpdatePetWithForm(ctx, petId).Name(name).Status(status).Execute() Updates a pet in the store with form data -### Required Parameters +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet that needs to be updated | - **optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters +**petId** | **int64** | ID of pet that needs to be updated | -### Optional Parameters +### Other Parameters -Optional parameters are passed through a pointer to a UpdatePetWithFormOpts struct +Other parameters are passed through a pointer to a apiUpdatePetWithFormRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **optional.String**| Updated name of the pet | - **status** | **optional.String**| Updated status of the pet | + **name** | **string** | Updated name of the pet | + **status** | **string** | Updated status of the pet | ### Return type @@ -271,29 +298,28 @@ Name | Type | Description | Notes ## UploadFile -> ApiResponse UploadFile(ctx, petId, optional) +> ApiResponse UploadFile(ctx, petId).AdditionalMetadata(additionalMetadata).File(file).Execute() uploads an image -### Required Parameters +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | - **optional** | ***UploadFileOpts** | optional parameters | nil if no parameters +**petId** | **int64** | ID of pet to update | -### Optional Parameters +### Other Parameters -Optional parameters are passed through a pointer to a UploadFileOpts struct +Other parameters are passed through a pointer to a apiUploadFileRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **additionalMetadata** | **optional.String**| Additional data to pass to server | - **file** | **optional.Interface of *os.File****optional.*os.File**| file to upload | + **additionalMetadata** | **string** | Additional data to pass to server | + **file** | ***os.File** | file to upload | ### Return type @@ -315,30 +341,28 @@ Name | Type | Description | Notes ## UploadFileWithRequiredFile -> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional) +> ApiResponse UploadFileWithRequiredFile(ctx, petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute() uploads an image (required) -### Required Parameters +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**petId** | **int64**| ID of pet to update | -**requiredFile** | ***os.File*****os.File**| file to upload | - **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters +**petId** | **int64** | ID of pet to update | -### Optional Parameters +### Other Parameters -Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct +Other parameters are passed through a pointer to a apiUploadFileWithRequiredFileRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - **additionalMetadata** | **optional.String**| Additional data to pass to server | + **requiredFile** | ***os.File** | file to upload | + **additionalMetadata** | **string** | Additional data to pass to server | ### Return type diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md index c24d87bbfd..d3ec7e4873 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/StoreApi.md @@ -13,19 +13,28 @@ Method | HTTP request | Description ## DeleteOrder -> DeleteOrder(ctx, orderId) +> DeleteOrder(ctx, orderId).Execute() Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Required Parameters + +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **string**| ID of the order that needs to be deleted | +**orderId** | **string** | ID of the order that needs to be deleted | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOrderRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -47,16 +56,21 @@ No authorization required ## GetInventory -> map[string]int32 GetInventory(ctx, ) +> map[string]int32 GetInventory(ctx).Execute() Returns pet inventories by status -Returns a map of status codes to quantities -### Required Parameters + +### Path Parameters This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiGetInventoryRequest struct via the builder pattern + + ### Return type **map[string]int32** @@ -77,19 +91,28 @@ This endpoint does not need any parameter. ## GetOrderById -> Order GetOrderById(ctx, orderId) +> Order GetOrderById(ctx, orderId).Execute() Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Required Parameters + +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orderId** | **int64**| ID of pet that needs to be fetched | +**orderId** | **int64** | ID of pet that needs to be fetched | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOrderByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -111,17 +134,22 @@ No authorization required ## PlaceOrder -> Order PlaceOrder(ctx, order) +> Order PlaceOrder(ctx).Order(order).Execute() Place an order for a pet -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiPlaceOrderRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**order** | [**Order**](Order.md)| order placed for purchasing the pet | + **order** | [**Order**](Order.md) | order placed for purchasing the pet | ### Return type diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md index 01d05d555c..af86ff9b85 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/docs/UserApi.md @@ -17,19 +17,24 @@ Method | HTTP request | Description ## CreateUser -> CreateUser(ctx, user) +> CreateUser(ctx).User(user).Execute() Create user -This can only be done by the logged in user. -### Required Parameters + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUserRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**user** | [**User**](User.md)| Created user object | + **user** | [**User**](User.md) | Created user object | ### Return type @@ -51,17 +56,22 @@ No authorization required ## CreateUsersWithArrayInput -> CreateUsersWithArrayInput(ctx, user) +> CreateUsersWithArrayInput(ctx).User(user).Execute() Creates list of users with given input array -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUsersWithArrayInputRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**user** | [**[]User**](User.md)| List of user object | + **user** | [**[]User**](User.md) | List of user object | ### Return type @@ -83,17 +93,22 @@ No authorization required ## CreateUsersWithListInput -> CreateUsersWithListInput(ctx, user) +> CreateUsersWithListInput(ctx).User(user).Execute() Creates list of users with given input array -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUsersWithListInputRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**user** | [**[]User**](User.md)| List of user object | + **user** | [**[]User**](User.md) | List of user object | ### Return type @@ -115,19 +130,28 @@ No authorization required ## DeleteUser -> DeleteUser(ctx, username) +> DeleteUser(ctx, username).Execute() Delete user -This can only be done by the logged in user. -### Required Parameters + +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**username** | **string**| The name that needs to be deleted | +**username** | **string** | The name that needs to be deleted | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -149,17 +173,26 @@ No authorization required ## GetUserByName -> User GetUserByName(ctx, username) +> User GetUserByName(ctx, username).Execute() Get user by user name -### Required Parameters +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**username** | **string**| The name that needs to be fetched. Use user1 for testing. | +**username** | **string** | The name that needs to be fetched. Use user1 for testing. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserByNameRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -181,18 +214,23 @@ No authorization required ## LoginUser -> string LoginUser(ctx, username, password) +> string LoginUser(ctx).Username(username).Password(password).Execute() Logs user into the system -### Required Parameters +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiLoginUserRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**username** | **string**| The user name for login | -**password** | **string**| The password for login in clear text | + **username** | **string** | The user name for login | + **password** | **string** | The password for login in clear text | ### Return type @@ -214,14 +252,19 @@ No authorization required ## LogoutUser -> LogoutUser(ctx, ) +> LogoutUser(ctx).Execute() Logs out current logged in user session -### Required Parameters +### Path Parameters This endpoint does not need any parameter. +### Other Parameters + +Other parameters are passed through a pointer to a apiLogoutUserRequest struct via the builder pattern + + ### Return type (empty response body) @@ -242,20 +285,29 @@ No authorization required ## UpdateUser -> UpdateUser(ctx, username, user) +> UpdateUser(ctx, username).User(user).Execute() Updated user -This can only be done by the logged in user. -### Required Parameters + +### Path Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**username** | **string**| name that need to be deleted | -**user** | [**User**](User.md)| Updated user object | +**username** | **string** | name that need to be deleted | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **user** | [**User**](User.md) | Updated user object | ### Return type From fcdbcb095ee5363f3422afb09c3af4f855f89e70 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 16 Jan 2020 01:24:20 -0800 Subject: [PATCH 58/82] Updates maven urls, fix #5011 (#5012) * Updates maven urls * Runs ensure up to date' --- .../src/main/resources/Groovy/build.gradle.mustache | 1 + .../src/main/resources/java-pkmst/pom.mustache | 6 +++--- samples/client/petstore/groovy/build.gradle | 1 + samples/server/petstore/java-pkmst/pom.xml | 6 +++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache index e83c34f0e3..fbb6e30e0b 100644 --- a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache @@ -13,6 +13,7 @@ wrapper { buildscript { repositories { + maven { url "https://repo1.maven.org/maven2" } maven { url 'https://repo.jfrog.org/artifactory/gradle-plugins' } } dependencies { diff --git a/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache b/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache index d626c020d9..96d001c40c 100644 --- a/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache +++ b/modules/openapi-generator/src/main/resources/java-pkmst/pom.mustache @@ -47,7 +47,7 @@ central Maven Repository Switchboard default - http://repo1.maven.org/maven2 + https://repo1.maven.org/maven2 false @@ -299,7 +299,7 @@ - + net.alchim31.maven scala-maven-plugin @@ -315,7 +315,7 @@ true testapi - + diff --git a/samples/client/petstore/groovy/build.gradle b/samples/client/petstore/groovy/build.gradle index 9ffe5398d8..d7ef232558 100644 --- a/samples/client/petstore/groovy/build.gradle +++ b/samples/client/petstore/groovy/build.gradle @@ -13,6 +13,7 @@ wrapper { buildscript { repositories { + maven { url "https://repo1.maven.org/maven2" } maven { url 'https://repo.jfrog.org/artifactory/gradle-plugins' } } dependencies { diff --git a/samples/server/petstore/java-pkmst/pom.xml b/samples/server/petstore/java-pkmst/pom.xml index 66150f4631..b9db9f451a 100644 --- a/samples/server/petstore/java-pkmst/pom.xml +++ b/samples/server/petstore/java-pkmst/pom.xml @@ -47,7 +47,7 @@ central Maven Repository Switchboard default - http://repo1.maven.org/maven2 + https://repo1.maven.org/maven2 false @@ -268,7 +268,7 @@ - + net.alchim31.maven scala-maven-plugin @@ -284,7 +284,7 @@ true testapi - + From 3218587d2f46ce665a6550eb1093c9b83bf6930e Mon Sep 17 00:00:00 2001 From: chatelao Date: Thu, 16 Jan 2020 10:26:07 +0100 Subject: [PATCH 59/82] Fix Maven repo links (incl. https instead of http) (#5013) The current URLs return a 501 due to missing https and worng url --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2739162de3..01b1c2cbc3 100644 --- a/README.md +++ b/README.md @@ -171,16 +171,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository. If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar` For **Mac/Linux** users: ```sh -wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar -O openapi-generator-cli.jar +wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. @@ -422,7 +422,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat (if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`) -You can also download the JAR (latest release) directly from [maven.org](http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar) +You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar) To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate` From b94fe7a40facc099042f3dc2c5d02cd2359c1da0 Mon Sep 17 00:00:00 2001 From: Liv Fischer <11943709+yasammez@users.noreply.github.com> Date: Thu, 16 Jan 2020 10:27:49 +0100 Subject: [PATCH 60/82] add multipleOf to CodegenProperty (#2192) (#5009) --- .../org/openapitools/codegen/CodegenProperty.java | 13 ++++++++++++- .../org/openapitools/codegen/DefaultCodegen.java | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) mode change 100644 => 100755 modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java mode change 100644 => 100755 modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java old mode 100644 new mode 100755 index e9877eefaf..c72d24bc08 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -49,6 +49,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti public String jsonSchema; public String minimum; public String maximum; + public Number multipleOf; public boolean exclusiveMinimum; public boolean exclusiveMaximum; public boolean hasMore; @@ -513,6 +514,14 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti this.maxProperties = maxProperties; } + public Number getMultipleOf() { + return multipleOf; + } + + public void setMultipleOf(Number multipleOf) { + this.multipleOf = multipleOf; + } + @Override public String toString() { final StringBuilder sb = new StringBuilder("CodegenProperty{"); @@ -591,6 +600,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti sb.append(", maxProperties=").append(maxProperties); sb.append(", minProperties=").append(minProperties); sb.append(", uniqueItems=").append(uniqueItems); + sb.append(", multipleOf=").append(multipleOf); sb.append(", isXmlAttribute=").append(isXmlAttribute); sb.append(", xmlPrefix='").append(xmlPrefix).append('\''); sb.append(", xmlName='").append(xmlName).append('\''); @@ -681,7 +691,8 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti Objects.equals(minItems, that.minItems) && Objects.equals(xmlPrefix, that.xmlPrefix) && Objects.equals(xmlName, that.xmlName) && - Objects.equals(xmlNamespace, that.xmlNamespace); + Objects.equals(xmlNamespace, that.xmlNamespace) && + Objects.equals(multipleOf, that.multipleOf); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java old mode 100644 new mode 100755 index d157cb808e..326b710418 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -2358,6 +2358,9 @@ public class DefaultCodegen implements CodegenConfig { if (p.getExclusiveMaximum() != null) { property.exclusiveMaximum = p.getExclusiveMaximum(); } + if (p.getMultipleOf() != null) { + property.multipleOf = p.getMultipleOf(); + } // check if any validation rule defined // exclusive* are noop without corresponding min/max From fa0ef2be25564b117e9301717e66e695c179488c Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Thu, 16 Jan 2020 01:42:23 -0800 Subject: [PATCH 61/82] [Python] Conditionally set auth attributes (#4988) * Enhance python API keys * Run python scripts under ./bin/openapi3 * fix unit test issue * Fix unit tests * Fix unit tests * Invoke bin scripts --- .../main/resources/python/api_client.mustache | 4 +- .../resources/python/configuration.mustache | 101 ++++++++++------ .../python-experimental/api_client.mustache | 4 +- .../python-asyncio/petstore_api/api_client.py | 4 +- .../petstore_api/configuration.py | 95 +++++++++------ .../petstore_api/api_client.py | 4 +- .../petstore_api/configuration.py | 95 +++++++++------ .../tests/test_api_client.py | 23 ++++ .../python-experimental/tests/test_pet_api.py | 27 ++++- .../python-tornado/petstore_api/api_client.py | 4 +- .../petstore_api/configuration.py | 95 +++++++++------ .../python/petstore_api/api_client.py | 4 +- .../python/petstore_api/configuration.py | 95 +++++++++------ .../petstore/python/tests/test_pet_api.py | 5 +- .../python/petstore_api/api_client.py | 4 +- .../python/petstore_api/configuration.py | 111 +++++++++++------- 16 files changed, 440 insertions(+), 235 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/api_client.mustache b/modules/openapi-generator/src/main/resources/python/api_client.mustache index 3bf085e190..8297ad5798 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/api_client.mustache @@ -520,9 +520,7 @@ class ApiClient(object): for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'cookie': + if auth_setting['in'] == 'cookie': headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] diff --git a/modules/openapi-generator/src/main/resources/python/configuration.mustache b/modules/openapi-generator/src/main/resources/python/configuration.mustache index b6a89d495d..f53b6f4197 100644 --- a/modules/openapi-generator/src/main/resources/python/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/python/configuration.mustache @@ -22,15 +22,38 @@ class Configuration(object): Do not edit the class manually. :param host: Base url - :param api_key: Dict to store API key(s) + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. :param username: Username for HTTP basic authentication :param password: Password for HTTP basic authentication + + :Example: + + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + conf = {{{packageName}}}.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} + ) + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ def __init__(self, host="{{{basePath}}}", api_key=None, api_key_prefix=None, - username="", password=""): + username=None, password=None): """Constructor """ self.host = host @@ -247,8 +270,14 @@ class Configuration(object): :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password + basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): @@ -256,51 +285,51 @@ class Configuration(object): :return: The Auth Settings information dict. """ - return { + auth = {} {{#authMethods}} {{#isApiKey}} - '{{name}}': - { - 'type': 'api_key', - 'in': {{#isKeyInCookie}}'cookie'{{/isKeyInCookie}}{{#isKeyInHeader}}'header'{{/isKeyInHeader}}{{#isKeyInQuery}}'query'{{/isKeyInQuery}}, - 'key': '{{keyParamName}}', - 'value': self.get_api_key_with_prefix('{{keyParamName}}') - }, + if '{{keyParamName}}' in self.api_key: + auth['{{name}}'] = { + 'type': 'api_key', + 'in': {{#isKeyInCookie}}'cookie'{{/isKeyInCookie}}{{#isKeyInHeader}}'header'{{/isKeyInHeader}}{{#isKeyInQuery}}'query'{{/isKeyInQuery}}, + 'key': '{{keyParamName}}', + 'value': self.get_api_key_with_prefix('{{keyParamName}}') + } {{/isApiKey}} {{#isBasic}} {{^isBasicBearer}} - '{{name}}': - { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() - }, + if self.username is not None and self.password is not None: + auth['{{name}}'] = { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + } {{/isBasicBearer}} {{#isBasicBearer}} - '{{name}}': - { - 'type': 'bearer', - 'in': 'header', - {{#bearerFormat}} - 'format': '{{{.}}}', - {{/bearerFormat}} - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - }, + if self.access_token is not None: + auth['{{name}}'] = { + 'type': 'bearer', + 'in': 'header', + {{#bearerFormat}} + 'format': '{{{.}}}', + {{/bearerFormat}} + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } {{/isBasicBearer}} {{/isBasic}} {{#isOAuth}} - '{{name}}': - { - 'type': 'oauth2', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - }, + if self.access_token is not None: + auth['{{name}}'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } {{/isOAuth}} {{/authMethods}} - } + return auth def to_debug_report(self): """Gets the essential information for debugging. diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache index 25ca4b5043..c9d7eac63e 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/api_client.mustache @@ -530,9 +530,7 @@ class ApiClient(object): for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'cookie': + if auth_setting['in'] == 'cookie': headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index 24b99a2946..c5cdf86f9a 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -513,9 +513,7 @@ class ApiClient(object): for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'cookie': + if auth_setting['in'] == 'cookie': headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] diff --git a/samples/client/petstore/python-asyncio/petstore_api/configuration.py b/samples/client/petstore/python-asyncio/petstore_api/configuration.py index 92d2ba108e..fc5f249ee8 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/configuration.py +++ b/samples/client/petstore/python-asyncio/petstore_api/configuration.py @@ -27,15 +27,38 @@ class Configuration(object): Do not edit the class manually. :param host: Base url - :param api_key: Dict to store API key(s) + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. :param username: Username for HTTP basic authentication :param password: Password for HTTP basic authentication + + :Example: + + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + conf = petstore_api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} + ) + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, - username="", password=""): + username=None, password=None): """Constructor """ self.host = host @@ -232,8 +255,14 @@ class Configuration(object): :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password + basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): @@ -241,36 +270,36 @@ class Configuration(object): :return: The Auth Settings information dict. """ - return { - 'api_key': - { - 'type': 'api_key', - 'in': 'header', - 'key': 'api_key', - 'value': self.get_api_key_with_prefix('api_key') - }, - 'api_key_query': - { - 'type': 'api_key', - 'in': 'query', - 'key': 'api_key_query', - 'value': self.get_api_key_with_prefix('api_key_query') - }, - 'http_basic_test': - { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() - }, - 'petstore_auth': - { - 'type': 'oauth2', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - }, - } + auth = {} + if 'api_key' in self.api_key: + auth['api_key'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'api_key', + 'value': self.get_api_key_with_prefix('api_key') + } + if 'api_key_query' in self.api_key: + auth['api_key_query'] = { + 'type': 'api_key', + 'in': 'query', + 'key': 'api_key_query', + 'value': self.get_api_key_with_prefix('api_key_query') + } + if self.username is not None and self.password is not None: + auth['http_basic_test'] = { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + } + if self.access_token is not None: + auth['petstore_auth'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth def to_debug_report(self): """Gets the essential information for debugging. diff --git a/samples/client/petstore/python-experimental/petstore_api/api_client.py b/samples/client/petstore/python-experimental/petstore_api/api_client.py index 6673889b51..d3e808ddf4 100644 --- a/samples/client/petstore/python-experimental/petstore_api/api_client.py +++ b/samples/client/petstore/python-experimental/petstore_api/api_client.py @@ -523,9 +523,7 @@ class ApiClient(object): for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'cookie': + if auth_setting['in'] == 'cookie': headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] diff --git a/samples/client/petstore/python-experimental/petstore_api/configuration.py b/samples/client/petstore/python-experimental/petstore_api/configuration.py index f6f48362e5..80e3b1fb99 100644 --- a/samples/client/petstore/python-experimental/petstore_api/configuration.py +++ b/samples/client/petstore/python-experimental/petstore_api/configuration.py @@ -28,15 +28,38 @@ class Configuration(object): Do not edit the class manually. :param host: Base url - :param api_key: Dict to store API key(s) + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. :param username: Username for HTTP basic authentication :param password: Password for HTTP basic authentication + + :Example: + + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + conf = petstore_api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} + ) + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, - username="", password=""): + username=None, password=None): """Constructor """ self.host = host @@ -236,8 +259,14 @@ class Configuration(object): :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password + basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): @@ -245,36 +274,36 @@ class Configuration(object): :return: The Auth Settings information dict. """ - return { - 'api_key': - { - 'type': 'api_key', - 'in': 'header', - 'key': 'api_key', - 'value': self.get_api_key_with_prefix('api_key') - }, - 'api_key_query': - { - 'type': 'api_key', - 'in': 'query', - 'key': 'api_key_query', - 'value': self.get_api_key_with_prefix('api_key_query') - }, - 'http_basic_test': - { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() - }, - 'petstore_auth': - { - 'type': 'oauth2', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - }, - } + auth = {} + if 'api_key' in self.api_key: + auth['api_key'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'api_key', + 'value': self.get_api_key_with_prefix('api_key') + } + if 'api_key_query' in self.api_key: + auth['api_key_query'] = { + 'type': 'api_key', + 'in': 'query', + 'key': 'api_key_query', + 'value': self.get_api_key_with_prefix('api_key_query') + } + if self.username is not None and self.password is not None: + auth['http_basic_test'] = { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + } + if self.access_token is not None: + auth['petstore_auth'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth def to_debug_report(self): """Gets the essential information for debugging. diff --git a/samples/client/petstore/python-experimental/tests/test_api_client.py b/samples/client/petstore/python-experimental/tests/test_api_client.py index 62d7b98595..aa0b4cac57 100644 --- a/samples/client/petstore/python-experimental/tests/test_api_client.py +++ b/samples/client/petstore/python-experimental/tests/test_api_client.py @@ -55,6 +55,29 @@ class ApiClientTests(unittest.TestCase): self.assertEqual('test_username', client.configuration.username) self.assertEqual('test_password', client.configuration.password) + # test api key without prefix + config.api_key['api_key'] = '123456' + config.api_key_prefix['api_key'] = None + # update parameters based on auth setting + client.update_params_for_auth(header_params, query_params, auth_settings) + self.assertEqual(header_params['api_key'], '123456') + + # test api key with empty prefix + config.api_key['api_key'] = '123456' + config.api_key_prefix['api_key'] = '' + # update parameters based on auth setting + client.update_params_for_auth(header_params, query_params, auth_settings) + self.assertEqual(header_params['api_key'], '123456') + + # test api key with prefix specified in the api_key, useful when the prefix + # must include '=' sign followed by the API key secret without space. + config.api_key['api_key'] = 'PREFIX=123456' + config.api_key_prefix['api_key'] = None + # update parameters based on auth setting + client.update_params_for_auth(header_params, query_params, auth_settings) + self.assertEqual(header_params['api_key'], 'PREFIX=123456') + + def test_select_header_accept(self): accepts = ['APPLICATION/JSON', 'APPLICATION/XML'] accept = self.api_client.select_header_accept(accepts) diff --git a/samples/client/petstore/python-experimental/tests/test_pet_api.py b/samples/client/petstore/python-experimental/tests/test_pet_api.py index 5e1dd8528c..1897c67f4d 100644 --- a/samples/client/petstore/python-experimental/tests/test_pet_api.py +++ b/samples/client/petstore/python-experimental/tests/test_pet_api.py @@ -73,6 +73,7 @@ class PetApiTests(unittest.TestCase): def setUp(self): config = Configuration() config.host = HOST + config.access_token = 'ACCESS_TOKEN' self.api_client = petstore_api.ApiClient(config) self.pet_api = petstore_api.PetApi(self.api_client) self.setUpModels() @@ -115,6 +116,26 @@ class PetApiTests(unittest.TestCase): resp.close() resp.release_conn() + def test_config(self): + config = Configuration(host=HOST) + self.assertIsNotNone(config.get_host_settings()) + self.assertEquals(config.get_basic_auth_token(), + urllib3.util.make_headers(basic_auth=":").get('authorization')) + self.assertEquals(len(config.auth_settings()), 1) + self.assertIn("petstore_auth", config.auth_settings().keys()) + config.username = "user" + config.password = "password" + self.assertEquals( + config.get_basic_auth_token(), + urllib3.util.make_headers(basic_auth="user:password").get('authorization')) + self.assertEquals(len(config.auth_settings()), 2) + self.assertIn("petstore_auth", config.auth_settings().keys()) + self.assertIn("http_basic_test", config.auth_settings().keys()) + config.username = None + config.password = None + self.assertEquals(len(config.auth_settings()), 1) + self.assertIn("petstore_auth", config.auth_settings().keys()) + def test_timeout(self): mock_pool = MockPoolManager(self) self.api_client.rest_client.pool_manager = mock_pool @@ -122,13 +143,13 @@ class PetApiTests(unittest.TestCase): mock_pool.expect_request('POST', 'http://localhost/v2/pet', body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)), headers={'Content-Type': 'application/json', - 'Authorization': 'Bearer ', + 'Authorization': 'Bearer ACCESS_TOKEN', 'User-Agent': 'OpenAPI-Generator/1.0.0/python'}, preload_content=True, timeout=TimeoutWithEqual(total=5)) mock_pool.expect_request('POST', 'http://localhost/v2/pet', body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)), headers={'Content-Type': 'application/json', - 'Authorization': 'Bearer ', + 'Authorization': 'Bearer ACCESS_TOKEN', 'User-Agent': 'OpenAPI-Generator/1.0.0/python'}, preload_content=True, timeout=TimeoutWithEqual(connect=1, read=2)) @@ -325,7 +346,7 @@ class PetApiTests(unittest.TestCase): 'Accept': 'application/json', 'Content-Type': 'multipart/form-data', 'User-Agent': 'OpenAPI-Generator/1.0.0/python', - 'Authorization': 'Bearer ' + 'Authorization': 'Bearer ACCESS_TOKEN' }, post_params=[ ('files', ('1px_pic1.png', b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x00\x00\x00\x00:~\x9bU\x00\x00\x00\nIDATx\x9cc\xfa\x0f\x00\x01\x05\x01\x02\xcf\xa0.\xcd\x00\x00\x00\x00IEND\xaeB`\x82', 'image/png')), diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index 0d1075ffe9..0ccd640f01 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -515,9 +515,7 @@ class ApiClient(object): for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'cookie': + if auth_setting['in'] == 'cookie': headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] diff --git a/samples/client/petstore/python-tornado/petstore_api/configuration.py b/samples/client/petstore/python-tornado/petstore_api/configuration.py index f6f48362e5..80e3b1fb99 100644 --- a/samples/client/petstore/python-tornado/petstore_api/configuration.py +++ b/samples/client/petstore/python-tornado/petstore_api/configuration.py @@ -28,15 +28,38 @@ class Configuration(object): Do not edit the class manually. :param host: Base url - :param api_key: Dict to store API key(s) + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. :param username: Username for HTTP basic authentication :param password: Password for HTTP basic authentication + + :Example: + + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + conf = petstore_api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} + ) + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, - username="", password=""): + username=None, password=None): """Constructor """ self.host = host @@ -236,8 +259,14 @@ class Configuration(object): :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password + basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): @@ -245,36 +274,36 @@ class Configuration(object): :return: The Auth Settings information dict. """ - return { - 'api_key': - { - 'type': 'api_key', - 'in': 'header', - 'key': 'api_key', - 'value': self.get_api_key_with_prefix('api_key') - }, - 'api_key_query': - { - 'type': 'api_key', - 'in': 'query', - 'key': 'api_key_query', - 'value': self.get_api_key_with_prefix('api_key_query') - }, - 'http_basic_test': - { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() - }, - 'petstore_auth': - { - 'type': 'oauth2', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - }, - } + auth = {} + if 'api_key' in self.api_key: + auth['api_key'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'api_key', + 'value': self.get_api_key_with_prefix('api_key') + } + if 'api_key_query' in self.api_key: + auth['api_key_query'] = { + 'type': 'api_key', + 'in': 'query', + 'key': 'api_key_query', + 'value': self.get_api_key_with_prefix('api_key_query') + } + if self.username is not None and self.password is not None: + auth['http_basic_test'] = { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + } + if self.access_token is not None: + auth['petstore_auth'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth def to_debug_report(self): """Gets the essential information for debugging. diff --git a/samples/client/petstore/python/petstore_api/api_client.py b/samples/client/petstore/python/petstore_api/api_client.py index 46e568df26..a18f322840 100644 --- a/samples/client/petstore/python/petstore_api/api_client.py +++ b/samples/client/petstore/python/petstore_api/api_client.py @@ -513,9 +513,7 @@ class ApiClient(object): for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'cookie': + if auth_setting['in'] == 'cookie': headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] diff --git a/samples/client/petstore/python/petstore_api/configuration.py b/samples/client/petstore/python/petstore_api/configuration.py index f6f48362e5..80e3b1fb99 100644 --- a/samples/client/petstore/python/petstore_api/configuration.py +++ b/samples/client/petstore/python/petstore_api/configuration.py @@ -28,15 +28,38 @@ class Configuration(object): Do not edit the class manually. :param host: Base url - :param api_key: Dict to store API key(s) + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. :param username: Username for HTTP basic authentication :param password: Password for HTTP basic authentication + + :Example: + + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + conf = petstore_api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} + ) + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, - username="", password=""): + username=None, password=None): """Constructor """ self.host = host @@ -236,8 +259,14 @@ class Configuration(object): :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password + basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): @@ -245,36 +274,36 @@ class Configuration(object): :return: The Auth Settings information dict. """ - return { - 'api_key': - { - 'type': 'api_key', - 'in': 'header', - 'key': 'api_key', - 'value': self.get_api_key_with_prefix('api_key') - }, - 'api_key_query': - { - 'type': 'api_key', - 'in': 'query', - 'key': 'api_key_query', - 'value': self.get_api_key_with_prefix('api_key_query') - }, - 'http_basic_test': - { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() - }, - 'petstore_auth': - { - 'type': 'oauth2', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - }, - } + auth = {} + if 'api_key' in self.api_key: + auth['api_key'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'api_key', + 'value': self.get_api_key_with_prefix('api_key') + } + if 'api_key_query' in self.api_key: + auth['api_key_query'] = { + 'type': 'api_key', + 'in': 'query', + 'key': 'api_key_query', + 'value': self.get_api_key_with_prefix('api_key_query') + } + if self.username is not None and self.password is not None: + auth['http_basic_test'] = { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + } + if self.access_token is not None: + auth['petstore_auth'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth def to_debug_report(self): """Gets the essential information for debugging. diff --git a/samples/client/petstore/python/tests/test_pet_api.py b/samples/client/petstore/python/tests/test_pet_api.py index b7650f042e..500505735e 100644 --- a/samples/client/petstore/python/tests/test_pet_api.py +++ b/samples/client/petstore/python/tests/test_pet_api.py @@ -57,6 +57,7 @@ class PetApiTests(unittest.TestCase): def setUp(self): config = Configuration() config.host = HOST + config.access_token = 'ACCESS_TOKEN' self.api_client = petstore_api.ApiClient(config) self.pet_api = petstore_api.PetApi(self.api_client) self.setUpModels() @@ -107,13 +108,13 @@ class PetApiTests(unittest.TestCase): mock_pool.expect_request('POST', HOST + '/pet', body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)), headers={'Content-Type': 'application/json', - 'Authorization': 'Bearer ', + 'Authorization': 'Bearer ACCESS_TOKEN', 'User-Agent': 'OpenAPI-Generator/1.0.0/python'}, preload_content=True, timeout=TimeoutWithEqual(total=5)) mock_pool.expect_request('POST', HOST + '/pet', body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)), headers={'Content-Type': 'application/json', - 'Authorization': 'Bearer ', + 'Authorization': 'Bearer ACCESS_TOKEN', 'User-Agent': 'OpenAPI-Generator/1.0.0/python'}, preload_content=True, timeout=TimeoutWithEqual(connect=1, read=2)) diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index 46e568df26..a18f322840 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -513,9 +513,7 @@ class ApiClient(object): for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'cookie': + if auth_setting['in'] == 'cookie': headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] diff --git a/samples/openapi3/client/petstore/python/petstore_api/configuration.py b/samples/openapi3/client/petstore/python/petstore_api/configuration.py index 1c9522f71c..60cb525776 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/configuration.py +++ b/samples/openapi3/client/petstore/python/petstore_api/configuration.py @@ -28,15 +28,38 @@ class Configuration(object): Do not edit the class manually. :param host: Base url - :param api_key: Dict to store API key(s) + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. :param username: Username for HTTP basic authentication :param password: Password for HTTP basic authentication + + :Example: + + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + conf = petstore_api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} + ) + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ def __init__(self, host="http://petstore.swagger.io:80/v2", api_key=None, api_key_prefix=None, - username="", password=""): + username=None, password=None): """Constructor """ self.host = host @@ -236,8 +259,14 @@ class Configuration(object): :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password + basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): @@ -245,44 +274,44 @@ class Configuration(object): :return: The Auth Settings information dict. """ - return { - 'api_key': - { - 'type': 'api_key', - 'in': 'header', - 'key': 'api_key', - 'value': self.get_api_key_with_prefix('api_key') - }, - 'api_key_query': - { - 'type': 'api_key', - 'in': 'query', - 'key': 'api_key_query', - 'value': self.get_api_key_with_prefix('api_key_query') - }, - 'bearer_test': - { - 'type': 'bearer', - 'in': 'header', - 'format': 'JWT', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - }, - 'http_basic_test': - { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() - }, - 'petstore_auth': - { - 'type': 'oauth2', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - }, - } + auth = {} + if 'api_key' in self.api_key: + auth['api_key'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'api_key', + 'value': self.get_api_key_with_prefix('api_key') + } + if 'api_key_query' in self.api_key: + auth['api_key_query'] = { + 'type': 'api_key', + 'in': 'query', + 'key': 'api_key_query', + 'value': self.get_api_key_with_prefix('api_key_query') + } + if self.access_token is not None: + auth['bearer_test'] = { + 'type': 'bearer', + 'in': 'header', + 'format': 'JWT', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + if self.username is not None and self.password is not None: + auth['http_basic_test'] = { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + } + if self.access_token is not None: + auth['petstore_auth'] = { + 'type': 'oauth2', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth def to_debug_report(self): """Gets the essential information for debugging. From 0ebdac4ffed2f43d7d2df5e8202119ac85e5df5b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 16 Jan 2020 18:38:32 +0800 Subject: [PATCH 62/82] Replace http://central.maven.org with https://repo1.maven.org --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 01b1c2cbc3..b1d28fd7fe 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@
                                                            [![Jion the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) -[![Stable releaases in the Maven store](https://img.shields.io/maven-metadata/v/http/central.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) +[![Stable releaases in the Maven store](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) [![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)
                                                            From ef31e8f86b1a5413c8a617049898b1e4a823531e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 16 Jan 2020 21:46:12 +0800 Subject: [PATCH 63/82] fix permission of codegen classes --- .../src/main/java/org/openapitools/codegen/CodegenProperty.java | 0 .../src/main/java/org/openapitools/codegen/DefaultCodegen.java | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java mode change 100755 => 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java old mode 100755 new mode 100644 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java old mode 100755 new mode 100644 From f48325ac4567bd9456c016fb4081f2548575822d Mon Sep 17 00:00:00 2001 From: Josh Burton Date: Fri, 17 Jan 2020 20:35:38 +1300 Subject: [PATCH 64/82] [dart-dio] Fixes issues with DateTime import and form date paramaterToString function (#4929) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - due to the addition of the timemachine library, models were importing ‘DateTime’ when using the core library, which is not a valid import. - the parameterToString function was copied from the dart2 generator and had some errors when some enums were classes. --- .../languages/DartDioClientCodegen.java | 2 - .../src/main/resources/dart-dio/api.mustache | 4 +- .../main/resources/dart-dio/api_util.mustache | 28 +++++----- samples/client/petstore/dart-dio/README.md | 52 +++++++++---------- .../petstore/dart-dio/lib/api/pet_api.dart | 18 +++---- .../petstore/dart-dio/lib/api/store_api.dart | 8 +-- .../petstore/dart-dio/lib/api/user_api.dart | 16 +++--- .../petstore/dart-dio/lib/api_util.dart | 20 ++++--- .../petstore/dart-dio/lib/model/order.dart | 1 - 9 files changed, 73 insertions(+), 76 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 29c81b823c..7a4886f5ed 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -243,8 +243,6 @@ public class DartDioClientCodegen extends DartClientCodegen { additionalProperties.put("core", "true"); typeMapping.put("Date", "DateTime"); typeMapping.put("date", "DateTime"); - importMapping.put("DateTime", "DateTime"); - importMapping.put("OffsetDateTime", "DateTime"); } else if ("timemachine".equals(dateLibrary)) { additionalProperties.put("timeMachine", "true"); typeMapping.put("date", "LocalDate"); diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index e25eb930e8..5b7ace703e 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -23,7 +23,7 @@ class {{classname}} { /// {{notes}} Future{{/returnType}}>{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}CancelToken cancelToken, Map headers,}) async { - String path = "{{{path}}}"{{#pathParams}}.replaceAll("{" + "{{baseName}}" + "}", {{{paramName}}}.toString()){{/pathParams}}; + String path = "{{{path}}}"{{#pathParams}}.replaceAll("{" + "{{baseName}}" + "}", {{{paramName}}}.toString()){{/pathParams}}; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -46,7 +46,7 @@ class {{classname}} { {{#isMultipart}} {{^isFile}} if ({{paramName}} != null) { - formData['{{baseName}}'] = parameterToString({{paramName}}); + formData['{{baseName}}'] = parameterToString(_serializers, {{paramName}}); } {{/isFile}} {{#isFile}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache index eedad9166f..e99530f6c3 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache @@ -1,18 +1,14 @@ +import 'dart:convert'; + +import 'package:built_value/serializer.dart'; + /// Format the given parameter object into string. -String parameterToString(dynamic value) { - if (value == null) { - return ''; - } else if (value is DateTime) { - return value.toUtc().toIso8601String(); - {{#models}} - {{#model}} - {{#isEnum}} - } else if (value is {{classname}}) { - return {{classname}}TypeTransformer().encode(value).toString(); - {{/isEnum}} - {{/model}} - {{/models}} - } else { - return value.toString(); - } +String parameterToString(Serializers serializers, dynamic value) { + if (value == null) { + return ''; + } else if (value is String || value is num) { + return value.toString(); + } else { + return json.encode(serializers.serialize(value)); + } } \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/README.md b/samples/client/petstore/dart-dio/README.md index c9c0f49b85..ceda34066b 100644 --- a/samples/client/petstore/dart-dio/README.md +++ b/samples/client/petstore/dart-dio/README.md @@ -57,36 +57,36 @@ All URIs are relative to *http://petstore.swagger.io/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*PetApi* | [**addPet**](doc\/PetApi.md#addpet) | **post** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](doc\/PetApi.md#deletepet) | **delete** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](doc\/PetApi.md#findpetsbystatus) | **get** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](doc\/PetApi.md#findpetsbytags) | **get** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](doc\/PetApi.md#getpetbyid) | **get** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](doc\/PetApi.md#updatepet) | **put** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](doc\/PetApi.md#updatepetwithform) | **post** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](doc\/PetApi.md#uploadfile) | **post** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**deleteOrder**](doc\/StoreApi.md#deleteorder) | **delete** /store/order/{orderId} | Delete purchase order by ID -*StoreApi* | [**getInventory**](doc\/StoreApi.md#getinventory) | **get** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](doc\/StoreApi.md#getorderbyid) | **get** /store/order/{orderId} | Find purchase order by ID -*StoreApi* | [**placeOrder**](doc\/StoreApi.md#placeorder) | **post** /store/order | Place an order for a pet -*UserApi* | [**createUser**](doc\/UserApi.md#createuser) | **post** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](doc\/UserApi.md#createuserswitharrayinput) | **post** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](doc\/UserApi.md#createuserswithlistinput) | **post** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](doc\/UserApi.md#deleteuser) | **delete** /user/{username} | Delete user -*UserApi* | [**getUserByName**](doc\/UserApi.md#getuserbyname) | **get** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](doc\/UserApi.md#loginuser) | **get** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](doc\/UserApi.md#logoutuser) | **get** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](doc\/UserApi.md#updateuser) | **put** /user/{username} | Updated user +*PetApi* | [**addPet**](doc//PetApi.md#addpet) | **post** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](doc//PetApi.md#deletepet) | **delete** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](doc//PetApi.md#findpetsbystatus) | **get** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](doc//PetApi.md#findpetsbytags) | **get** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](doc//PetApi.md#getpetbyid) | **get** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](doc//PetApi.md#updatepet) | **put** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](doc//PetApi.md#updatepetwithform) | **post** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](doc//PetApi.md#uploadfile) | **post** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**deleteOrder**](doc//StoreApi.md#deleteorder) | **delete** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**getInventory**](doc//StoreApi.md#getinventory) | **get** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](doc//StoreApi.md#getorderbyid) | **get** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**placeOrder**](doc//StoreApi.md#placeorder) | **post** /store/order | Place an order for a pet +*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **post** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](doc//UserApi.md#createuserswitharrayinput) | **post** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](doc//UserApi.md#createuserswithlistinput) | **post** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **delete** /user/{username} | Delete user +*UserApi* | [**getUserByName**](doc//UserApi.md#getuserbyname) | **get** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](doc//UserApi.md#loginuser) | **get** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](doc//UserApi.md#logoutuser) | **get** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **put** /user/{username} | Updated user ## Documentation For Models - - [ApiResponse](doc\/ApiResponse.md) - - [Category](doc\/Category.md) - - [Order](doc\/Order.md) - - [Pet](doc\/Pet.md) - - [Tag](doc\/Tag.md) - - [User](doc\/User.md) + - [ApiResponse](doc//ApiResponse.md) + - [Category](doc//Category.md) + - [Order](doc//Order.md) + - [Pet](doc//Pet.md) + - [Tag](doc//Tag.md) + - [User](doc//User.md) ## Documentation For Authorization diff --git a/samples/client/petstore/dart-dio/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/lib/api/pet_api.dart index 2458f5ffe9..7078df5969 100644 --- a/samples/client/petstore/dart-dio/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/pet_api.dart @@ -21,7 +21,7 @@ class PetApi { /// FutureaddPet(Pet body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/pet"; + String path = "/pet"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -54,7 +54,7 @@ class PetApi { /// FuturedeletePet(int petId,{ String apiKey,CancelToken cancelToken, Map headers,}) async { - String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -85,7 +85,7 @@ class PetApi { /// Multiple status values can be provided with comma separated strings Future>>findPetsByStatus(List status,{ CancelToken cancelToken, Map headers,}) async { - String path = "/pet/findByStatus"; + String path = "/pet/findByStatus"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -131,7 +131,7 @@ class PetApi { /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. Future>>findPetsByTags(List tags,{ CancelToken cancelToken, Map headers,}) async { - String path = "/pet/findByTags"; + String path = "/pet/findByTags"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -177,7 +177,7 @@ class PetApi { /// Returns a single pet Future>getPetById(int petId,{ CancelToken cancelToken, Map headers,}) async { - String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -221,7 +221,7 @@ class PetApi { /// FutureupdatePet(Pet body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/pet"; + String path = "/pet"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -254,7 +254,7 @@ class PetApi { /// FutureupdatePetWithForm(int petId,{ String name,String status,CancelToken cancelToken, Map headers,}) async { - String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -286,7 +286,7 @@ class PetApi { /// Future>uploadFile(int petId,{ String additionalMetadata,Uint8List file,CancelToken cancelToken, Map headers,}) async { - String path = "/pet/{petId}/uploadImage".replaceAll("{" + "petId" + "}", petId.toString()); + String path = "/pet/{petId}/uploadImage".replaceAll("{" + "petId" + "}", petId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -299,7 +299,7 @@ class PetApi { Map formData = {}; if (additionalMetadata != null) { - formData['additionalMetadata'] = parameterToString(additionalMetadata); + formData['additionalMetadata'] = parameterToString(_serializers, additionalMetadata); } if (file != null) { formData['file'] = MultipartFile.fromBytes(file, filename: "file"); diff --git a/samples/client/petstore/dart-dio/lib/api/store_api.dart b/samples/client/petstore/dart-dio/lib/api/store_api.dart index 8be8835b6b..abbe73be27 100644 --- a/samples/client/petstore/dart-dio/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/store_api.dart @@ -18,7 +18,7 @@ class StoreApi { /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors FuturedeleteOrder(String orderId,{ CancelToken cancelToken, Map headers,}) async { - String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -48,7 +48,7 @@ class StoreApi { /// Returns a map of status codes to quantities Future>>getInventory({ CancelToken cancelToken, Map headers,}) async { - String path = "/store/inventory"; + String path = "/store/inventory"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -92,7 +92,7 @@ class StoreApi { /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions Future>getOrderById(int orderId,{ CancelToken cancelToken, Map headers,}) async { - String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -136,7 +136,7 @@ class StoreApi { /// Future>placeOrder(Order body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/store/order"; + String path = "/store/order"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); diff --git a/samples/client/petstore/dart-dio/lib/api/user_api.dart b/samples/client/petstore/dart-dio/lib/api/user_api.dart index bb2c84d2e8..a2d2d3189a 100644 --- a/samples/client/petstore/dart-dio/lib/api/user_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/user_api.dart @@ -18,7 +18,7 @@ class UserApi { /// This can only be done by the logged in user. FuturecreateUser(User body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user"; + String path = "/user"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -51,7 +51,7 @@ class UserApi { /// FuturecreateUsersWithArrayInput(List body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/createWithArray"; + String path = "/user/createWithArray"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -85,7 +85,7 @@ class UserApi { /// FuturecreateUsersWithListInput(List body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/createWithList"; + String path = "/user/createWithList"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -119,7 +119,7 @@ class UserApi { /// This can only be done by the logged in user. FuturedeleteUser(String username,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); + String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -149,7 +149,7 @@ class UserApi { /// Future>getUserByName(String username,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); + String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -193,7 +193,7 @@ class UserApi { /// Future>loginUser(String username,String password,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/login"; + String path = "/user/login"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -239,7 +239,7 @@ class UserApi { /// FuturelogoutUser({ CancelToken cancelToken, Map headers,}) async { - String path = "/user/logout"; + String path = "/user/logout"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -269,7 +269,7 @@ class UserApi { /// This can only be done by the logged in user. FutureupdateUser(String username,User body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); + String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); diff --git a/samples/client/petstore/dart-dio/lib/api_util.dart b/samples/client/petstore/dart-dio/lib/api_util.dart index 3a05d24f7b..e99530f6c3 100644 --- a/samples/client/petstore/dart-dio/lib/api_util.dart +++ b/samples/client/petstore/dart-dio/lib/api_util.dart @@ -1,10 +1,14 @@ +import 'dart:convert'; + +import 'package:built_value/serializer.dart'; + /// Format the given parameter object into string. -String parameterToString(dynamic value) { - if (value == null) { - return ''; - } else if (value is DateTime) { - return value.toUtc().toIso8601String(); - } else { - return value.toString(); - } +String parameterToString(Serializers serializers, dynamic value) { + if (value == null) { + return ''; + } else if (value is String || value is num) { + return value.toString(); + } else { + return json.encode(serializers.serialize(value)); + } } \ No newline at end of file diff --git a/samples/client/petstore/dart-dio/lib/model/order.dart b/samples/client/petstore/dart-dio/lib/model/order.dart index 01f9303107..4838d56a1d 100644 --- a/samples/client/petstore/dart-dio/lib/model/order.dart +++ b/samples/client/petstore/dart-dio/lib/model/order.dart @@ -1,4 +1,3 @@ - import 'DateTime'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; From 67d23fcf7e60647b2275c9b18582a76cc91cee9c Mon Sep 17 00:00:00 2001 From: aandyl Date: Thu, 16 Jan 2020 23:44:23 -0800 Subject: [PATCH 65/82] [Rust Server] fix handling of special characters in path param names (#4897) * test for hyphen in path parameter name * fix handling of hyphens in path parameter names --- .../codegen/languages/RustServerCodegen.java | 22 +++- .../resources/rust-server/client-mod.mustache | 4 +- .../resources/rust-server/server-mod.mustache | 4 +- ...ith-fake-endpoints-models-for-testing.yaml | 19 +++ .../README.md | 2 + .../api/openapi.yaml | 17 +++ .../docs/fake_api.md | 28 ++++ .../examples/client.rs | 7 + .../examples/server_lib/server.rs | 8 ++ .../src/client/mod.rs | 78 +++++++++-- .../src/lib.rs | 17 +++ .../src/server/mod.rs | 124 +++++++++++++----- 12 files changed, 283 insertions(+), 47 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index c9535fe926..16e2da7a78 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -552,6 +552,16 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { Map definitions = ModelUtils.getSchemas(this.openAPI); CodegenOperation op = super.fromOperation(path, httpMethod, operation, servers); + String pathFormatString = op.path; + for (CodegenParameter param : op.pathParams) { + // Replace {baseName} with {paramName} for format string + String paramSearch = "{" + param.baseName + "}"; + String paramReplace = "{" + param.paramName + "}"; + + pathFormatString = pathFormatString.replace(paramSearch, paramReplace); + } + op.vendorExtensions.put("pathFormatString", pathFormatString); + // The Rust code will need to contain a series of regular expressions. // For performance, we'll construct these at start-of-day and re-use // them. That means we need labels for them. @@ -584,10 +594,18 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { } // Don't prefix with '^' so that the templates can put the // basePath on the front. - pathSetEntry.put("pathRegEx", op.path.replace("{", "(?P<").replace("}", ">[^/?#]*)") + "$"); + String pathRegEx = op.path; + for (CodegenParameter param : op.pathParams) { + // Replace {baseName} with (?P[^/?#]*) for regex + String paramSearch = "{" + param.baseName + "}"; + String paramReplace = "(?P<" + param.paramName + ">[^/?#]*)"; + + pathRegEx = pathRegEx.replace(paramSearch, paramReplace); + } + + pathSetEntry.put("pathRegEx", pathRegEx + "$"); pathSetMap.put(pathId, pathSetEntry); } - op.vendorExtensions.put("operation_id", underscore(op.operationId)); op.vendorExtensions.put("uppercase_operation_id", underscore(op.operationId).toUpperCase(Locale.ROOT)); op.vendorExtensions.put("path", op.path.replace("{", ":").replace("}", "")); diff --git a/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache b/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache index f6176fc5bd..4bc03901ad 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache @@ -262,8 +262,8 @@ impl Api for Client where {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} fn {{#vendorExtensions}}{{{operation_id}}}{{/vendorExtensions}}(&self{{#allParams}}, param_{{{paramName}}}: {{^required}}Option<{{/required}}{{#isListContainer}}&{{/isListContainer}}{{{dataType}}}{{^required}}>{{/required}}{{/allParams}}, context: &C) -> Box> { let mut uri = format!( - "{}{{{basePathWithoutHost}}}{{path}}", - self.base_path{{#pathParams}}, {{{baseName}}}=utf8_percent_encode(¶m_{{{paramName}}}.to_string(), ID_ENCODE_SET){{/pathParams}} + "{}{{{basePathWithoutHost}}}{{#vendorExtensions}}{{pathFormatString}}{{/vendorExtensions}}", + self.base_path{{#pathParams}}, {{{paramName}}}=utf8_percent_encode(¶m_{{{paramName}}}.to_string(), ID_ENCODE_SET){{/pathParams}} ); let mut query_string = self::url::form_urlencoded::Serializer::new("".to_owned()); diff --git a/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache b/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache index 591609bbbe..16d9ef55dd 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/server-mod.mustache @@ -195,12 +195,12 @@ where {{/hasPathParams}} {{/vendorExtensions}} {{#pathParams}} - let param_{{{paramName}}} = match percent_encoding::percent_decode(path_params["{{{baseName}}}"].as_bytes()).decode_utf8() { + let param_{{{paramName}}} = match percent_encoding::percent_decode(path_params["{{{paramName}}}"].as_bytes()).decode_utf8() { Ok(param_{{{paramName}}}) => match param_{{{paramName}}}.parse::<{{{dataType}}}>() { Ok(param_{{{paramName}}}) => param_{{{paramName}}}, Err(e) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't parse path parameter {{{baseName}}}: {:?}", e)))), }, - Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["{{{baseName}}}"])))) + Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["{{{paramName}}}"])))) }; {{/pathParams}} {{#headerParams}} diff --git a/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml index 3850646ac2..961a249143 100644 --- a/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml @@ -946,6 +946,25 @@ paths: description: successful operation schema: $ref: '#/definitions/Client' + /fake/hyphenParam/{hyphen-param}: + get: + tags: + - fake + description: To test hyphen in path parameter name + operationId: hyphenParam + consumes: + - application/json + produces: + - application/json + parameters: + - name: hyphen-param + in: path + description: Parameter with hyphen in name + required: true + type: string + responses: + 200: + description: Success securityDefinitions: petstore_auth: type: oauth2 diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/README.md b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/README.md index fa4062102f..c800a04fab 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/README.md +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/README.md @@ -66,6 +66,7 @@ cargo run --example client FakeOuterBooleanSerialize cargo run --example client FakeOuterCompositeSerialize cargo run --example client FakeOuterNumberSerialize cargo run --example client FakeOuterStringSerialize +cargo run --example client HyphenParam cargo run --example client TestBodyWithQueryParams cargo run --example client TestClientModel cargo run --example client TestEndpointParameters @@ -131,6 +132,7 @@ Method | HTTP request | Description [**fakeOuterCompositeSerialize**](docs/fake_api.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | [**fakeOuterNumberSerialize**](docs/fake_api.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | [**fakeOuterStringSerialize**](docs/fake_api.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +[**hyphenParam**](docs/fake_api.md#hyphenParam) | **GET** /fake/hyphenParam/{hyphen-param} | [**testBodyWithQueryParams**](docs/fake_api.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testClientModel**](docs/fake_api.md#testClientModel) | **PATCH** /fake | To test \"client\" model [**testEndpointParameters**](docs/fake_api.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index b7cf57122c..8e1b2de143 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -984,6 +984,23 @@ paths: tags: - $another-fake? x-codegen-request-body-name: body + /fake/hyphenParam/{hyphen-param}: + get: + description: To test hyphen in path parameter name + operationId: hyphenParam + parameters: + - description: Parameter with hyphen in name + in: path + name: hyphen-param + required: true + schema: + type: string + responses: + 200: + content: {} + description: Success + tags: + - fake components: schemas: Order: diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/fake_api.md b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/fake_api.md index a3f4d9e936..20789c0ad8 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/fake_api.md +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/fake_api.md @@ -8,6 +8,7 @@ Method | HTTP request | Description **fakeOuterCompositeSerialize**](fake_api.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | **fakeOuterNumberSerialize**](fake_api.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | **fakeOuterStringSerialize**](fake_api.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +**hyphenParam**](fake_api.md#hyphenParam) | **GET** /fake/hyphenParam/{hyphen-param} | **testBodyWithQueryParams**](fake_api.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | **testClientModel**](fake_api.md#testClientModel) | **PATCH** /fake | To test \"client\" model **testEndpointParameters**](fake_api.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -152,6 +153,33 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **hyphenParam** +> hyphenParam(hyphen_param) + + +To test hyphen in path parameter name + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hyphen_param** | **String**| Parameter with hyphen in name | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **testBodyWithQueryParams** > testBodyWithQueryParams(query, body) diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/client.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/client.rs index a55c070e0c..7e87c4bb74 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/client.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/client.rs @@ -24,6 +24,7 @@ use petstore_with_fake_endpoints_models_for_testing::{ApiNoContext, ContextWrapp FakeOuterCompositeSerializeResponse, FakeOuterNumberSerializeResponse, FakeOuterStringSerializeResponse, + HyphenParamResponse, TestBodyWithQueryParamsResponse, TestClientModelResponse, TestEndpointParametersResponse, @@ -63,6 +64,7 @@ fn main() { "FakeOuterCompositeSerialize", "FakeOuterNumberSerialize", "FakeOuterStringSerialize", + "HyphenParam", "TestEndpointParameters", "TestEnumParameters", "TestJsonFormData", @@ -147,6 +149,11 @@ fn main() { println!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); }, + Some("HyphenParam") => { + let result = core.run(client.hyphen_param("hyphen_param_example".to_string())); + println!("{:?} (X-Span-ID: {:?})", result, (client.context() as &dyn Has).get().clone()); + }, + // Disabled because there's no example. // Some("TestBodyWithQueryParams") => { // let result = core.run(client.test_body_with_query_params("query_example".to_string(), ???)); diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server_lib/server.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server_lib/server.rs index 1aca2d246f..48745fe5ef 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server_lib/server.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server_lib/server.rs @@ -16,6 +16,7 @@ use petstore_with_fake_endpoints_models_for_testing::{Api, ApiError, FakeOuterCompositeSerializeResponse, FakeOuterNumberSerializeResponse, FakeOuterStringSerializeResponse, + HyphenParamResponse, TestBodyWithQueryParamsResponse, TestClientModelResponse, TestEndpointParametersResponse, @@ -95,6 +96,13 @@ impl Api for Server where C: Has{ } + fn hyphen_param(&self, hyphen_param: String, context: &C) -> Box> { + let context = context.clone(); + println!("hyphen_param(\"{}\") - X-Span-ID: {:?}", hyphen_param, context.get().0.clone()); + Box::new(futures::failed("Generic failure".into())) + } + + fn test_body_with_query_params(&self, query: String, body: models::User, context: &C) -> Box> { let context = context.clone(); println!("test_body_with_query_params(\"{}\", {:?}) - X-Span-ID: {:?}", query, body, context.get().0.clone()); diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs index 9976c76758..9c03e6ef31 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/client/mod.rs @@ -49,6 +49,7 @@ use {Api, FakeOuterCompositeSerializeResponse, FakeOuterNumberSerializeResponse, FakeOuterStringSerializeResponse, + HyphenParamResponse, TestBodyWithQueryParamsResponse, TestClientModelResponse, TestEndpointParametersResponse, @@ -678,6 +679,67 @@ impl Api for Client where } + fn hyphen_param(&self, param_hyphen_param: String, context: &C) -> Box> { + let mut uri = format!( + "{}/v2/fake/hyphenParam/{hyphen_param}", + self.base_path, hyphen_param=utf8_percent_encode(¶m_hyphen_param.to_string(), ID_ENCODE_SET) + ); + + let mut query_string = self::url::form_urlencoded::Serializer::new("".to_owned()); + + + let query_string_str = query_string.finish(); + if !query_string_str.is_empty() { + uri += "?"; + uri += &query_string_str; + } + + let uri = match Uri::from_str(&uri) { + Ok(uri) => uri, + Err(err) => return Box::new(futures::done(Err(ApiError(format!("Unable to build URI: {}", err))))), + }; + + let mut request = hyper::Request::new(hyper::Method::Get, uri); + + + request.headers_mut().set(XSpanId((context as &dyn Has).get().0.clone())); + Box::new(self.client_service.call(request) + .map_err(|e| ApiError(format!("No response received: {}", e))) + .and_then(|mut response| { + match response.status().as_u16() { + 200 => { + let body = response.body(); + Box::new( + + future::ok( + HyphenParamResponse::Success + ) + ) as Box> + }, + code => { + let headers = response.headers().clone(); + Box::new(response.body() + .take(100) + .concat2() + .then(move |body| + future::err(ApiError(format!("Unexpected response code {}:\n{:?}\n\n{}", + code, + headers, + match body { + Ok(ref body) => match str::from_utf8(body) { + Ok(body) => Cow::from(body), + Err(e) => Cow::from(format!("", e)), + }, + Err(e) => Cow::from(format!("", e)), + }))) + ) + ) as Box> + } + } + })) + + } + fn test_body_with_query_params(&self, param_query: String, param_body: models::User, context: &C) -> Box> { let mut uri = format!( "{}/v2/fake/body-with-query-params", @@ -1310,8 +1372,8 @@ impl Api for Client where fn delete_pet(&self, param_pet_id: i64, param_api_key: Option, context: &C) -> Box> { let mut uri = format!( - "{}/v2/pet/{petId}", - self.base_path, petId=utf8_percent_encode(¶m_pet_id.to_string(), ID_ENCODE_SET) + "{}/v2/pet/{pet_id}", + self.base_path, pet_id=utf8_percent_encode(¶m_pet_id.to_string(), ID_ENCODE_SET) ); let mut query_string = self::url::form_urlencoded::Serializer::new("".to_owned()); @@ -1577,8 +1639,8 @@ impl Api for Client where fn get_pet_by_id(&self, param_pet_id: i64, context: &C) -> Box> { let mut uri = format!( - "{}/v2/pet/{petId}", - self.base_path, petId=utf8_percent_encode(¶m_pet_id.to_string(), ID_ENCODE_SET) + "{}/v2/pet/{pet_id}", + self.base_path, pet_id=utf8_percent_encode(¶m_pet_id.to_string(), ID_ENCODE_SET) ); let mut query_string = self::url::form_urlencoded::Serializer::new("".to_owned()); @@ -1776,8 +1838,8 @@ impl Api for Client where fn update_pet_with_form(&self, param_pet_id: i64, param_name: Option, param_status: Option, context: &C) -> Box> { let mut uri = format!( - "{}/v2/pet/{petId}", - self.base_path, petId=utf8_percent_encode(¶m_pet_id.to_string(), ID_ENCODE_SET) + "{}/v2/pet/{pet_id}", + self.base_path, pet_id=utf8_percent_encode(¶m_pet_id.to_string(), ID_ENCODE_SET) ); let mut query_string = self::url::form_urlencoded::Serializer::new("".to_owned()); @@ -1857,8 +1919,8 @@ impl Api for Client where fn upload_file(&self, param_pet_id: i64, param_additional_metadata: Option, param_file: Option, context: &C) -> Box> { let mut uri = format!( - "{}/v2/pet/{petId}/uploadImage", - self.base_path, petId=utf8_percent_encode(¶m_pet_id.to_string(), ID_ENCODE_SET) + "{}/v2/pet/{pet_id}/uploadImage", + self.base_path, pet_id=utf8_percent_encode(¶m_pet_id.to_string(), ID_ENCODE_SET) ); let mut query_string = self::url::form_urlencoded::Serializer::new("".to_owned()); diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs index 6adb604b9e..8623560766 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/lib.rs @@ -86,6 +86,12 @@ pub enum FakeOuterStringSerializeResponse { (String) } +#[derive(Debug, PartialEq)] +pub enum HyphenParamResponse { + /// Success + Success +} + #[derive(Debug, PartialEq)] pub enum TestBodyWithQueryParamsResponse { /// Success @@ -334,6 +340,9 @@ pub trait Api { fn fake_outer_string_serialize(&self, body: Option, context: &C) -> Box>; + fn hyphen_param(&self, hyphen_param: String, context: &C) -> Box>; + + fn test_body_with_query_params(&self, query: String, body: models::User, context: &C) -> Box>; /// To test \"client\" model @@ -435,6 +444,9 @@ pub trait ApiNoContext { fn fake_outer_string_serialize(&self, body: Option) -> Box>; + fn hyphen_param(&self, hyphen_param: String) -> Box>; + + fn test_body_with_query_params(&self, query: String, body: models::User) -> Box>; /// To test \"client\" model @@ -557,6 +569,11 @@ impl<'a, T: Api, C> ApiNoContext for ContextWrapper<'a, T, C> { } + fn hyphen_param(&self, hyphen_param: String) -> Box> { + self.api().hyphen_param(hyphen_param, &self.context()) + } + + fn test_body_with_query_params(&self, query: String, body: models::User) -> Box> { self.api().test_body_with_query_params(query, body, &self.context()) } diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs index 79556f3ae9..63a6b67c60 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/server/mod.rs @@ -45,6 +45,7 @@ use {Api, FakeOuterCompositeSerializeResponse, FakeOuterNumberSerializeResponse, FakeOuterStringSerializeResponse, + HyphenParamResponse, TestBodyWithQueryParamsResponse, TestClientModelResponse, TestEndpointParametersResponse, @@ -88,6 +89,7 @@ mod paths { r"^/v2/another-fake/dummy$", r"^/v2/fake$", r"^/v2/fake/body-with-query-params$", + r"^/v2/fake/hyphenParam/(?P[^/?#]*)$", r"^/v2/fake/inline-additionalProperties$", r"^/v2/fake/jsonFormData$", r"^/v2/fake/outer/boolean$", @@ -98,8 +100,8 @@ mod paths { r"^/v2/pet$", r"^/v2/pet/findByStatus$", r"^/v2/pet/findByTags$", - r"^/v2/pet/(?P[^/?#]*)$", - r"^/v2/pet/(?P[^/?#]*)/uploadImage$", + r"^/v2/pet/(?P[^/?#]*)$", + r"^/v2/pet/(?P[^/?#]*)/uploadImage$", r"^/v2/store/inventory$", r"^/v2/store/order$", r"^/v2/store/order/(?P[^/?#]*)$", @@ -114,36 +116,40 @@ mod paths { pub static ID_ANOTHER_FAKE_DUMMY: usize = 0; pub static ID_FAKE: usize = 1; pub static ID_FAKE_BODY_WITH_QUERY_PARAMS: usize = 2; - pub static ID_FAKE_INLINE_ADDITIONALPROPERTIES: usize = 3; - pub static ID_FAKE_JSONFORMDATA: usize = 4; - pub static ID_FAKE_OUTER_BOOLEAN: usize = 5; - pub static ID_FAKE_OUTER_COMPOSITE: usize = 6; - pub static ID_FAKE_OUTER_NUMBER: usize = 7; - pub static ID_FAKE_OUTER_STRING: usize = 8; - pub static ID_FAKE_CLASSNAME_TEST: usize = 9; - pub static ID_PET: usize = 10; - pub static ID_PET_FINDBYSTATUS: usize = 11; - pub static ID_PET_FINDBYTAGS: usize = 12; - pub static ID_PET_PETID: usize = 13; + pub static ID_FAKE_HYPHENPARAM_HYPHEN_PARAM: usize = 3; lazy_static! { - pub static ref REGEX_PET_PETID: regex::Regex = regex::Regex::new(r"^/v2/pet/(?P[^/?#]*)$").unwrap(); + pub static ref REGEX_FAKE_HYPHENPARAM_HYPHEN_PARAM: regex::Regex = regex::Regex::new(r"^/v2/fake/hyphenParam/(?P[^/?#]*)$").unwrap(); } - pub static ID_PET_PETID_UPLOADIMAGE: usize = 14; + pub static ID_FAKE_INLINE_ADDITIONALPROPERTIES: usize = 4; + pub static ID_FAKE_JSONFORMDATA: usize = 5; + pub static ID_FAKE_OUTER_BOOLEAN: usize = 6; + pub static ID_FAKE_OUTER_COMPOSITE: usize = 7; + pub static ID_FAKE_OUTER_NUMBER: usize = 8; + pub static ID_FAKE_OUTER_STRING: usize = 9; + pub static ID_FAKE_CLASSNAME_TEST: usize = 10; + pub static ID_PET: usize = 11; + pub static ID_PET_FINDBYSTATUS: usize = 12; + pub static ID_PET_FINDBYTAGS: usize = 13; + pub static ID_PET_PETID: usize = 14; lazy_static! { - pub static ref REGEX_PET_PETID_UPLOADIMAGE: regex::Regex = regex::Regex::new(r"^/v2/pet/(?P[^/?#]*)/uploadImage$").unwrap(); + pub static ref REGEX_PET_PETID: regex::Regex = regex::Regex::new(r"^/v2/pet/(?P[^/?#]*)$").unwrap(); } - pub static ID_STORE_INVENTORY: usize = 15; - pub static ID_STORE_ORDER: usize = 16; - pub static ID_STORE_ORDER_ORDER_ID: usize = 17; + pub static ID_PET_PETID_UPLOADIMAGE: usize = 15; + lazy_static! { + pub static ref REGEX_PET_PETID_UPLOADIMAGE: regex::Regex = regex::Regex::new(r"^/v2/pet/(?P[^/?#]*)/uploadImage$").unwrap(); + } + pub static ID_STORE_INVENTORY: usize = 16; + pub static ID_STORE_ORDER: usize = 17; + pub static ID_STORE_ORDER_ORDER_ID: usize = 18; lazy_static! { pub static ref REGEX_STORE_ORDER_ORDER_ID: regex::Regex = regex::Regex::new(r"^/v2/store/order/(?P[^/?#]*)$").unwrap(); } - pub static ID_USER: usize = 18; - pub static ID_USER_CREATEWITHARRAY: usize = 19; - pub static ID_USER_CREATEWITHLIST: usize = 20; - pub static ID_USER_LOGIN: usize = 21; - pub static ID_USER_LOGOUT: usize = 22; - pub static ID_USER_USERNAME: usize = 23; + pub static ID_USER: usize = 19; + pub static ID_USER_CREATEWITHARRAY: usize = 20; + pub static ID_USER_CREATEWITHLIST: usize = 21; + pub static ID_USER_LOGIN: usize = 22; + pub static ID_USER_LOGOUT: usize = 23; + pub static ID_USER_USERNAME: usize = 24; lazy_static! { pub static ref REGEX_USER_USERNAME: regex::Regex = regex::Regex::new(r"^/v2/user/(?P[^/?#]*)$").unwrap(); } @@ -541,6 +547,55 @@ where ) as Box> }, + // HyphenParam - GET /fake/hyphenParam/{hyphen-param} + &hyper::Method::Get if path.matched(paths::ID_FAKE_HYPHENPARAM_HYPHEN_PARAM) => { + // Path parameters + let path = uri.path().to_string(); + let path_params = + paths::REGEX_FAKE_HYPHENPARAM_HYPHEN_PARAM + .captures(&path) + .unwrap_or_else(|| + panic!("Path {} matched RE FAKE_HYPHENPARAM_HYPHEN_PARAM in set but failed match against \"{}\"", path, paths::REGEX_FAKE_HYPHENPARAM_HYPHEN_PARAM.as_str()) + ); + let param_hyphen_param = match percent_encoding::percent_decode(path_params["hyphen_param"].as_bytes()).decode_utf8() { + Ok(param_hyphen_param) => match param_hyphen_param.parse::() { + Ok(param_hyphen_param) => param_hyphen_param, + Err(e) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't parse path parameter hyphen-param: {:?}", e)))), + }, + Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["hyphen_param"])))) + }; + Box::new({ + {{ + Box::new(api_impl.hyphen_param(param_hyphen_param, &context) + .then(move |result| { + let mut response = Response::new(); + response.headers_mut().set(XSpanId((&context as &dyn Has).get().0.to_string())); + + match result { + Ok(rsp) => match rsp { + HyphenParamResponse::Success + + + => { + response.set_status(StatusCode::try_from(200).unwrap()); + + }, + }, + Err(_) => { + // Application code returned an error. This should not happen, as the implementation should + // return a valid response. + response.set_status(StatusCode::InternalServerError); + response.set_body("An internal error occurred"); + }, + } + + future::ok(response) + } + )) + }} + }) as Box> + }, + // TestBodyWithQueryParams - PUT /fake/body-with-query-params &hyper::Method::Put if path.matched(paths::ID_FAKE_BODY_WITH_QUERY_PARAMS) => { // Query parameters (note that non-required or collection query parameters will ignore garbage values, rather than causing a 400 response) @@ -1124,12 +1179,12 @@ where .unwrap_or_else(|| panic!("Path {} matched RE PET_PETID in set but failed match against \"{}\"", path, paths::REGEX_PET_PETID.as_str()) ); - let param_pet_id = match percent_encoding::percent_decode(path_params["petId"].as_bytes()).decode_utf8() { + let param_pet_id = match percent_encoding::percent_decode(path_params["pet_id"].as_bytes()).decode_utf8() { Ok(param_pet_id) => match param_pet_id.parse::() { Ok(param_pet_id) => param_pet_id, Err(e) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't parse path parameter petId: {:?}", e)))), }, - Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["petId"])))) + Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["pet_id"])))) }; // Header parameters header! { (RequestApiKey, "api_key") => [String] } @@ -1343,12 +1398,12 @@ where .unwrap_or_else(|| panic!("Path {} matched RE PET_PETID in set but failed match against \"{}\"", path, paths::REGEX_PET_PETID.as_str()) ); - let param_pet_id = match percent_encoding::percent_decode(path_params["petId"].as_bytes()).decode_utf8() { + let param_pet_id = match percent_encoding::percent_decode(path_params["pet_id"].as_bytes()).decode_utf8() { Ok(param_pet_id) => match param_pet_id.parse::() { Ok(param_pet_id) => param_pet_id, Err(e) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't parse path parameter petId: {:?}", e)))), }, - Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["petId"])))) + Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["pet_id"])))) }; Box::new({ {{ @@ -1543,12 +1598,12 @@ where .unwrap_or_else(|| panic!("Path {} matched RE PET_PETID in set but failed match against \"{}\"", path, paths::REGEX_PET_PETID.as_str()) ); - let param_pet_id = match percent_encoding::percent_decode(path_params["petId"].as_bytes()).decode_utf8() { + let param_pet_id = match percent_encoding::percent_decode(path_params["pet_id"].as_bytes()).decode_utf8() { Ok(param_pet_id) => match param_pet_id.parse::() { Ok(param_pet_id) => param_pet_id, Err(e) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't parse path parameter petId: {:?}", e)))), }, - Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["petId"])))) + Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["pet_id"])))) }; Box::new({ {{ @@ -1626,12 +1681,12 @@ where .unwrap_or_else(|| panic!("Path {} matched RE PET_PETID_UPLOADIMAGE in set but failed match against \"{}\"", path, paths::REGEX_PET_PETID_UPLOADIMAGE.as_str()) ); - let param_pet_id = match percent_encoding::percent_decode(path_params["petId"].as_bytes()).decode_utf8() { + let param_pet_id = match percent_encoding::percent_decode(path_params["pet_id"].as_bytes()).decode_utf8() { Ok(param_pet_id) => match param_pet_id.parse::() { Ok(param_pet_id) => param_pet_id, Err(e) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't parse path parameter petId: {:?}", e)))), }, - Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["petId"])))) + Err(_) => return Box::new(future::ok(Response::new().with_status(StatusCode::BadRequest).with_body(format!("Couldn't percent-decode path parameter as UTF-8: {}", &path_params["pet_id"])))) }; // Form Body parameters (note that non-required body parameters will ignore garbage // values, rather than causing a 400 response). Produce warning header and logs for @@ -2523,6 +2578,9 @@ impl RequestParser for ApiRequestParser { // FakeOuterStringSerialize - POST /fake/outer/string &hyper::Method::Post if path.matched(paths::ID_FAKE_OUTER_STRING) => Ok("FakeOuterStringSerialize"), + // HyphenParam - GET /fake/hyphenParam/{hyphen-param} + &hyper::Method::Get if path.matched(paths::ID_FAKE_HYPHENPARAM_HYPHEN_PARAM) => Ok("HyphenParam"), + // TestBodyWithQueryParams - PUT /fake/body-with-query-params &hyper::Method::Put if path.matched(paths::ID_FAKE_BODY_WITH_QUERY_PARAMS) => Ok("TestBodyWithQueryParams"), From 3f074a280a7e1ac58c27b838f85b0f2d51511fc6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 17 Jan 2020 18:54:31 +0800 Subject: [PATCH 66/82] minor improve to rust server (#5020) --- .../codegen/languages/RustServerCodegen.java | 10 ++++------ .../src/main/resources/rust-server/client-mod.mustache | 2 +- .../api/openapi.yaml | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index 16e2da7a78..406caa69c1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -544,7 +544,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { } private boolean isMimetypePlain(String mimetype) { - return isMimetypePlainText(mimetype) || isMimetypeHtmlText(mimetype) || isMimetypeOctetStream(mimetype); + return isMimetypePlainText(mimetype) || isMimetypeHtmlText(mimetype) || isMimetypeOctetStream(mimetype); } @Override @@ -560,7 +560,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { pathFormatString = pathFormatString.replace(paramSearch, paramReplace); } - op.vendorExtensions.put("pathFormatString", pathFormatString); + op.vendorExtensions.put("x-path-format-string", pathFormatString); // The Rust code will need to contain a series of regular expressions. // For performance, we'll construct these at start-of-day and re-use @@ -1019,7 +1019,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { am.getItems() != null && !StringUtils.isEmpty(am.getItems().get$ref())) { Schema inner_schema = allDefinitions.get( - ModelUtils.getSimpleRef(am.getItems().get$ref())); + ModelUtils.getSimpleRef(am.getItems().get$ref())); if (inner_schema.getXml() != null && inner_schema.getXml().getName() != null) { @@ -1271,9 +1271,7 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig { // the user than the alternative. LOGGER.warn("Ignoring additionalProperties (see https://github.com/OpenAPITools/openapi-generator/issues/318) alongside defined properties"); cm.dataType = null; - } - else - { + } else { String type; if (typeMapping.containsKey(cm.additionalPropertiesType)) { diff --git a/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache b/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache index 4bc03901ad..575e7fee69 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/client-mod.mustache @@ -262,7 +262,7 @@ impl Api for Client where {{#apiInfo}}{{#apis}}{{#operations}}{{#operation}} fn {{#vendorExtensions}}{{{operation_id}}}{{/vendorExtensions}}(&self{{#allParams}}, param_{{{paramName}}}: {{^required}}Option<{{/required}}{{#isListContainer}}&{{/isListContainer}}{{{dataType}}}{{^required}}>{{/required}}{{/allParams}}, context: &C) -> Box> { let mut uri = format!( - "{}{{{basePathWithoutHost}}}{{#vendorExtensions}}{{pathFormatString}}{{/vendorExtensions}}", + "{}{{{basePathWithoutHost}}}{{{vendorExtensions.x-path-format-string}}}", self.base_path{{#pathParams}}, {{{paramName}}}=utf8_percent_encode(¶m_{{{paramName}}}.to_string(), ID_ENCODE_SET){{/pathParams}} ); diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index 8e1b2de143..e94a4c5fe9 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -996,7 +996,7 @@ paths: schema: type: string responses: - 200: + "200": content: {} description: Success tags: From ffc69699c0c7af75a3ee4be96347545bdaf64a9b Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 18 Jan 2020 15:55:53 +0800 Subject: [PATCH 67/82] Add a link to Scala Gatling blog post (#5029) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b1d28fd7fe..ba41616067 100644 --- a/README.md +++ b/README.md @@ -645,6 +645,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2018/05/15 - [REST API仕様からAPIクライアントやスタブサーバを自動生成する「OpenAPI Generator」オープンソースで公開。Swagger Codegenからのフォーク](https://www.publickey1.jp/blog/18/rest_apiapiopenapi_generatorswagger_generator.html) by [Publickey](https://www.publickey1.jp) - 2018/06/08 - [Swagger Codegen is now OpenAPI Generator](https://angular.schule/blog/2018-06-swagger-codegen-is-now-openapi-generator) by [JohannesHoppe](https://github.com/JohannesHoppe) - 2018/06/21 - [Connect your JHipster apps to the world of APIs with OpenAPI and gRPC](https://fr.slideshare.net/chbornet/jhipster-conf-2018-connect-your-jhipster-apps-to-the-world-of-apis-with-openapi-and-grpc) by [Christophe Bornet](https://github.com/cbornet) at [JHipster Conf 2018](https://jhipster-conf.github.io/) +- 2018/06/22 - [OpenAPI Generator で Gatling Client を生成してみた](https://rohki.hatenablog.com/entry/2018/06/22/073000) at [ソモサン](https://rohki.hatenablog.com/) - 2018/06/27 - [Lessons Learned from Leading an Open-Source Project Supporting 30+ Programming Languages](https://speakerdeck.com/wing328/lessons-learned-from-leading-an-open-source-project-supporting-30-plus-programming-languages) - [William Cheng](https://github.com/wing328) at [LinuxCon + ContainerCon + CloudOpen China 2018](http://bit.ly/2waDKKX) - 2018/07/19 - [OpenAPI Generator Contribution Quickstart - RingCentral Go SDK](https://medium.com/ringcentral-developers/openapi-generator-for-go-contribution-quickstart-8cc72bf37b53) by [John Wang](https://github.com/grokify) - 2018/08/22 - [OpenAPI Generatorのプロジェクト構成などのメモ](https://yinm.info/20180822/) by [Yusuke Iinuma](https://github.com/yinm) From 420039c9eba52fb97706d489cf5b1a46a4b17625 Mon Sep 17 00:00:00 2001 From: Yuriy Belenko Date: Sat, 18 Jan 2020 11:08:13 +0300 Subject: [PATCH 68/82] [Slim4] Add integer formats support to Data Mocker (#4965) * [Slim4] Support int32 and int64 data formats * [Slim4] Fix data format key in object mocking * [Slim4] Refresh samples --- .../openapi_data_mocker.mustache | 20 +++++++++++-- .../openapi_data_mocker_test.mustache | 30 +++++++++++++++++++ .../php-slim4/lib/Mock/OpenApiDataMocker.php | 20 +++++++++++-- .../test/Mock/OpenApiDataMockerTest.php | 30 +++++++++++++++++++ 4 files changed, 96 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache index b18c8f8903..5d101d2cf2 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker.mustache @@ -127,6 +127,22 @@ final class OpenApiDataMocker implements IMocker $exclusiveMinimum = false, $exclusiveMaximum = false ) { + $dataFormat = is_string($dataFormat) ? strtolower($dataFormat) : $dataFormat; + switch ($dataFormat) { + case IMocker::DATA_FORMAT_INT32: + // -2147483647..2147483647 + $minimum = is_numeric($minimum) ? max($minimum, -2147483647) : -2147483647; + $maximum = is_numeric($maximum) ? min($maximum, 2147483647) : 2147483647; + break; + case IMocker::DATA_FORMAT_INT64: + // -9223372036854775807..9223372036854775807 + $minimum = is_numeric($minimum) ? max($minimum, -9223372036854775807) : -9223372036854775807; + $maximum = is_numeric($maximum) ? min($maximum, 9223372036854775807) : 9223372036854775807; + break; + default: + // do nothing, unsupported format + } + return $this->getRandomNumber($minimum, $maximum, $exclusiveMinimum, $exclusiveMaximum, 0); } @@ -365,7 +381,7 @@ final class OpenApiDataMocker implements IMocker foreach ($properties as $propName => $propValue) { $options = $this->extractSchemaProperties($propValue); $dataType = $options['type']; - $dataFormat = $options['dataFormat'] ?? null; + $dataFormat = $options['format'] ?? null; $ref = $options['$ref'] ?? null; $data = $this->mockFromRef($ref); $obj->$propName = ($data) ? $data : $this->mock($dataType, $dataFormat, $options); @@ -525,7 +541,7 @@ final class OpenApiDataMocker implements IMocker if ($maxDecimals > 0) { return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $maxDecimals); } - return mt_rand($min, $max); + return mt_rand((int) $min, (int) $max); } } {{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache index 94b80e9352..c6e70d781a 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/openapi_data_mocker_test.mustache @@ -198,6 +198,36 @@ class OpenApiDataMockerTest extends TestCase ]; } + /** + * @covers ::mockInteger + * @dataProvider provideMockIntegerFormats + */ + public function testMockIntegerWithFormats( + $dataFormat, + $minimum, + $maximum, + $expectedMin, + $expectedMax + ) { + $mocker = new OpenApiDataMocker(); + $integer = $mocker->mockInteger($dataFormat, $minimum, $maximum); + $this->assertGreaterThanOrEqual($expectedMin, $integer); + $this->assertLessThanOrEqual($expectedMax, $integer); + } + + public function provideMockIntegerFormats() + { + return [ + [IMocker::DATA_FORMAT_INT32, -2147483648, 2147483648, -2147483647, 2147483647], + [IMocker::DATA_FORMAT_INT64, '-9223372036854775808', '9223372036854775808', -9223372036854775807, 9223372036854775807], + [IMocker::DATA_FORMAT_INT32, -10, 10, -10, 10], + [IMocker::DATA_FORMAT_INT64, -10, 10, -10, 10], + [IMocker::DATA_FORMAT_INT32, -9223372036854775807, 9223372036854775807, -2147483647, 2147483647], + [strtoupper(IMocker::DATA_FORMAT_INT32), -2147483648, 2147483648, -2147483647, 2147483647], + [strtoupper(IMocker::DATA_FORMAT_INT64), '-9223372036854775808', '9223372036854775808', -9223372036854775807, 9223372036854775807], + ]; + } + /** * @dataProvider provideMockNumberCorrectArguments * @covers ::mockNumber diff --git a/samples/server/petstore/php-slim4/lib/Mock/OpenApiDataMocker.php b/samples/server/petstore/php-slim4/lib/Mock/OpenApiDataMocker.php index 7f4412a741..facf17f0ef 100644 --- a/samples/server/petstore/php-slim4/lib/Mock/OpenApiDataMocker.php +++ b/samples/server/petstore/php-slim4/lib/Mock/OpenApiDataMocker.php @@ -119,6 +119,22 @@ final class OpenApiDataMocker implements IMocker $exclusiveMinimum = false, $exclusiveMaximum = false ) { + $dataFormat = is_string($dataFormat) ? strtolower($dataFormat) : $dataFormat; + switch ($dataFormat) { + case IMocker::DATA_FORMAT_INT32: + // -2147483647..2147483647 + $minimum = is_numeric($minimum) ? max($minimum, -2147483647) : -2147483647; + $maximum = is_numeric($maximum) ? min($maximum, 2147483647) : 2147483647; + break; + case IMocker::DATA_FORMAT_INT64: + // -9223372036854775807..9223372036854775807 + $minimum = is_numeric($minimum) ? max($minimum, -9223372036854775807) : -9223372036854775807; + $maximum = is_numeric($maximum) ? min($maximum, 9223372036854775807) : 9223372036854775807; + break; + default: + // do nothing, unsupported format + } + return $this->getRandomNumber($minimum, $maximum, $exclusiveMinimum, $exclusiveMaximum, 0); } @@ -357,7 +373,7 @@ final class OpenApiDataMocker implements IMocker foreach ($properties as $propName => $propValue) { $options = $this->extractSchemaProperties($propValue); $dataType = $options['type']; - $dataFormat = $options['dataFormat'] ?? null; + $dataFormat = $options['format'] ?? null; $ref = $options['$ref'] ?? null; $data = $this->mockFromRef($ref); $obj->$propName = ($data) ? $data : $this->mock($dataType, $dataFormat, $options); @@ -517,6 +533,6 @@ final class OpenApiDataMocker implements IMocker if ($maxDecimals > 0) { return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $maxDecimals); } - return mt_rand($min, $max); + return mt_rand((int) $min, (int) $max); } } diff --git a/samples/server/petstore/php-slim4/test/Mock/OpenApiDataMockerTest.php b/samples/server/petstore/php-slim4/test/Mock/OpenApiDataMockerTest.php index 2ddf0b8a0f..87777551d0 100644 --- a/samples/server/petstore/php-slim4/test/Mock/OpenApiDataMockerTest.php +++ b/samples/server/petstore/php-slim4/test/Mock/OpenApiDataMockerTest.php @@ -190,6 +190,36 @@ class OpenApiDataMockerTest extends TestCase ]; } + /** + * @covers ::mockInteger + * @dataProvider provideMockIntegerFormats + */ + public function testMockIntegerWithFormats( + $dataFormat, + $minimum, + $maximum, + $expectedMin, + $expectedMax + ) { + $mocker = new OpenApiDataMocker(); + $integer = $mocker->mockInteger($dataFormat, $minimum, $maximum); + $this->assertGreaterThanOrEqual($expectedMin, $integer); + $this->assertLessThanOrEqual($expectedMax, $integer); + } + + public function provideMockIntegerFormats() + { + return [ + [IMocker::DATA_FORMAT_INT32, -2147483648, 2147483648, -2147483647, 2147483647], + [IMocker::DATA_FORMAT_INT64, '-9223372036854775808', '9223372036854775808', -9223372036854775807, 9223372036854775807], + [IMocker::DATA_FORMAT_INT32, -10, 10, -10, 10], + [IMocker::DATA_FORMAT_INT64, -10, 10, -10, 10], + [IMocker::DATA_FORMAT_INT32, -9223372036854775807, 9223372036854775807, -2147483647, 2147483647], + [strtoupper(IMocker::DATA_FORMAT_INT32), -2147483648, 2147483648, -2147483647, 2147483647], + [strtoupper(IMocker::DATA_FORMAT_INT64), '-9223372036854775808', '9223372036854775808', -9223372036854775807, 9223372036854775807], + ]; + } + /** * @dataProvider provideMockNumberCorrectArguments * @covers ::mockNumber From ee984c38a53d54a9f59b64eb0f7ed20712a2bed3 Mon Sep 17 00:00:00 2001 From: Hippolyte HENRY Date: Sat, 18 Jan 2020 09:12:20 +0100 Subject: [PATCH 69/82] [Java][jersey2] Use builder pattern for requests (#4666) * Use builder pattern for requests * petstore * Add @throws annotation * regenerate jersey2 test files * Also group bodyParam in builder class * petstore java6 * regenerate java8 * ensure up to date --- .../Java/libraries/jersey2/api.mustache | 117 +++++-- .../Java/libraries/jersey2/api_doc.mustache | 111 ++++++ .../Java/libraries/jersey2/api_test.mustache | 51 +++ .../java/jersey2-java6/docs/AnotherFakeApi.md | 4 +- .../java/jersey2-java6/docs/FakeApi.md | 84 +++-- .../docs/FakeClassnameTags123Api.md | 4 +- .../java/jersey2-java6/docs/PetApi.md | 40 ++- .../java/jersey2-java6/docs/StoreApi.md | 21 +- .../java/jersey2-java6/docs/UserApi.md | 38 ++- .../client/api/AnotherFakeApi.java | 13 +- .../org/openapitools/client/api/FakeApi.java | 322 +++++++++++------- .../client/api/FakeClassnameTags123Api.java | 13 +- .../org/openapitools/client/api/PetApi.java | 141 ++++---- .../org/openapitools/client/api/StoreApi.java | 64 ++-- .../org/openapitools/client/api/UserApi.java | 111 +++--- .../java/jersey2-java8/docs/AnotherFakeApi.md | 4 +- .../java/jersey2-java8/docs/FakeApi.md | 84 +++-- .../docs/FakeClassnameTags123Api.md | 4 +- .../java/jersey2-java8/docs/PetApi.md | 40 ++- .../java/jersey2-java8/docs/StoreApi.md | 21 +- .../java/jersey2-java8/docs/UserApi.md | 38 ++- .../client/api/AnotherFakeApi.java | 13 +- .../org/openapitools/client/api/FakeApi.java | 322 +++++++++++------- .../client/api/FakeClassnameTags123Api.java | 13 +- .../org/openapitools/client/api/PetApi.java | 141 ++++---- .../org/openapitools/client/api/StoreApi.java | 64 ++-- .../org/openapitools/client/api/UserApi.java | 111 +++--- .../client/api/AnotherFakeApiTest.java | 7 +- .../openapitools/client/api/FakeApiTest.java | 78 +++-- .../api/FakeClassnameTags123ApiTest.java | 7 +- .../openapitools/client/api/PetApiTest.java | 35 +- .../openapitools/client/api/StoreApiTest.java | 10 +- .../openapitools/client/api/UserApiTest.java | 26 +- .../AdditionalPropertiesAnyTypeTest.java | 3 +- .../model/AdditionalPropertiesArrayTest.java | 3 +- .../AdditionalPropertiesBooleanTest.java | 3 +- .../model/AdditionalPropertiesClassTest.java | 88 ++++- .../AdditionalPropertiesIntegerTest.java | 3 +- .../model/AdditionalPropertiesNumberTest.java | 3 +- .../model/AdditionalPropertiesObjectTest.java | 3 +- .../model/AdditionalPropertiesStringTest.java | 3 +- .../openapitools/client/model/AnimalTest.java | 3 +- .../model/ArrayOfArrayOfNumberOnlyTest.java | 3 +- .../client/model/ArrayOfNumberOnlyTest.java | 3 +- .../client/model/ArrayTestTest.java | 3 +- .../client/model/CapitalizationTest.java | 3 +- .../client/model/CatAllOfTest.java | 3 +- .../openapitools/client/model/CatTest.java | 4 +- .../client/model/CategoryTest.java | 3 +- .../client/model/ClassModelTest.java | 3 +- .../openapitools/client/model/ClientTest.java | 3 +- .../client/model/DogAllOfTest.java | 3 +- .../openapitools/client/model/DogTest.java | 4 +- .../client/model/EnumArraysTest.java | 3 +- .../client/model/EnumClassTest.java | 2 +- .../client/model/EnumTestTest.java | 3 +- .../client/model/FileSchemaTestClassTest.java | 3 +- .../client/model/FormatTestTest.java | 11 +- .../client/model/HasOnlyReadOnlyTest.java | 3 +- .../client/model/MapTestTest.java | 3 +- ...rtiesAndAdditionalPropertiesClassTest.java | 3 +- .../client/model/Model200ResponseTest.java | 3 +- .../client/model/ModelApiResponseTest.java | 3 +- .../client/model/ModelReturnTest.java | 3 +- .../openapitools/client/model/NameTest.java | 3 +- .../client/model/NumberOnlyTest.java | 3 +- .../openapitools/client/model/OrderTest.java | 3 +- .../client/model/OuterCompositeTest.java | 3 +- .../client/model/OuterEnumTest.java | 2 +- .../openapitools/client/model/PetTest.java | 3 +- .../client/model/ReadOnlyFirstTest.java | 3 +- .../client/model/SpecialModelNameTest.java | 3 +- .../openapitools/client/model/TagTest.java | 3 +- .../client/model/TypeHolderDefaultTest.java | 3 +- .../client/model/TypeHolderExampleTest.java | 11 +- .../openapitools/client/model/UserTest.java | 3 +- .../client/model/XmlItemTest.java | 39 +-- .../java/jersey2/docs/AnotherFakeApi.md | 4 +- .../petstore/java/jersey2/docs/FakeApi.md | 84 +++-- .../jersey2/docs/FakeClassnameTags123Api.md | 4 +- .../petstore/java/jersey2/docs/PetApi.md | 40 ++- .../petstore/java/jersey2/docs/StoreApi.md | 21 +- .../petstore/java/jersey2/docs/UserApi.md | 38 ++- .../client/api/AnotherFakeApi.java | 13 +- .../org/openapitools/client/api/FakeApi.java | 322 +++++++++++------- .../client/api/FakeClassnameTags123Api.java | 13 +- .../org/openapitools/client/api/PetApi.java | 141 ++++---- .../org/openapitools/client/api/StoreApi.java | 64 ++-- .../org/openapitools/client/api/UserApi.java | 111 +++--- .../client/api/AnotherFakeApiTest.java | 7 +- .../openapitools/client/api/FakeApiTest.java | 78 +++-- .../api/FakeClassnameTags123ApiTest.java | 7 +- .../openapitools/client/api/PetApiTest.java | 35 +- .../openapitools/client/api/StoreApiTest.java | 10 +- .../openapitools/client/api/UserApiTest.java | 26 +- .../AdditionalPropertiesAnyTypeTest.java | 3 +- .../model/AdditionalPropertiesArrayTest.java | 3 +- .../AdditionalPropertiesBooleanTest.java | 3 +- .../model/AdditionalPropertiesClassTest.java | 88 ++++- .../AdditionalPropertiesIntegerTest.java | 3 +- .../model/AdditionalPropertiesNumberTest.java | 3 +- .../model/AdditionalPropertiesObjectTest.java | 3 +- .../model/AdditionalPropertiesStringTest.java | 3 +- .../openapitools/client/model/AnimalTest.java | 3 +- .../model/ArrayOfArrayOfNumberOnlyTest.java | 3 +- .../client/model/ArrayOfNumberOnlyTest.java | 3 +- .../client/model/ArrayTestTest.java | 3 +- .../client/model/CapitalizationTest.java | 3 +- .../client/model/CatAllOfTest.java | 3 +- .../openapitools/client/model/CatTest.java | 4 +- .../client/model/CategoryTest.java | 3 +- .../client/model/ClassModelTest.java | 3 +- .../openapitools/client/model/ClientTest.java | 3 +- .../client/model/DogAllOfTest.java | 3 +- .../openapitools/client/model/DogTest.java | 4 +- .../client/model/EnumArraysTest.java | 3 +- .../client/model/EnumClassTest.java | 2 +- .../client/model/EnumTestTest.java | 3 +- .../client/model/FileSchemaTestClassTest.java | 3 +- .../client/model/FormatTestTest.java | 11 +- .../client/model/HasOnlyReadOnlyTest.java | 3 +- .../client/model/MapTestTest.java | 3 +- ...rtiesAndAdditionalPropertiesClassTest.java | 3 +- .../client/model/Model200ResponseTest.java | 3 +- .../client/model/ModelApiResponseTest.java | 3 +- .../client/model/ModelReturnTest.java | 3 +- .../openapitools/client/model/NameTest.java | 3 +- .../client/model/NumberOnlyTest.java | 3 +- .../openapitools/client/model/OrderTest.java | 3 +- .../client/model/OuterCompositeTest.java | 3 +- .../client/model/OuterEnumTest.java | 2 +- .../openapitools/client/model/PetTest.java | 3 +- .../client/model/ReadOnlyFirstTest.java | 3 +- .../client/model/SpecialModelNameTest.java | 3 +- .../openapitools/client/model/TagTest.java | 3 +- .../client/model/TypeHolderDefaultTest.java | 3 +- .../client/model/TypeHolderExampleTest.java | 11 +- .../openapitools/client/model/UserTest.java | 3 +- .../client/model/XmlItemTest.java | 39 +-- 139 files changed, 2378 insertions(+), 1330 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache create mode 100644 modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache index f3e27a079c..3950d7a2af 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache @@ -38,8 +38,8 @@ public class {{classname}} { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - {{#operation}} + {{^vendorExtensions.x-group-parameters}} /** * {{summary}} * {{notes}} @@ -53,10 +53,10 @@ public class {{classname}} { {{#responses.0}} * @http.response.details - - {{#responses}} - - {{/responses}} + + {{#responses}} + + {{/responses}}
                                                            Status Code Description Response Headers
                                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                                            Status Code Description Response Headers
                                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                                            {{/responses.0}} {{#isDeprecated}} @@ -71,13 +71,11 @@ public class {{classname}} { @Deprecated {{/isDeprecated}} public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { - {{#returnType}} - return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}).getData(); - {{/returnType}}{{^returnType}} - {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); - {{/returnType}} + {{#returnType}}return {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{#returnType}}.getData(){{/returnType}}; } + {{/vendorExtensions.x-group-parameters}} + {{^vendorExtensions.x-group-parameters}} /** * {{summary}} * {{notes}} @@ -89,10 +87,10 @@ public class {{classname}} { {{#responses.0}} * @http.response.details - - {{#responses}} - - {{/responses}} + + {{#responses}} + + {{/responses}}
                                                            Status Code Description Response Headers
                                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                                            Status Code Description Response Headers
                                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                                            {{/responses.0}} {{#isDeprecated}} @@ -106,7 +104,7 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set @@ -152,13 +150,90 @@ public class {{classname}} { String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; - {{#returnType}} - GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; - return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - {{/returnType}}{{^returnType}} - return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - {{/returnType}} + {{#returnType}}GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {};{{/returnType}} + return apiClient.invokeAPI(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}); } + {{#vendorExtensions.x-group-parameters}} + + public class API{{operationId}}Request { + {{#allParams}} + private {{#isRequired}}final {{/isRequired}}{{{dataType}}} {{localVariablePrefix}}{{paramName}}; + {{/allParams}} + + private API{{operationId}}Request({{#pathParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}) { + {{#pathParams}} + this.{{localVariablePrefix}}{{paramName}} = {{paramName}}; + {{/pathParams}} + } + {{#allParams}}{{^isPathParam}} + + /** + * Set {{paramName}} + * @param {{paramName}} {{description}} ({{^required}}optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}{{/required}}{{#required}}required{{/required}}) + * @return API{{operationId}}Request + */ + public API{{operationId}}Request {{paramName}}({{{dataType}}} {{paramName}}) { + this.{{localVariablePrefix}}{{paramName}} = {{paramName}}; + return this; + } + {{/isPathParam}}{{/allParams}} + + /** + * Execute {{operationId}} request + {{#returnType}}* @return {{.}}{{/returnType}} + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + {{#responses}} + + {{/responses}} +
                                                            Status Code Description Response Headers
                                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                                            + {{/responses.0}} + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + */ + {{#isDeprecated}}@Deprecated{{/isDeprecated}} + public {{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException { + {{#returnType}}return {{/returnType}}this.executeWithHttpInfo().getData(); + } + + /** + * Execute {{operationId}} request with HTTP info returned + * @return ApiResponse<{{#returnType}}{{.}}{{/returnType}}{{^returnType}}Void{{/returnType}}> + * @throws ApiException if fails to make API call + {{#responses.0}} + * @http.response.details + + + {{#responses}} + + {{/responses}} +
                                                            Status Code Description Response Headers
                                                            {{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
                                                            {{/headers}}{{^headers.0}} - {{/headers.0}}
                                                            + {{/responses.0}} + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + */ + {{#isDeprecated}}@Deprecated{{/isDeprecated}} + public ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { + return {{operationId}}WithHttpInfo({{#allParams}}{{localVariablePrefix}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + } + } + + /** + * {{summary}} + * {{notes}}{{#pathParams}} + * @param {{paramName}} {{description}} (required){{/pathParams}} + * @return {{operationId}}Request + * @throws ApiException if fails to make API call + {{#isDeprecated}}* @deprecated{{/isDeprecated}} + {{#externalDocs}}* {{description}} + * @see {{summary}} Documentation{{/externalDocs}} + */ + {{#isDeprecated}}@Deprecated{{/isDeprecated}} + public API{{operationId}}Request {{operationId}}({{#pathParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}) throws ApiException { + return new API{{operationId}}Request({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}); + } + {{/vendorExtensions.x-group-parameters}} {{/operation}} } {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache new file mode 100644 index 0000000000..7e62976258 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache @@ -0,0 +1,111 @@ +# {{classname}}{{#description}} + +{{description}}{{/description}} + +All URIs are relative to *{{basePath}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +## {{operationId}} + +{{^vendorExtensions.x-group-parameters}}> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}}> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute();{{/vendorExtensions.x-group-parameters}} + +{{summary}}{{#notes}} + +{{{unescapedNotes}}}{{/notes}} + +### Example + +```java +// Import classes: +import {{{invokerPackage}}}.ApiClient; +import {{{invokerPackage}}}.ApiException; +import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} +import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} +import {{{invokerPackage}}}.models.*; +import {{{package}}}.{{{classname}}}; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("{{{basePath}}}"); + {{#hasAuthMethods}} + {{#authMethods}}{{#isBasic}}{{#isBasicBasic}} + // Configure HTTP basic authorization: {{{name}}} + HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setUsername("YOUR USERNAME"); + {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasicBasic}}{{#isBasicBearer}} + // Configure HTTP bearer authorization: {{{name}}} + HttpBearerAuth {{{name}}} = (HttpBearerAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setBearerToken("BEARER TOKEN");{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} + // Configure API key authorization: {{{name}}} + ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} + // Configure OAuth2 access token for authorization: {{{name}}} + OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); + {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} + {{/authMethods}} + {{/hasAuthMethods}} + + {{{classname}}} apiInstance = new {{{classname}}}(defaultClient); + {{#allParams}} + {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} + {{/allParams}} + try { {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}}{{#returnType}}{{{returnType}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} + .execute();{{/vendorExtensions.x-group-parameters}} + {{#returnType}}System.out.println(result);{{/returnType}} + } catch (ApiException e) { + System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{^isContainer}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{/isContainer}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}} +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + +- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} +- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{#responses.0}} +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +{{#responses}} +| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
                                                            {{/headers}}{{^headers.0}} - {{/headers.0}} | +{{/responses}} +{{/responses.0}} + +{{/operation}} +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache new file mode 100644 index 0000000000..21e0f97d63 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_test.mustache @@ -0,0 +1,51 @@ +{{>licenseInfo}} + +package {{package}}; + +import {{invokerPackage}}.ApiException; +{{#imports}}import {{import}}; +{{/imports}} +import org.junit.Test; +import org.junit.Ignore; + +{{^fullJavaUtil}} +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +{{/fullJavaUtil}} + +/** + * API tests for {{classname}} + */ +@Ignore +public class {{classname}}Test { + + private final {{classname}} api = new {{classname}}(); + + {{#operations}}{{#operation}} + /** + * {{summary}} + * + * {{notes}} + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void {{operationId}}Test() throws ApiException { + {{#allParams}} + {{{dataType}}} {{paramName}} = null; + {{/allParams}} + {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} + .execute(); + {{/vendorExtensions.x-group-parameters}} + // TODO: test validations + } + {{/operation}}{{/operations}} +} diff --git a/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md index 059616ec6b..6b6f08a5d8 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description > Client call123testSpecialTags(body) + To test special tags To test special tags and operation ID starting with number @@ -33,8 +34,9 @@ public class Example { AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md index 1ce9c124e9..7d866f1743 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md @@ -25,6 +25,7 @@ Method | HTTP request | Description > createXmlItem(xmlItem) + creates an XmlItem this route creates an XmlItem @@ -46,8 +47,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body - try { + try { apiInstance.createXmlItem(xmlItem); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#createXmlItem"); System.err.println("Status code: " + e.getCode()); @@ -91,6 +94,7 @@ No authorization required + Test serialization of outer boolean types ### Example @@ -110,8 +114,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Boolean body = true; // Boolean | Input boolean as post body - try { + try { Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); @@ -156,6 +161,7 @@ No authorization required + Test serialization of object with outer number type ### Example @@ -175,8 +181,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body - try { + try { OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -221,6 +228,7 @@ No authorization required + Test serialization of outer number types ### Example @@ -240,8 +248,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body - try { + try { BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); @@ -286,6 +295,7 @@ No authorization required + Test serialization of outer string types ### Example @@ -305,8 +315,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String body = "body_example"; // String | Input string as post body - try { + try { String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); @@ -351,7 +362,8 @@ No authorization required -For this test, the body for this request much reference a schema named `File`. + +For this test, the body for this request much reference a schema named `File`. ### Example @@ -370,8 +382,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | - try { + try { apiInstance.testBodyWithFileSchema(body); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -415,6 +429,7 @@ No authorization required + ### Example ```java @@ -433,8 +448,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | User body = new User(); // User | - try { + try { apiInstance.testBodyWithQueryParams(query, body); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -477,10 +494,11 @@ No authorization required > Client testClientModel(body) -To test \"client\" model To test \"client\" model +To test "client" model + ### Example ```java @@ -498,8 +516,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClientModel(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -542,10 +561,14 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + ### Example ```java @@ -582,8 +605,10 @@ public class Example { OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None - try { + try { apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEndpointParameters"); System.err.println("Status code: " + e.getCode()); @@ -639,6 +664,7 @@ null (empty response body) > testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) + To test enum parameters To test enum parameters @@ -667,8 +693,10 @@ public class Example { Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) List enumFormStringArray = "$"; // List | Form parameter enum test (string array) String enumFormString = "-efg"; // String | Form parameter enum test (string) - try { + try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -716,7 +744,8 @@ No authorization required ## testGroupParameters -> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) + +> testGroupParameters().requiredStringGroup(requiredStringGroup).requiredBooleanGroup(requiredBooleanGroup).requiredInt64Group(requiredInt64Group).stringGroup(stringGroup).booleanGroup(booleanGroup).int64Group(int64Group).execute(); Fake endpoint to test group parameters (optional) @@ -744,8 +773,16 @@ public class Example { Integer stringGroup = 56; // Integer | String in group parameters Boolean booleanGroup = true; // Boolean | Boolean in group parameters Long int64Group = 56L; // Long | Integer in group parameters - try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + try { + api.testGroupParameters() + .requiredStringGroup(requiredStringGroup) + .requiredBooleanGroup(requiredBooleanGroup) + .requiredInt64Group(requiredInt64Group) + .stringGroup(stringGroup) + .booleanGroup(booleanGroup) + .int64Group(int64Group) + .execute(); + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testGroupParameters"); System.err.println("Status code: " + e.getCode()); @@ -792,6 +829,7 @@ No authorization required > testInlineAdditionalProperties(param) + test inline additionalProperties ### Example @@ -811,8 +849,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Map param = new HashMap(); // Map | request body - try { + try { apiInstance.testInlineAdditionalProperties(param); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -854,6 +894,7 @@ No authorization required > testJsonFormData(param, param2) + test json serialization of form data ### Example @@ -874,8 +915,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String param = "param_example"; // String | field1 String param2 = "param2_example"; // String | field2 - try { + try { apiInstance.testJsonFormData(param, param2); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testJsonFormData"); System.err.println("Status code: " + e.getCode()); @@ -920,6 +963,7 @@ No authorization required + To test the collection format in query parameters ### Example @@ -943,8 +987,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | - try { + try { apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md index 14a74a37a4..1d683e302f 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md @@ -12,6 +12,7 @@ Method | HTTP request | Description > Client testClassname(body) + To test class name in snake case To test class name in snake case @@ -40,8 +41,9 @@ public class Example { FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClassname(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); diff --git a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md index 875a8e6783..00452d3fec 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description > addPet(body) + Add a new pet to the store ### Example @@ -44,8 +45,10 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.addPet(body); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -88,6 +91,7 @@ null (empty response body) > deletePet(petId, apiKey) + Deletes a pet ### Example @@ -113,8 +117,10 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | - try { + try { apiInstance.deletePet(petId, apiKey); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#deletePet"); System.err.println("Status code: " + e.getCode()); @@ -158,6 +164,7 @@ null (empty response body) > List<Pet> findPetsByStatus(status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -184,8 +191,9 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List status = Arrays.asList("available"); // List | Status values that need to be considered for filter - try { + try { List result = apiInstance.findPetsByStatus(status); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByStatus"); @@ -229,6 +237,7 @@ Name | Type | Description | Notes > List<Pet> findPetsByTags(tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -255,8 +264,9 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List tags = Arrays.asList(); // List | Tags to filter by - try { + try { List result = apiInstance.findPetsByTags(tags); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByTags"); @@ -300,6 +310,7 @@ Name | Type | Description | Notes > Pet getPetById(petId) + Find pet by ID Returns a single pet @@ -328,8 +339,9 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | ID of pet to return - try { + try { Pet result = apiInstance.getPetById(petId); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#getPetById"); @@ -374,6 +386,7 @@ Name | Type | Description | Notes > updatePet(body) + Update an existing pet ### Example @@ -398,8 +411,10 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.updatePet(body); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -444,6 +459,7 @@ null (empty response body) > updatePetWithForm(petId, name, status) + Updates a pet in the store with form data ### Example @@ -470,8 +486,10 @@ public class Example { Long petId = 56L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | Updated name of the pet String status = "status_example"; // String | Updated status of the pet - try { + try { apiInstance.updatePetWithForm(petId, name, status); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePetWithForm"); System.err.println("Status code: " + e.getCode()); @@ -515,6 +533,7 @@ null (empty response body) > ModelApiResponse uploadFile(petId, additionalMetadata, file) + uploads an image ### Example @@ -541,8 +560,9 @@ public class Example { Long petId = 56L; // Long | ID of pet to update String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server File file = new File("/path/to/file"); // File | file to upload - try { + try { ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFile"); @@ -587,6 +607,7 @@ Name | Type | Description | Notes > ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) + uploads an image (required) ### Example @@ -613,8 +634,9 @@ public class Example { Long petId = 56L; // Long | ID of pet to update File requiredFile = new File("/path/to/file"); // File | file to upload String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server - try { + try { ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); diff --git a/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md index 352399ea51..f3a9b2320c 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md @@ -15,9 +15,10 @@ Method | HTTP request | Description > deleteOrder(orderId) + Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example @@ -36,8 +37,10 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); String orderId = "orderId_example"; // String | ID of the order that needs to be deleted - try { + try { apiInstance.deleteOrder(orderId); + + } catch (ApiException e) { System.err.println("Exception when calling StoreApi#deleteOrder"); System.err.println("Status code: " + e.getCode()); @@ -80,6 +83,7 @@ No authorization required > Map<String, Integer> getInventory() + Returns pet inventories by status Returns a map of status codes to quantities @@ -107,8 +111,9 @@ public class Example { //api_key.setApiKeyPrefix("Token"); StoreApi apiInstance = new StoreApi(defaultClient); - try { + try { Map result = apiInstance.getInventory(); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getInventory"); @@ -148,9 +153,10 @@ This endpoint does not need any parameter. > Order getOrderById(orderId) + Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions ### Example @@ -169,8 +175,9 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Long orderId = 56L; // Long | ID of pet that needs to be fetched - try { + try { Order result = apiInstance.getOrderById(orderId); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getOrderById"); @@ -215,6 +222,7 @@ No authorization required > Order placeOrder(body) + Place an order for a pet ### Example @@ -234,8 +242,9 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Order body = new Order(); // Order | order placed for purchasing the pet - try { + try { Order result = apiInstance.placeOrder(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); diff --git a/samples/client/petstore/java/jersey2-java6/docs/UserApi.md b/samples/client/petstore/java/jersey2-java6/docs/UserApi.md index ca9f550c31..9bd97f6969 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/UserApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description > createUser(body) + Create user This can only be done by the logged in user. @@ -40,8 +41,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); User body = new User(); // User | Created user object - try { + try { apiInstance.createUser(body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -83,6 +86,7 @@ No authorization required > createUsersWithArrayInput(body) + Creates list of users with given input array ### Example @@ -102,8 +106,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithArrayInput(body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -145,6 +151,7 @@ No authorization required > createUsersWithListInput(body) + Creates list of users with given input array ### Example @@ -164,8 +171,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithListInput(body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -207,6 +216,7 @@ No authorization required > deleteUser(username) + Delete user This can only be done by the logged in user. @@ -228,8 +238,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be deleted - try { + try { apiInstance.deleteUser(username); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#deleteUser"); System.err.println("Status code: " + e.getCode()); @@ -272,6 +284,7 @@ No authorization required > User getUserByName(username) + Get user by user name ### Example @@ -291,8 +304,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. - try { + try { User result = apiInstance.getUserByName(username); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#getUserByName"); @@ -337,6 +351,7 @@ No authorization required > String loginUser(username, password) + Logs user into the system ### Example @@ -357,8 +372,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The user name for login String password = "password_example"; // String | The password for login in clear text - try { + try { String result = apiInstance.loginUser(username, password); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#loginUser"); @@ -403,6 +419,7 @@ No authorization required > logoutUser() + Logs out current logged in user session ### Example @@ -421,8 +438,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - try { + try { apiInstance.logoutUser(); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#logoutUser"); System.err.println("Status code: " + e.getCode()); @@ -461,6 +480,7 @@ No authorization required > updateUser(username, body) + Updated user This can only be done by the logged in user. @@ -483,8 +503,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted User body = new User(); // User | Updated user object - try { + try { apiInstance.updateUser(username, body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 9d0776bb22..351b318290 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -34,7 +34,6 @@ public class AnotherFakeApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * To test special tags * To test special tags and operation ID starting with number @@ -43,13 +42,13 @@ public class AnotherFakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Client call123testSpecialTags(Client body) throws ApiException { return call123testSpecialTagsWithHttpInfo(body).getData(); - } + } /** * To test special tags @@ -59,8 +58,8 @@ public class AnotherFakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { @@ -98,5 +97,5 @@ public class AnotherFakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java index 28099fcab8..fc2bb8b436 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java @@ -42,7 +42,6 @@ public class FakeApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * creates an XmlItem * this route creates an XmlItem @@ -50,12 +49,11 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public void createXmlItem(XmlItem xmlItem) throws ApiException { - createXmlItemWithHttpInfo(xmlItem); } @@ -67,8 +65,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { @@ -104,7 +102,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -115,13 +113,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            */ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { return fakeOuterBooleanSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -131,8 +129,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            */ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { @@ -165,7 +163,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * Test serialization of object with outer number type @@ -174,13 +172,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            */ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { return fakeOuterCompositeSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -190,8 +188,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            */ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { @@ -224,7 +222,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * Test serialization of outer number types @@ -233,13 +231,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            */ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { return fakeOuterNumberSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -249,8 +247,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            */ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { @@ -283,7 +281,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * Test serialization of outer string types @@ -292,13 +290,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            */ public String fakeOuterStringSerialize(String body) throws ApiException { return fakeOuterStringSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -308,8 +306,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            */ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { @@ -342,7 +340,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * For this test, the body for this request much reference a schema named `File`. @@ -350,12 +348,11 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { - testBodyWithFileSchemaWithHttpInfo(body); } @@ -367,8 +364,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { @@ -404,7 +401,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -415,12 +412,11 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public void testBodyWithQueryParams(String query, User body) throws ApiException { - testBodyWithQueryParamsWithHttpInfo(query, body); } @@ -433,8 +429,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { @@ -476,7 +472,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -487,13 +483,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Client testClientModel(Client body) throws ApiException { return testClientModelWithHttpInfo(body).getData(); - } + } /** * To test \"client\" model @@ -503,8 +499,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { @@ -542,7 +538,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -563,13 +559,12 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { - testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -594,9 +589,9 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { @@ -675,7 +670,7 @@ if (paramCallback != null) String[] localVarAuthNames = new String[] { "http_basic_test" }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -692,13 +687,12 @@ if (paramCallback != null) * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            */ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -717,9 +711,9 @@ if (paramCallback != null) * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { @@ -762,48 +756,11 @@ if (enumFormString != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } - /** - * Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - * @throws ApiException if fails to make API call - * @http.response.details - - - -
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            - */ - public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { - testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - - /** - * Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - - - -
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            - */ - public ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { +private ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'requiredStringGroup' is set @@ -854,9 +811,133 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } + + public class APItestGroupParametersRequest { + private Integer requiredStringGroup; + private Boolean requiredBooleanGroup; + private Long requiredInt64Group; + private Integer stringGroup; + private Boolean booleanGroup; + private Long int64Group; + + private APItestGroupParametersRequest() { + } + + + /** + * Set requiredStringGroup + * @param requiredStringGroup Required String in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredStringGroup(Integer requiredStringGroup) { + this.requiredStringGroup = requiredStringGroup; + return this; + } + + + /** + * Set requiredBooleanGroup + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredBooleanGroup(Boolean requiredBooleanGroup) { + this.requiredBooleanGroup = requiredBooleanGroup; + return this; + } + + + /** + * Set requiredInt64Group + * @param requiredInt64Group Required Integer in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredInt64Group(Long requiredInt64Group) { + this.requiredInt64Group = requiredInt64Group; + return this; + } + + + /** + * Set stringGroup + * @param stringGroup String in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest stringGroup(Integer stringGroup) { + this.stringGroup = stringGroup; + return this; + } + + + /** + * Set booleanGroup + * @param booleanGroup Boolean in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest booleanGroup(Boolean booleanGroup) { + this.booleanGroup = booleanGroup; + return this; + } + + + /** + * Set int64Group + * @param int64Group Integer in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest int64Group(Long int64Group) { + this.int64Group = int64Group; + return this; + } + + + /** + * Execute testGroupParameters request + + * @throws ApiException if fails to make API call + * @http.response.details + + + +
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            + + */ + + public void execute() throws ApiException { + this.executeWithHttpInfo().getData(); + } + + /** + * Execute testGroupParameters request with HTTP info returned + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            + + */ + + public ApiResponse executeWithHttpInfo() throws ApiException { + return testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @return testGroupParametersRequest + * @throws ApiException if fails to make API call + + + */ + + public APItestGroupParametersRequest testGroupParameters() throws ApiException { + return new APItestGroupParametersRequest(); + } /** * test inline additionalProperties * @@ -864,12 +945,11 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public void testInlineAdditionalProperties(Map param) throws ApiException { - testInlineAdditionalPropertiesWithHttpInfo(param); } @@ -881,8 +961,8 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { @@ -918,7 +998,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -929,12 +1009,11 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public void testJsonFormData(String param, String param2) throws ApiException { - testJsonFormDataWithHttpInfo(param, param2); } @@ -947,8 +1026,8 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { @@ -993,7 +1072,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -1007,12 +1086,11 @@ if (param2 != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws ApiException { - testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); } @@ -1028,8 +1106,8 @@ if (param2 != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public ApiResponse testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws ApiException { @@ -1090,7 +1168,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index e4f033f2a1..b683fb3d19 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -34,7 +34,6 @@ public class FakeClassnameTags123Api { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * To test class name in snake case * To test class name in snake case @@ -43,13 +42,13 @@ public class FakeClassnameTags123Api { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Client testClassname(Client body) throws ApiException { return testClassnameWithHttpInfo(body).getData(); - } + } /** * To test class name in snake case @@ -59,8 +58,8 @@ public class FakeClassnameTags123Api { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { @@ -98,5 +97,5 @@ public class FakeClassnameTags123Api { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java index 11467f78a1..3a6881beec 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java @@ -36,7 +36,6 @@ public class PetApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * Add a new pet to the store * @@ -44,13 +43,12 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            */ public void addPet(Pet body) throws ApiException { - addPetWithHttpInfo(body); } @@ -62,9 +60,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            */ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { @@ -100,7 +98,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -111,13 +109,12 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            */ public void deletePet(Long petId, String apiKey) throws ApiException { - deletePetWithHttpInfo(petId, apiKey); } @@ -130,9 +127,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { @@ -171,7 +168,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -182,14 +179,14 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            */ public List findPetsByStatus(List status) throws ApiException { return findPetsByStatusWithHttpInfo(status).getData(); - } + } /** * Finds Pets by status @@ -199,9 +196,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { @@ -240,7 +237,7 @@ public class PetApi { GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -249,16 +246,16 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            * @deprecated */ @Deprecated public List findPetsByTags(List tags) throws ApiException { return findPetsByTagsWithHttpInfo(tags).getData(); - } + } /** * Finds Pets by tags @@ -268,9 +265,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            * @deprecated */ @@ -311,7 +308,7 @@ public class PetApi { GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Find pet by ID * Returns a single pet @@ -320,15 +317,15 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            */ public Pet getPetById(Long petId) throws ApiException { return getPetByIdWithHttpInfo(petId).getData(); - } + } /** * Find pet by ID @@ -338,10 +335,10 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { @@ -380,7 +377,7 @@ public class PetApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Update an existing pet * @@ -388,15 +385,14 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - - + + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            */ public void updatePet(Pet body) throws ApiException { - updatePetWithHttpInfo(body); } @@ -408,11 +404,11 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - - + + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            */ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { @@ -448,7 +444,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -460,12 +456,11 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            */ public void updatePetWithForm(Long petId, String name, String status) throws ApiException { - updatePetWithFormWithHttpInfo(petId, name, status); } @@ -479,8 +474,8 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { @@ -521,7 +516,7 @@ if (status != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -534,13 +529,13 @@ if (status != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { return uploadFileWithHttpInfo(petId, additionalMetadata, file).getData(); - } + } /** * uploads an image @@ -552,8 +547,8 @@ if (status != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { @@ -596,7 +591,7 @@ if (file != null) GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * uploads an image (required) * @@ -607,13 +602,13 @@ if (file != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData(); - } + } /** * uploads an image (required) @@ -625,8 +620,8 @@ if (file != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { @@ -674,5 +669,5 @@ if (requiredFile != null) GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java index 42734da7a6..1d91724c7e 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java @@ -34,7 +34,6 @@ public class StoreApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -42,13 +41,12 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public void deleteOrder(String orderId) throws ApiException { - deleteOrderWithHttpInfo(orderId); } @@ -60,9 +58,9 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { @@ -99,7 +97,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -109,13 +107,13 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Map getInventory() throws ApiException { return getInventoryWithHttpInfo().getData(); - } + } /** * Returns pet inventories by status @@ -124,8 +122,8 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { @@ -158,7 +156,7 @@ public class StoreApi { GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -167,15 +165,15 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public Order getOrderById(Long orderId) throws ApiException { return getOrderByIdWithHttpInfo(orderId).getData(); - } + } /** * Find purchase order by ID @@ -185,10 +183,10 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { @@ -227,7 +225,7 @@ public class StoreApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Place an order for a pet * @@ -236,14 +234,14 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            */ public Order placeOrder(Order body) throws ApiException { return placeOrderWithHttpInfo(body).getData(); - } + } /** * Place an order for a pet @@ -253,9 +251,9 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            */ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { @@ -293,5 +291,5 @@ public class StoreApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java index ab4ae8c089..4bd9e6801a 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java @@ -34,7 +34,6 @@ public class UserApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * Create user * This can only be done by the logged in user. @@ -42,12 +41,11 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void createUser(User body) throws ApiException { - createUserWithHttpInfo(body); } @@ -59,8 +57,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { @@ -96,7 +94,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -106,12 +104,11 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void createUsersWithArrayInput(List body) throws ApiException { - createUsersWithArrayInputWithHttpInfo(body); } @@ -123,8 +120,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { @@ -160,7 +157,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -170,12 +167,11 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void createUsersWithListInput(List body) throws ApiException { - createUsersWithListInputWithHttpInfo(body); } @@ -187,8 +183,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { @@ -224,7 +220,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -234,13 +230,12 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public void deleteUser(String username) throws ApiException { - deleteUserWithHttpInfo(username); } @@ -252,9 +247,9 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { @@ -291,7 +286,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -302,15 +297,15 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public User getUserByName(String username) throws ApiException { return getUserByNameWithHttpInfo(username).getData(); - } + } /** * Get user by user name @@ -320,10 +315,10 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { @@ -362,7 +357,7 @@ public class UserApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Logs user into the system * @@ -372,14 +367,14 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            */ public String loginUser(String username, String password) throws ApiException { return loginUserWithHttpInfo(username, password).getData(); - } + } /** * Logs user into the system @@ -390,9 +385,9 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { @@ -437,19 +432,18 @@ public class UserApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Logs out current logged in user session * * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void logoutUser() throws ApiException { - logoutUserWithHttpInfo(); } @@ -460,8 +454,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { @@ -492,7 +486,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -503,13 +497,12 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            */ public void updateUser(String username, User body) throws ApiException { - updateUserWithHttpInfo(username, body); } @@ -522,9 +515,9 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            */ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { @@ -566,7 +559,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md index 059616ec6b..6b6f08a5d8 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description > Client call123testSpecialTags(body) + To test special tags To test special tags and operation ID starting with number @@ -33,8 +34,9 @@ public class Example { AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index 1ce9c124e9..7d866f1743 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -25,6 +25,7 @@ Method | HTTP request | Description > createXmlItem(xmlItem) + creates an XmlItem this route creates an XmlItem @@ -46,8 +47,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body - try { + try { apiInstance.createXmlItem(xmlItem); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#createXmlItem"); System.err.println("Status code: " + e.getCode()); @@ -91,6 +94,7 @@ No authorization required + Test serialization of outer boolean types ### Example @@ -110,8 +114,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Boolean body = true; // Boolean | Input boolean as post body - try { + try { Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); @@ -156,6 +161,7 @@ No authorization required + Test serialization of object with outer number type ### Example @@ -175,8 +181,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body - try { + try { OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -221,6 +228,7 @@ No authorization required + Test serialization of outer number types ### Example @@ -240,8 +248,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body - try { + try { BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); @@ -286,6 +295,7 @@ No authorization required + Test serialization of outer string types ### Example @@ -305,8 +315,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String body = "body_example"; // String | Input string as post body - try { + try { String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); @@ -351,7 +362,8 @@ No authorization required -For this test, the body for this request much reference a schema named `File`. + +For this test, the body for this request much reference a schema named `File`. ### Example @@ -370,8 +382,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | - try { + try { apiInstance.testBodyWithFileSchema(body); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -415,6 +429,7 @@ No authorization required + ### Example ```java @@ -433,8 +448,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | User body = new User(); // User | - try { + try { apiInstance.testBodyWithQueryParams(query, body); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -477,10 +494,11 @@ No authorization required > Client testClientModel(body) -To test \"client\" model To test \"client\" model +To test "client" model + ### Example ```java @@ -498,8 +516,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClientModel(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -542,10 +561,14 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + ### Example ```java @@ -582,8 +605,10 @@ public class Example { OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None - try { + try { apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEndpointParameters"); System.err.println("Status code: " + e.getCode()); @@ -639,6 +664,7 @@ null (empty response body) > testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) + To test enum parameters To test enum parameters @@ -667,8 +693,10 @@ public class Example { Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) List enumFormStringArray = "$"; // List | Form parameter enum test (string array) String enumFormString = "-efg"; // String | Form parameter enum test (string) - try { + try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -716,7 +744,8 @@ No authorization required ## testGroupParameters -> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) + +> testGroupParameters().requiredStringGroup(requiredStringGroup).requiredBooleanGroup(requiredBooleanGroup).requiredInt64Group(requiredInt64Group).stringGroup(stringGroup).booleanGroup(booleanGroup).int64Group(int64Group).execute(); Fake endpoint to test group parameters (optional) @@ -744,8 +773,16 @@ public class Example { Integer stringGroup = 56; // Integer | String in group parameters Boolean booleanGroup = true; // Boolean | Boolean in group parameters Long int64Group = 56L; // Long | Integer in group parameters - try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + try { + api.testGroupParameters() + .requiredStringGroup(requiredStringGroup) + .requiredBooleanGroup(requiredBooleanGroup) + .requiredInt64Group(requiredInt64Group) + .stringGroup(stringGroup) + .booleanGroup(booleanGroup) + .int64Group(int64Group) + .execute(); + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testGroupParameters"); System.err.println("Status code: " + e.getCode()); @@ -792,6 +829,7 @@ No authorization required > testInlineAdditionalProperties(param) + test inline additionalProperties ### Example @@ -811,8 +849,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Map param = new HashMap(); // Map | request body - try { + try { apiInstance.testInlineAdditionalProperties(param); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -854,6 +894,7 @@ No authorization required > testJsonFormData(param, param2) + test json serialization of form data ### Example @@ -874,8 +915,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String param = "param_example"; // String | field1 String param2 = "param2_example"; // String | field2 - try { + try { apiInstance.testJsonFormData(param, param2); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testJsonFormData"); System.err.println("Status code: " + e.getCode()); @@ -920,6 +963,7 @@ No authorization required + To test the collection format in query parameters ### Example @@ -943,8 +987,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | - try { + try { apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md index 14a74a37a4..1d683e302f 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md @@ -12,6 +12,7 @@ Method | HTTP request | Description > Client testClassname(body) + To test class name in snake case To test class name in snake case @@ -40,8 +41,9 @@ public class Example { FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClassname(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); diff --git a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md index 875a8e6783..00452d3fec 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description > addPet(body) + Add a new pet to the store ### Example @@ -44,8 +45,10 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.addPet(body); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -88,6 +91,7 @@ null (empty response body) > deletePet(petId, apiKey) + Deletes a pet ### Example @@ -113,8 +117,10 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | - try { + try { apiInstance.deletePet(petId, apiKey); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#deletePet"); System.err.println("Status code: " + e.getCode()); @@ -158,6 +164,7 @@ null (empty response body) > List<Pet> findPetsByStatus(status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -184,8 +191,9 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List status = Arrays.asList("available"); // List | Status values that need to be considered for filter - try { + try { List result = apiInstance.findPetsByStatus(status); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByStatus"); @@ -229,6 +237,7 @@ Name | Type | Description | Notes > List<Pet> findPetsByTags(tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -255,8 +264,9 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List tags = Arrays.asList(); // List | Tags to filter by - try { + try { List result = apiInstance.findPetsByTags(tags); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByTags"); @@ -300,6 +310,7 @@ Name | Type | Description | Notes > Pet getPetById(petId) + Find pet by ID Returns a single pet @@ -328,8 +339,9 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | ID of pet to return - try { + try { Pet result = apiInstance.getPetById(petId); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#getPetById"); @@ -374,6 +386,7 @@ Name | Type | Description | Notes > updatePet(body) + Update an existing pet ### Example @@ -398,8 +411,10 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.updatePet(body); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -444,6 +459,7 @@ null (empty response body) > updatePetWithForm(petId, name, status) + Updates a pet in the store with form data ### Example @@ -470,8 +486,10 @@ public class Example { Long petId = 56L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | Updated name of the pet String status = "status_example"; // String | Updated status of the pet - try { + try { apiInstance.updatePetWithForm(petId, name, status); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePetWithForm"); System.err.println("Status code: " + e.getCode()); @@ -515,6 +533,7 @@ null (empty response body) > ModelApiResponse uploadFile(petId, additionalMetadata, file) + uploads an image ### Example @@ -541,8 +560,9 @@ public class Example { Long petId = 56L; // Long | ID of pet to update String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server File file = new File("/path/to/file"); // File | file to upload - try { + try { ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFile"); @@ -587,6 +607,7 @@ Name | Type | Description | Notes > ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) + uploads an image (required) ### Example @@ -613,8 +634,9 @@ public class Example { Long petId = 56L; // Long | ID of pet to update File requiredFile = new File("/path/to/file"); // File | file to upload String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server - try { + try { ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); diff --git a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md index 352399ea51..f3a9b2320c 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md @@ -15,9 +15,10 @@ Method | HTTP request | Description > deleteOrder(orderId) + Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example @@ -36,8 +37,10 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); String orderId = "orderId_example"; // String | ID of the order that needs to be deleted - try { + try { apiInstance.deleteOrder(orderId); + + } catch (ApiException e) { System.err.println("Exception when calling StoreApi#deleteOrder"); System.err.println("Status code: " + e.getCode()); @@ -80,6 +83,7 @@ No authorization required > Map<String, Integer> getInventory() + Returns pet inventories by status Returns a map of status codes to quantities @@ -107,8 +111,9 @@ public class Example { //api_key.setApiKeyPrefix("Token"); StoreApi apiInstance = new StoreApi(defaultClient); - try { + try { Map result = apiInstance.getInventory(); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getInventory"); @@ -148,9 +153,10 @@ This endpoint does not need any parameter. > Order getOrderById(orderId) + Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions ### Example @@ -169,8 +175,9 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Long orderId = 56L; // Long | ID of pet that needs to be fetched - try { + try { Order result = apiInstance.getOrderById(orderId); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getOrderById"); @@ -215,6 +222,7 @@ No authorization required > Order placeOrder(body) + Place an order for a pet ### Example @@ -234,8 +242,9 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Order body = new Order(); // Order | order placed for purchasing the pet - try { + try { Order result = apiInstance.placeOrder(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); diff --git a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md index ca9f550c31..9bd97f6969 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description > createUser(body) + Create user This can only be done by the logged in user. @@ -40,8 +41,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); User body = new User(); // User | Created user object - try { + try { apiInstance.createUser(body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -83,6 +86,7 @@ No authorization required > createUsersWithArrayInput(body) + Creates list of users with given input array ### Example @@ -102,8 +106,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithArrayInput(body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -145,6 +151,7 @@ No authorization required > createUsersWithListInput(body) + Creates list of users with given input array ### Example @@ -164,8 +171,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithListInput(body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -207,6 +216,7 @@ No authorization required > deleteUser(username) + Delete user This can only be done by the logged in user. @@ -228,8 +238,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be deleted - try { + try { apiInstance.deleteUser(username); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#deleteUser"); System.err.println("Status code: " + e.getCode()); @@ -272,6 +284,7 @@ No authorization required > User getUserByName(username) + Get user by user name ### Example @@ -291,8 +304,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. - try { + try { User result = apiInstance.getUserByName(username); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#getUserByName"); @@ -337,6 +351,7 @@ No authorization required > String loginUser(username, password) + Logs user into the system ### Example @@ -357,8 +372,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The user name for login String password = "password_example"; // String | The password for login in clear text - try { + try { String result = apiInstance.loginUser(username, password); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#loginUser"); @@ -403,6 +419,7 @@ No authorization required > logoutUser() + Logs out current logged in user session ### Example @@ -421,8 +438,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - try { + try { apiInstance.logoutUser(); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#logoutUser"); System.err.println("Status code: " + e.getCode()); @@ -461,6 +480,7 @@ No authorization required > updateUser(username, body) + Updated user This can only be done by the logged in user. @@ -483,8 +503,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted User body = new User(); // User | Updated user object - try { + try { apiInstance.updateUser(username, body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 9d0776bb22..351b318290 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -34,7 +34,6 @@ public class AnotherFakeApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * To test special tags * To test special tags and operation ID starting with number @@ -43,13 +42,13 @@ public class AnotherFakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Client call123testSpecialTags(Client body) throws ApiException { return call123testSpecialTagsWithHttpInfo(body).getData(); - } + } /** * To test special tags @@ -59,8 +58,8 @@ public class AnotherFakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { @@ -98,5 +97,5 @@ public class AnotherFakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index 22ed9fd99a..c1c2aa4413 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -42,7 +42,6 @@ public class FakeApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * creates an XmlItem * this route creates an XmlItem @@ -50,12 +49,11 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public void createXmlItem(XmlItem xmlItem) throws ApiException { - createXmlItemWithHttpInfo(xmlItem); } @@ -67,8 +65,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { @@ -104,7 +102,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -115,13 +113,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            */ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { return fakeOuterBooleanSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -131,8 +129,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            */ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { @@ -165,7 +163,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * Test serialization of object with outer number type @@ -174,13 +172,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            */ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { return fakeOuterCompositeSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -190,8 +188,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            */ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { @@ -224,7 +222,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * Test serialization of outer number types @@ -233,13 +231,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            */ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { return fakeOuterNumberSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -249,8 +247,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            */ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { @@ -283,7 +281,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * Test serialization of outer string types @@ -292,13 +290,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            */ public String fakeOuterStringSerialize(String body) throws ApiException { return fakeOuterStringSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -308,8 +306,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            */ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { @@ -342,7 +340,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * For this test, the body for this request much reference a schema named `File`. @@ -350,12 +348,11 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { - testBodyWithFileSchemaWithHttpInfo(body); } @@ -367,8 +364,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { @@ -404,7 +401,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -415,12 +412,11 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public void testBodyWithQueryParams(String query, User body) throws ApiException { - testBodyWithQueryParamsWithHttpInfo(query, body); } @@ -433,8 +429,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { @@ -476,7 +472,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -487,13 +483,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Client testClientModel(Client body) throws ApiException { return testClientModelWithHttpInfo(body).getData(); - } + } /** * To test \"client\" model @@ -503,8 +499,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { @@ -542,7 +538,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -563,13 +559,12 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { - testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -594,9 +589,9 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { @@ -675,7 +670,7 @@ if (paramCallback != null) String[] localVarAuthNames = new String[] { "http_basic_test" }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -692,13 +687,12 @@ if (paramCallback != null) * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            */ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -717,9 +711,9 @@ if (paramCallback != null) * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { @@ -762,48 +756,11 @@ if (enumFormString != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } - /** - * Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - * @throws ApiException if fails to make API call - * @http.response.details - - - -
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            - */ - public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { - testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - - /** - * Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - - - -
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            - */ - public ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { +private ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'requiredStringGroup' is set @@ -854,9 +811,133 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } + + public class APItestGroupParametersRequest { + private Integer requiredStringGroup; + private Boolean requiredBooleanGroup; + private Long requiredInt64Group; + private Integer stringGroup; + private Boolean booleanGroup; + private Long int64Group; + + private APItestGroupParametersRequest() { + } + + + /** + * Set requiredStringGroup + * @param requiredStringGroup Required String in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredStringGroup(Integer requiredStringGroup) { + this.requiredStringGroup = requiredStringGroup; + return this; + } + + + /** + * Set requiredBooleanGroup + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredBooleanGroup(Boolean requiredBooleanGroup) { + this.requiredBooleanGroup = requiredBooleanGroup; + return this; + } + + + /** + * Set requiredInt64Group + * @param requiredInt64Group Required Integer in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredInt64Group(Long requiredInt64Group) { + this.requiredInt64Group = requiredInt64Group; + return this; + } + + + /** + * Set stringGroup + * @param stringGroup String in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest stringGroup(Integer stringGroup) { + this.stringGroup = stringGroup; + return this; + } + + + /** + * Set booleanGroup + * @param booleanGroup Boolean in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest booleanGroup(Boolean booleanGroup) { + this.booleanGroup = booleanGroup; + return this; + } + + + /** + * Set int64Group + * @param int64Group Integer in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest int64Group(Long int64Group) { + this.int64Group = int64Group; + return this; + } + + + /** + * Execute testGroupParameters request + + * @throws ApiException if fails to make API call + * @http.response.details + + + +
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            + + */ + + public void execute() throws ApiException { + this.executeWithHttpInfo().getData(); + } + + /** + * Execute testGroupParameters request with HTTP info returned + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            + + */ + + public ApiResponse executeWithHttpInfo() throws ApiException { + return testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @return testGroupParametersRequest + * @throws ApiException if fails to make API call + + + */ + + public APItestGroupParametersRequest testGroupParameters() throws ApiException { + return new APItestGroupParametersRequest(); + } /** * test inline additionalProperties * @@ -864,12 +945,11 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public void testInlineAdditionalProperties(Map param) throws ApiException { - testInlineAdditionalPropertiesWithHttpInfo(param); } @@ -881,8 +961,8 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { @@ -918,7 +998,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -929,12 +1009,11 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public void testJsonFormData(String param, String param2) throws ApiException { - testJsonFormDataWithHttpInfo(param, param2); } @@ -947,8 +1026,8 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { @@ -993,7 +1072,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -1007,12 +1086,11 @@ if (param2 != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws ApiException { - testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); } @@ -1028,8 +1106,8 @@ if (param2 != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public ApiResponse testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws ApiException { @@ -1090,7 +1168,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index e4f033f2a1..b683fb3d19 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -34,7 +34,6 @@ public class FakeClassnameTags123Api { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * To test class name in snake case * To test class name in snake case @@ -43,13 +42,13 @@ public class FakeClassnameTags123Api { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Client testClassname(Client body) throws ApiException { return testClassnameWithHttpInfo(body).getData(); - } + } /** * To test class name in snake case @@ -59,8 +58,8 @@ public class FakeClassnameTags123Api { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { @@ -98,5 +97,5 @@ public class FakeClassnameTags123Api { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java index 11467f78a1..3a6881beec 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java @@ -36,7 +36,6 @@ public class PetApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * Add a new pet to the store * @@ -44,13 +43,12 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            */ public void addPet(Pet body) throws ApiException { - addPetWithHttpInfo(body); } @@ -62,9 +60,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            */ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { @@ -100,7 +98,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -111,13 +109,12 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            */ public void deletePet(Long petId, String apiKey) throws ApiException { - deletePetWithHttpInfo(petId, apiKey); } @@ -130,9 +127,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { @@ -171,7 +168,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -182,14 +179,14 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            */ public List findPetsByStatus(List status) throws ApiException { return findPetsByStatusWithHttpInfo(status).getData(); - } + } /** * Finds Pets by status @@ -199,9 +196,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { @@ -240,7 +237,7 @@ public class PetApi { GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -249,16 +246,16 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            * @deprecated */ @Deprecated public List findPetsByTags(List tags) throws ApiException { return findPetsByTagsWithHttpInfo(tags).getData(); - } + } /** * Finds Pets by tags @@ -268,9 +265,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            * @deprecated */ @@ -311,7 +308,7 @@ public class PetApi { GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Find pet by ID * Returns a single pet @@ -320,15 +317,15 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            */ public Pet getPetById(Long petId) throws ApiException { return getPetByIdWithHttpInfo(petId).getData(); - } + } /** * Find pet by ID @@ -338,10 +335,10 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { @@ -380,7 +377,7 @@ public class PetApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Update an existing pet * @@ -388,15 +385,14 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - - + + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            */ public void updatePet(Pet body) throws ApiException { - updatePetWithHttpInfo(body); } @@ -408,11 +404,11 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - - + + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            */ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { @@ -448,7 +444,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -460,12 +456,11 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            */ public void updatePetWithForm(Long petId, String name, String status) throws ApiException { - updatePetWithFormWithHttpInfo(petId, name, status); } @@ -479,8 +474,8 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { @@ -521,7 +516,7 @@ if (status != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -534,13 +529,13 @@ if (status != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { return uploadFileWithHttpInfo(petId, additionalMetadata, file).getData(); - } + } /** * uploads an image @@ -552,8 +547,8 @@ if (status != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { @@ -596,7 +591,7 @@ if (file != null) GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * uploads an image (required) * @@ -607,13 +602,13 @@ if (file != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData(); - } + } /** * uploads an image (required) @@ -625,8 +620,8 @@ if (file != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { @@ -674,5 +669,5 @@ if (requiredFile != null) GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java index 42734da7a6..1d91724c7e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java @@ -34,7 +34,6 @@ public class StoreApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -42,13 +41,12 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public void deleteOrder(String orderId) throws ApiException { - deleteOrderWithHttpInfo(orderId); } @@ -60,9 +58,9 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { @@ -99,7 +97,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -109,13 +107,13 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Map getInventory() throws ApiException { return getInventoryWithHttpInfo().getData(); - } + } /** * Returns pet inventories by status @@ -124,8 +122,8 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { @@ -158,7 +156,7 @@ public class StoreApi { GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -167,15 +165,15 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public Order getOrderById(Long orderId) throws ApiException { return getOrderByIdWithHttpInfo(orderId).getData(); - } + } /** * Find purchase order by ID @@ -185,10 +183,10 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { @@ -227,7 +225,7 @@ public class StoreApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Place an order for a pet * @@ -236,14 +234,14 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            */ public Order placeOrder(Order body) throws ApiException { return placeOrderWithHttpInfo(body).getData(); - } + } /** * Place an order for a pet @@ -253,9 +251,9 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            */ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { @@ -293,5 +291,5 @@ public class StoreApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java index ab4ae8c089..4bd9e6801a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java @@ -34,7 +34,6 @@ public class UserApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * Create user * This can only be done by the logged in user. @@ -42,12 +41,11 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void createUser(User body) throws ApiException { - createUserWithHttpInfo(body); } @@ -59,8 +57,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { @@ -96,7 +94,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -106,12 +104,11 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void createUsersWithArrayInput(List body) throws ApiException { - createUsersWithArrayInputWithHttpInfo(body); } @@ -123,8 +120,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { @@ -160,7 +157,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -170,12 +167,11 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void createUsersWithListInput(List body) throws ApiException { - createUsersWithListInputWithHttpInfo(body); } @@ -187,8 +183,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { @@ -224,7 +220,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -234,13 +230,12 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public void deleteUser(String username) throws ApiException { - deleteUserWithHttpInfo(username); } @@ -252,9 +247,9 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { @@ -291,7 +286,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -302,15 +297,15 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public User getUserByName(String username) throws ApiException { return getUserByNameWithHttpInfo(username).getData(); - } + } /** * Get user by user name @@ -320,10 +315,10 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { @@ -362,7 +357,7 @@ public class UserApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Logs user into the system * @@ -372,14 +367,14 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            */ public String loginUser(String username, String password) throws ApiException { return loginUserWithHttpInfo(username, password).getData(); - } + } /** * Logs user into the system @@ -390,9 +385,9 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { @@ -437,19 +432,18 @@ public class UserApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Logs out current logged in user session * * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void logoutUser() throws ApiException { - logoutUserWithHttpInfo(); } @@ -460,8 +454,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { @@ -492,7 +486,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -503,13 +497,12 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            */ public void updateUser(String username, User body) throws ApiException { - updateUserWithHttpInfo(username, body); } @@ -522,9 +515,9 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            */ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { @@ -566,7 +559,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index b6db8d2a2c..837b5ea024 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,9 +42,8 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() throws ApiException { - Client client = null; - Client response = api.call123testSpecialTags(client); - + Client body = null; + Client response = api.call123testSpecialTags(body); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java index 4731d235db..8640ddbe82 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.User; +import org.openapitools.client.model.XmlItem; import org.junit.Test; import org.junit.Ignore; @@ -39,6 +40,21 @@ public class FakeApiTest { private final FakeApi api = new FakeApi(); + /** + * creates an XmlItem + * + * this route creates an XmlItem + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createXmlItemTest() throws ApiException { + XmlItem xmlItem = null; + api.createXmlItem(xmlItem); + // TODO: test validations + } + /** * * @@ -51,7 +67,6 @@ public class FakeApiTest { public void fakeOuterBooleanSerializeTest() throws ApiException { Boolean body = null; Boolean response = api.fakeOuterBooleanSerialize(body); - // TODO: test validations } @@ -65,9 +80,8 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { - OuterComposite outerComposite = null; - OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); - + OuterComposite body = null; + OuterComposite response = api.fakeOuterCompositeSerialize(body); // TODO: test validations } @@ -83,7 +97,6 @@ public class FakeApiTest { public void fakeOuterNumberSerializeTest() throws ApiException { BigDecimal body = null; BigDecimal response = api.fakeOuterNumberSerialize(body); - // TODO: test validations } @@ -99,7 +112,6 @@ public class FakeApiTest { public void fakeOuterStringSerializeTest() throws ApiException { String body = null; String response = api.fakeOuterStringSerialize(body); - // TODO: test validations } @@ -113,9 +125,8 @@ public class FakeApiTest { */ @Test public void testBodyWithFileSchemaTest() throws ApiException { - FileSchemaTestClass fileSchemaTestClass = null; - api.testBodyWithFileSchema(fileSchemaTestClass); - + FileSchemaTestClass body = null; + api.testBodyWithFileSchema(body); // TODO: test validations } @@ -130,9 +141,8 @@ public class FakeApiTest { @Test public void testBodyWithQueryParamsTest() throws ApiException { String query = null; - User user = null; - api.testBodyWithQueryParams(query, user); - + User body = null; + api.testBodyWithQueryParams(query, body); // TODO: test validations } @@ -146,9 +156,8 @@ public class FakeApiTest { */ @Test public void testClientModelTest() throws ApiException { - Client client = null; - Client response = api.testClientModel(client); - + Client body = null; + Client response = api.testClientModel(body); // TODO: test validations } @@ -177,7 +186,6 @@ public class FakeApiTest { String password = null; String paramCallback = null; api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - // TODO: test validations } @@ -200,7 +208,6 @@ public class FakeApiTest { List enumFormStringArray = null; String enumFormString = null; api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - // TODO: test validations } @@ -220,8 +227,14 @@ public class FakeApiTest { Integer stringGroup = null; Boolean booleanGroup = null; Long int64Group = null; - api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - + api.testGroupParameters() + .requiredStringGroup(requiredStringGroup) + .requiredBooleanGroup(requiredBooleanGroup) + .requiredInt64Group(requiredInt64Group) + .stringGroup(stringGroup) + .booleanGroup(booleanGroup) + .int64Group(int64Group) + .execute(); // TODO: test validations } @@ -235,9 +248,8 @@ public class FakeApiTest { */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { - Map requestBody = null; - api.testInlineAdditionalProperties(requestBody); - + Map param = null; + api.testInlineAdditionalProperties(param); // TODO: test validations } @@ -254,7 +266,25 @@ public class FakeApiTest { String param = null; String param2 = null; api.testJsonFormData(param, param2); - + // TODO: test validations + } + + /** + * + * + * To test the collection format in query parameters + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryParameterCollectionFormatTest() throws ApiException { + List pipe = null; + List ioutil = null; + List http = null; + List url = null; + List context = null; + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index e2ac28cb12..7199931679 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,9 +42,8 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() throws ApiException { - Client client = null; - Client response = api.testClassname(client); - + Client body = null; + Client response = api.testClassname(body); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java index d3fbe90a5a..fd382967f1 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -44,9 +44,8 @@ public class PetApiTest { */ @Test public void addPetTest() throws ApiException { - Pet pet = null; - api.addPet(pet); - + Pet body = null; + api.addPet(body); // TODO: test validations } @@ -63,7 +62,6 @@ public class PetApiTest { Long petId = null; String apiKey = null; api.deletePet(petId, apiKey); - // TODO: test validations } @@ -79,7 +77,6 @@ public class PetApiTest { public void findPetsByStatusTest() throws ApiException { List status = null; List response = api.findPetsByStatus(status); - // TODO: test validations } @@ -95,7 +92,6 @@ public class PetApiTest { public void findPetsByTagsTest() throws ApiException { List tags = null; List response = api.findPetsByTags(tags); - // TODO: test validations } @@ -111,7 +107,6 @@ public class PetApiTest { public void getPetByIdTest() throws ApiException { Long petId = null; Pet response = api.getPetById(petId); - // TODO: test validations } @@ -125,9 +120,8 @@ public class PetApiTest { */ @Test public void updatePetTest() throws ApiException { - Pet pet = null; - api.updatePet(pet); - + Pet body = null; + api.updatePet(body); // TODO: test validations } @@ -145,7 +139,6 @@ public class PetApiTest { String name = null; String status = null; api.updatePetWithForm(petId, name, status); - // TODO: test validations } @@ -163,7 +156,23 @@ public class PetApiTest { String additionalMetadata = null; File file = null; ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - + // TODO: test validations + } + + /** + * uploads an image (required) + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() throws ApiException { + Long petId = null; + File requiredFile = null; + String additionalMetadata = null; + ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java index f83e6c3897..cd36a70fec 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -44,7 +44,6 @@ public class StoreApiTest { public void deleteOrderTest() throws ApiException { String orderId = null; api.deleteOrder(orderId); - // TODO: test validations } @@ -59,7 +58,6 @@ public class StoreApiTest { @Test public void getInventoryTest() throws ApiException { Map response = api.getInventory(); - // TODO: test validations } @@ -75,7 +73,6 @@ public class StoreApiTest { public void getOrderByIdTest() throws ApiException { Long orderId = null; Order response = api.getOrderById(orderId); - // TODO: test validations } @@ -89,9 +86,8 @@ public class StoreApiTest { */ @Test public void placeOrderTest() throws ApiException { - Order order = null; - Order response = api.placeOrder(order); - + Order body = null; + Order response = api.placeOrder(body); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java index 79e0b6b2bb..f7ef9050c9 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,9 +42,8 @@ public class UserApiTest { */ @Test public void createUserTest() throws ApiException { - User user = null; - api.createUser(user); - + User body = null; + api.createUser(body); // TODO: test validations } @@ -58,9 +57,8 @@ public class UserApiTest { */ @Test public void createUsersWithArrayInputTest() throws ApiException { - List user = null; - api.createUsersWithArrayInput(user); - + List body = null; + api.createUsersWithArrayInput(body); // TODO: test validations } @@ -74,9 +72,8 @@ public class UserApiTest { */ @Test public void createUsersWithListInputTest() throws ApiException { - List user = null; - api.createUsersWithListInput(user); - + List body = null; + api.createUsersWithListInput(body); // TODO: test validations } @@ -92,7 +89,6 @@ public class UserApiTest { public void deleteUserTest() throws ApiException { String username = null; api.deleteUser(username); - // TODO: test validations } @@ -108,7 +104,6 @@ public class UserApiTest { public void getUserByNameTest() throws ApiException { String username = null; User response = api.getUserByName(username); - // TODO: test validations } @@ -125,7 +120,6 @@ public class UserApiTest { String username = null; String password = null; String response = api.loginUser(username, password); - // TODO: test validations } @@ -140,7 +134,6 @@ public class UserApiTest { @Test public void logoutUserTest() throws ApiException { api.logoutUser(); - // TODO: test validations } @@ -155,9 +148,8 @@ public class UserApiTest { @Test public void updateUserTest() throws ApiException { String username = null; - User user = null; - api.updateUser(username, user); - + User body = null; + api.updateUser(username, body); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index 2b0bd0bbae..ec44af7838 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index c6dd88eea8..ceb024c562 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index 9d474c0dd8..517e5a10ae 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index c6bcc988bf..2e3844ba97 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,13 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -41,19 +43,91 @@ public class AdditionalPropertiesClassTest { } /** - * Test the property 'mapProperty' + * Test the property 'mapString' */ @Test - public void mapPropertyTest() { - // TODO: test mapProperty + public void mapStringTest() { + // TODO: test mapString } /** - * Test the property 'mapOfMapProperty' + * Test the property 'mapNumber' */ @Test - public void mapOfMapPropertyTest() { - // TODO: test mapOfMapProperty + public void mapNumberTest() { + // TODO: test mapNumber + } + + /** + * Test the property 'mapInteger' + */ + @Test + public void mapIntegerTest() { + // TODO: test mapInteger + } + + /** + * Test the property 'mapBoolean' + */ + @Test + public void mapBooleanTest() { + // TODO: test mapBoolean + } + + /** + * Test the property 'mapArrayInteger' + */ + @Test + public void mapArrayIntegerTest() { + // TODO: test mapArrayInteger + } + + /** + * Test the property 'mapArrayAnytype' + */ + @Test + public void mapArrayAnytypeTest() { + // TODO: test mapArrayAnytype + } + + /** + * Test the property 'mapMapString' + */ + @Test + public void mapMapStringTest() { + // TODO: test mapMapString + } + + /** + * Test the property 'mapMapAnytype' + */ + @Test + public void mapMapAnytypeTest() { + // TODO: test mapMapAnytype + } + + /** + * Test the property 'anytype1' + */ + @Test + public void anytype1Test() { + // TODO: test anytype1 + } + + /** + * Test the property 'anytype2' + */ + @Test + public void anytype2Test() { + // TODO: test anytype2 + } + + /** + * Test the property 'anytype3' + */ + @Test + public void anytype3Test() { + // TODO: test anytype3 } } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index bf1b1c427b..66a7b85623 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index b9cb6470e3..4e03485a44 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index 3cbcb8ec3b..e0c72c5863 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index 1d3c05075e..c84d987e76 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java index beb02882b3..c0d10ec5a3 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index ae7970522b..e25187a3b6 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 6151b7068b..ae10618239 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 4bb62b6569..36bd9951cf 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java index eae9be7938..a701b341fc 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 69b226745d..1d85a04472 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java index dcb9f2d4ca..dbf40678a2 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CatTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,14 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; +import org.openapitools.client.model.CatAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java index 1df27cf032..6027994a2a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java index 04eb02f835..8914c9cad4 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java index 03b6bb41a5..c21b346272 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ClientTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 1b83dcefc4..6e4b491080 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java index 06ac28f804..a46bc508d4 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/DogTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,14 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 11b5f01985..45b8fbbd82 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java index cb51ca50c9..9e45543fac 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java index 13122a0cb9..04e7afb197 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index a6b0d8ff7b..ef37e666be 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java index 9cbc69fd1d..73a1f73750 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -146,4 +147,12 @@ public class FormatTestTest { // TODO: test password } + /** + * Test the property 'bigDecimal' + */ + @Test + public void bigDecimalTest() { + // TODO: test bigDecimal + } + } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index 2c4b2470b9..e902c10038 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java index 0f08d8c88f..a0c991bb75 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index 504be4cd00..630b566f54 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 1ad55ca32e..82c7208079 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 73d28676ae..97a1287aa4 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b073fda001..f884519ebc 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java index e81ebc38e6..cb3a94cf74 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NameTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 565c8bd062..f4fbd5ee8b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java index d65ce716e1..da63441c65 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OrderTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 49b656a93f..ebea3ca304 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java index 61154c6d88..cf0ebae0fa 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java index bf6908e4a4..c3c0d4cc35 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/PetTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index e48b31a39f..b82a7d0ef5 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 1696eee82d..d5a19c371e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java index b37aca5fdf..5c2cc6f49e 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TagTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index 409076e80a..e96ac74443 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index ffd8f3ddc3..56641d163a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -56,6 +57,14 @@ public class TypeHolderExampleTest { // TODO: test numberItem } + /** + * Test the property 'floatItem' + */ + @Test + public void floatItemTest() { + // TODO: test floatItem + } + /** * Test the property 'integerItem' */ diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java index 76733c9e72..ce40d3a2a6 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/UserTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/XmlItemTest.java index 55e75391e0..501c414555 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -225,51 +226,51 @@ public class XmlItemTest { } /** - * Test the property 'prefixNamespaceString' + * Test the property 'prefixNsString' */ @Test - public void prefixNamespaceStringTest() { - // TODO: test prefixNamespaceString + public void prefixNsStringTest() { + // TODO: test prefixNsString } /** - * Test the property 'prefixNamespaceNumber' + * Test the property 'prefixNsNumber' */ @Test - public void prefixNamespaceNumberTest() { - // TODO: test prefixNamespaceNumber + public void prefixNsNumberTest() { + // TODO: test prefixNsNumber } /** - * Test the property 'prefixNamespaceInteger' + * Test the property 'prefixNsInteger' */ @Test - public void prefixNamespaceIntegerTest() { - // TODO: test prefixNamespaceInteger + public void prefixNsIntegerTest() { + // TODO: test prefixNsInteger } /** - * Test the property 'prefixNamespaceBoolean' + * Test the property 'prefixNsBoolean' */ @Test - public void prefixNamespaceBooleanTest() { - // TODO: test prefixNamespaceBoolean + public void prefixNsBooleanTest() { + // TODO: test prefixNsBoolean } /** - * Test the property 'prefixNamespaceArray' + * Test the property 'prefixNsArray' */ @Test - public void prefixNamespaceArrayTest() { - // TODO: test prefixNamespaceArray + public void prefixNsArrayTest() { + // TODO: test prefixNsArray } /** - * Test the property 'prefixNamespaceWrappedArray' + * Test the property 'prefixNsWrappedArray' */ @Test - public void prefixNamespaceWrappedArrayTest() { - // TODO: test prefixNamespaceWrappedArray + public void prefixNsWrappedArrayTest() { + // TODO: test prefixNsWrappedArray } } diff --git a/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md index 059616ec6b..6b6f08a5d8 100644 --- a/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description > Client call123testSpecialTags(body) + To test special tags To test special tags and operation ID starting with number @@ -33,8 +34,9 @@ public class Example { AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.call123testSpecialTags(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/jersey2/docs/FakeApi.md b/samples/client/petstore/java/jersey2/docs/FakeApi.md index 1ce9c124e9..7d866f1743 100644 --- a/samples/client/petstore/java/jersey2/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2/docs/FakeApi.md @@ -25,6 +25,7 @@ Method | HTTP request | Description > createXmlItem(xmlItem) + creates an XmlItem this route creates an XmlItem @@ -46,8 +47,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body - try { + try { apiInstance.createXmlItem(xmlItem); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#createXmlItem"); System.err.println("Status code: " + e.getCode()); @@ -91,6 +94,7 @@ No authorization required + Test serialization of outer boolean types ### Example @@ -110,8 +114,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Boolean body = true; // Boolean | Input boolean as post body - try { + try { Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); @@ -156,6 +161,7 @@ No authorization required + Test serialization of object with outer number type ### Example @@ -175,8 +181,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body - try { + try { OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -221,6 +228,7 @@ No authorization required + Test serialization of outer number types ### Example @@ -240,8 +248,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body - try { + try { BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); @@ -286,6 +295,7 @@ No authorization required + Test serialization of outer string types ### Example @@ -305,8 +315,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String body = "body_example"; // String | Input string as post body - try { + try { String result = apiInstance.fakeOuterStringSerialize(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); @@ -351,7 +362,8 @@ No authorization required -For this test, the body for this request much reference a schema named `File`. + +For this test, the body for this request much reference a schema named `File`. ### Example @@ -370,8 +382,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | - try { + try { apiInstance.testBodyWithFileSchema(body); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -415,6 +429,7 @@ No authorization required + ### Example ```java @@ -433,8 +448,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | User body = new User(); // User | - try { + try { apiInstance.testBodyWithQueryParams(query, body); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -477,10 +494,11 @@ No authorization required > Client testClientModel(body) -To test \"client\" model To test \"client\" model +To test "client" model + ### Example ```java @@ -498,8 +516,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClientModel(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -542,10 +561,14 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + ### Example ```java @@ -582,8 +605,10 @@ public class Example { OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None - try { + try { apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEndpointParameters"); System.err.println("Status code: " + e.getCode()); @@ -639,6 +664,7 @@ null (empty response body) > testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) + To test enum parameters To test enum parameters @@ -667,8 +693,10 @@ public class Example { Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) List enumFormStringArray = "$"; // List | Form parameter enum test (string array) String enumFormString = "-efg"; // String | Form parameter enum test (string) - try { + try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -716,7 +744,8 @@ No authorization required ## testGroupParameters -> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) + +> testGroupParameters().requiredStringGroup(requiredStringGroup).requiredBooleanGroup(requiredBooleanGroup).requiredInt64Group(requiredInt64Group).stringGroup(stringGroup).booleanGroup(booleanGroup).int64Group(int64Group).execute(); Fake endpoint to test group parameters (optional) @@ -744,8 +773,16 @@ public class Example { Integer stringGroup = 56; // Integer | String in group parameters Boolean booleanGroup = true; // Boolean | Boolean in group parameters Long int64Group = 56L; // Long | Integer in group parameters - try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + try { + api.testGroupParameters() + .requiredStringGroup(requiredStringGroup) + .requiredBooleanGroup(requiredBooleanGroup) + .requiredInt64Group(requiredInt64Group) + .stringGroup(stringGroup) + .booleanGroup(booleanGroup) + .int64Group(int64Group) + .execute(); + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testGroupParameters"); System.err.println("Status code: " + e.getCode()); @@ -792,6 +829,7 @@ No authorization required > testInlineAdditionalProperties(param) + test inline additionalProperties ### Example @@ -811,8 +849,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Map param = new HashMap(); // Map | request body - try { + try { apiInstance.testInlineAdditionalProperties(param); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -854,6 +894,7 @@ No authorization required > testJsonFormData(param, param2) + test json serialization of form data ### Example @@ -874,8 +915,10 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String param = "param_example"; // String | field1 String param2 = "param2_example"; // String | field2 - try { + try { apiInstance.testJsonFormData(param, param2); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testJsonFormData"); System.err.println("Status code: " + e.getCode()); @@ -920,6 +963,7 @@ No authorization required + To test the collection format in query parameters ### Example @@ -943,8 +987,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | - try { + try { apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + + } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md index 14a74a37a4..1d683e302f 100644 --- a/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md @@ -12,6 +12,7 @@ Method | HTTP request | Description > Client testClassname(body) + To test class name in snake case To test class name in snake case @@ -40,8 +41,9 @@ public class Example { FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClassname(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); diff --git a/samples/client/petstore/java/jersey2/docs/PetApi.md b/samples/client/petstore/java/jersey2/docs/PetApi.md index 875a8e6783..00452d3fec 100644 --- a/samples/client/petstore/java/jersey2/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2/docs/PetApi.md @@ -20,6 +20,7 @@ Method | HTTP request | Description > addPet(body) + Add a new pet to the store ### Example @@ -44,8 +45,10 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.addPet(body); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -88,6 +91,7 @@ null (empty response body) > deletePet(petId, apiKey) + Deletes a pet ### Example @@ -113,8 +117,10 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | - try { + try { apiInstance.deletePet(petId, apiKey); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#deletePet"); System.err.println("Status code: " + e.getCode()); @@ -158,6 +164,7 @@ null (empty response body) > List<Pet> findPetsByStatus(status) + Finds Pets by status Multiple status values can be provided with comma separated strings @@ -184,8 +191,9 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List status = Arrays.asList("available"); // List | Status values that need to be considered for filter - try { + try { List result = apiInstance.findPetsByStatus(status); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByStatus"); @@ -229,6 +237,7 @@ Name | Type | Description | Notes > List<Pet> findPetsByTags(tags) + Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -255,8 +264,9 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List tags = Arrays.asList(); // List | Tags to filter by - try { + try { List result = apiInstance.findPetsByTags(tags); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByTags"); @@ -300,6 +310,7 @@ Name | Type | Description | Notes > Pet getPetById(petId) + Find pet by ID Returns a single pet @@ -328,8 +339,9 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | ID of pet to return - try { + try { Pet result = apiInstance.getPetById(petId); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#getPetById"); @@ -374,6 +386,7 @@ Name | Type | Description | Notes > updatePet(body) + Update an existing pet ### Example @@ -398,8 +411,10 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.updatePet(body); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -444,6 +459,7 @@ null (empty response body) > updatePetWithForm(petId, name, status) + Updates a pet in the store with form data ### Example @@ -470,8 +486,10 @@ public class Example { Long petId = 56L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | Updated name of the pet String status = "status_example"; // String | Updated status of the pet - try { + try { apiInstance.updatePetWithForm(petId, name, status); + + } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePetWithForm"); System.err.println("Status code: " + e.getCode()); @@ -515,6 +533,7 @@ null (empty response body) > ModelApiResponse uploadFile(petId, additionalMetadata, file) + uploads an image ### Example @@ -541,8 +560,9 @@ public class Example { Long petId = 56L; // Long | ID of pet to update String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server File file = new File("/path/to/file"); // File | file to upload - try { + try { ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFile"); @@ -587,6 +607,7 @@ Name | Type | Description | Notes > ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) + uploads an image (required) ### Example @@ -613,8 +634,9 @@ public class Example { Long petId = 56L; // Long | ID of pet to update File requiredFile = new File("/path/to/file"); // File | file to upload String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server - try { + try { ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); diff --git a/samples/client/petstore/java/jersey2/docs/StoreApi.md b/samples/client/petstore/java/jersey2/docs/StoreApi.md index 352399ea51..f3a9b2320c 100644 --- a/samples/client/petstore/java/jersey2/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2/docs/StoreApi.md @@ -15,9 +15,10 @@ Method | HTTP request | Description > deleteOrder(orderId) + Delete purchase order by ID -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors ### Example @@ -36,8 +37,10 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); String orderId = "orderId_example"; // String | ID of the order that needs to be deleted - try { + try { apiInstance.deleteOrder(orderId); + + } catch (ApiException e) { System.err.println("Exception when calling StoreApi#deleteOrder"); System.err.println("Status code: " + e.getCode()); @@ -80,6 +83,7 @@ No authorization required > Map<String, Integer> getInventory() + Returns pet inventories by status Returns a map of status codes to quantities @@ -107,8 +111,9 @@ public class Example { //api_key.setApiKeyPrefix("Token"); StoreApi apiInstance = new StoreApi(defaultClient); - try { + try { Map result = apiInstance.getInventory(); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getInventory"); @@ -148,9 +153,10 @@ This endpoint does not need any parameter. > Order getOrderById(orderId) + Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions ### Example @@ -169,8 +175,9 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Long orderId = 56L; // Long | ID of pet that needs to be fetched - try { + try { Order result = apiInstance.getOrderById(orderId); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getOrderById"); @@ -215,6 +222,7 @@ No authorization required > Order placeOrder(body) + Place an order for a pet ### Example @@ -234,8 +242,9 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Order body = new Order(); // Order | order placed for purchasing the pet - try { + try { Order result = apiInstance.placeOrder(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); diff --git a/samples/client/petstore/java/jersey2/docs/UserApi.md b/samples/client/petstore/java/jersey2/docs/UserApi.md index ca9f550c31..9bd97f6969 100644 --- a/samples/client/petstore/java/jersey2/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2/docs/UserApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description > createUser(body) + Create user This can only be done by the logged in user. @@ -40,8 +41,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); User body = new User(); // User | Created user object - try { + try { apiInstance.createUser(body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -83,6 +86,7 @@ No authorization required > createUsersWithArrayInput(body) + Creates list of users with given input array ### Example @@ -102,8 +106,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithArrayInput(body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -145,6 +151,7 @@ No authorization required > createUsersWithListInput(body) + Creates list of users with given input array ### Example @@ -164,8 +171,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithListInput(body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -207,6 +216,7 @@ No authorization required > deleteUser(username) + Delete user This can only be done by the logged in user. @@ -228,8 +238,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be deleted - try { + try { apiInstance.deleteUser(username); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#deleteUser"); System.err.println("Status code: " + e.getCode()); @@ -272,6 +284,7 @@ No authorization required > User getUserByName(username) + Get user by user name ### Example @@ -291,8 +304,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. - try { + try { User result = apiInstance.getUserByName(username); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#getUserByName"); @@ -337,6 +351,7 @@ No authorization required > String loginUser(username, password) + Logs user into the system ### Example @@ -357,8 +372,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The user name for login String password = "password_example"; // String | The password for login in clear text - try { + try { String result = apiInstance.loginUser(username, password); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#loginUser"); @@ -403,6 +419,7 @@ No authorization required > logoutUser() + Logs out current logged in user session ### Example @@ -421,8 +438,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - try { + try { apiInstance.logoutUser(); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#logoutUser"); System.err.println("Status code: " + e.getCode()); @@ -461,6 +480,7 @@ No authorization required > updateUser(username, body) + Updated user This can only be done by the logged in user. @@ -483,8 +503,10 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted User body = new User(); // User | Updated user object - try { + try { apiInstance.updateUser(username, body); + + } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 9d0776bb22..351b318290 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -34,7 +34,6 @@ public class AnotherFakeApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * To test special tags * To test special tags and operation ID starting with number @@ -43,13 +42,13 @@ public class AnotherFakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Client call123testSpecialTags(Client body) throws ApiException { return call123testSpecialTagsWithHttpInfo(body).getData(); - } + } /** * To test special tags @@ -59,8 +58,8 @@ public class AnotherFakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { @@ -98,5 +97,5 @@ public class AnotherFakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java index 28099fcab8..fc2bb8b436 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -42,7 +42,6 @@ public class FakeApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * creates an XmlItem * this route creates an XmlItem @@ -50,12 +49,11 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public void createXmlItem(XmlItem xmlItem) throws ApiException { - createXmlItemWithHttpInfo(xmlItem); } @@ -67,8 +65,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { @@ -104,7 +102,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -115,13 +113,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            */ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { return fakeOuterBooleanSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -131,8 +129,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            Status Code Description Response Headers
                                                            200 Output boolean -
                                                            */ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { @@ -165,7 +163,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * Test serialization of object with outer number type @@ -174,13 +172,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            */ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { return fakeOuterCompositeSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -190,8 +188,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            Status Code Description Response Headers
                                                            200 Output composite -
                                                            */ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { @@ -224,7 +222,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * Test serialization of outer number types @@ -233,13 +231,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            */ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { return fakeOuterNumberSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -249,8 +247,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            Status Code Description Response Headers
                                                            200 Output number -
                                                            */ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { @@ -283,7 +281,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * Test serialization of outer string types @@ -292,13 +290,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            */ public String fakeOuterStringSerialize(String body) throws ApiException { return fakeOuterStringSerializeWithHttpInfo(body).getData(); - } + } /** * @@ -308,8 +306,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            Status Code Description Response Headers
                                                            200 Output string -
                                                            */ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { @@ -342,7 +340,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * * For this test, the body for this request much reference a schema named `File`. @@ -350,12 +348,11 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { - testBodyWithFileSchemaWithHttpInfo(body); } @@ -367,8 +364,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { @@ -404,7 +401,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -415,12 +412,11 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public void testBodyWithQueryParams(String query, User body) throws ApiException { - testBodyWithQueryParamsWithHttpInfo(query, body); } @@ -433,8 +429,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { @@ -476,7 +472,7 @@ public class FakeApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -487,13 +483,13 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Client testClientModel(Client body) throws ApiException { return testClientModelWithHttpInfo(body).getData(); - } + } /** * To test \"client\" model @@ -503,8 +499,8 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { @@ -542,7 +538,7 @@ public class FakeApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -563,13 +559,12 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { - testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); } @@ -594,9 +589,9 @@ public class FakeApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { @@ -675,7 +670,7 @@ if (paramCallback != null) String[] localVarAuthNames = new String[] { "http_basic_test" }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -692,13 +687,12 @@ if (paramCallback != null) * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            */ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -717,9 +711,9 @@ if (paramCallback != null) * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid request -
                                                            404 Not found -
                                                            */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { @@ -762,48 +756,11 @@ if (enumFormString != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } - /** - * Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - * @throws ApiException if fails to make API call - * @http.response.details - - - -
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            - */ - public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { - testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - - /** - * Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - - - -
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            - */ - public ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { +private ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'requiredStringGroup' is set @@ -854,9 +811,133 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } + + public class APItestGroupParametersRequest { + private Integer requiredStringGroup; + private Boolean requiredBooleanGroup; + private Long requiredInt64Group; + private Integer stringGroup; + private Boolean booleanGroup; + private Long int64Group; + + private APItestGroupParametersRequest() { + } + + + /** + * Set requiredStringGroup + * @param requiredStringGroup Required String in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredStringGroup(Integer requiredStringGroup) { + this.requiredStringGroup = requiredStringGroup; + return this; + } + + + /** + * Set requiredBooleanGroup + * @param requiredBooleanGroup Required Boolean in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredBooleanGroup(Boolean requiredBooleanGroup) { + this.requiredBooleanGroup = requiredBooleanGroup; + return this; + } + + + /** + * Set requiredInt64Group + * @param requiredInt64Group Required Integer in group parameters (required) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest requiredInt64Group(Long requiredInt64Group) { + this.requiredInt64Group = requiredInt64Group; + return this; + } + + + /** + * Set stringGroup + * @param stringGroup String in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest stringGroup(Integer stringGroup) { + this.stringGroup = stringGroup; + return this; + } + + + /** + * Set booleanGroup + * @param booleanGroup Boolean in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest booleanGroup(Boolean booleanGroup) { + this.booleanGroup = booleanGroup; + return this; + } + + + /** + * Set int64Group + * @param int64Group Integer in group parameters (optional) + * @return APItestGroupParametersRequest + */ + public APItestGroupParametersRequest int64Group(Long int64Group) { + this.int64Group = int64Group; + return this; + } + + + /** + * Execute testGroupParameters request + + * @throws ApiException if fails to make API call + * @http.response.details + + + +
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            + + */ + + public void execute() throws ApiException { + this.executeWithHttpInfo().getData(); + } + + /** + * Execute testGroupParameters request with HTTP info returned + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + + + +
                                                            Status Code Description Response Headers
                                                            400 Someting wrong -
                                                            + + */ + + public ApiResponse executeWithHttpInfo() throws ApiException { + return testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + } + } + + /** + * Fake endpoint to test group parameters (optional) + * Fake endpoint to test group parameters (optional) + * @return testGroupParametersRequest + * @throws ApiException if fails to make API call + + + */ + + public APItestGroupParametersRequest testGroupParameters() throws ApiException { + return new APItestGroupParametersRequest(); + } /** * test inline additionalProperties * @@ -864,12 +945,11 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public void testInlineAdditionalProperties(Map param) throws ApiException { - testInlineAdditionalPropertiesWithHttpInfo(param); } @@ -881,8 +961,8 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { @@ -918,7 +998,7 @@ if (booleanGroup != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -929,12 +1009,11 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public void testJsonFormData(String param, String param2) throws ApiException { - testJsonFormDataWithHttpInfo(param, param2); } @@ -947,8 +1026,8 @@ if (booleanGroup != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { @@ -993,7 +1072,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -1007,12 +1086,11 @@ if (param2 != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws ApiException { - testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); } @@ -1028,8 +1106,8 @@ if (param2 != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            Status Code Description Response Headers
                                                            200 Success -
                                                            */ public ApiResponse testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws ApiException { @@ -1090,7 +1168,7 @@ if (param2 != null) String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index e4f033f2a1..b683fb3d19 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -34,7 +34,6 @@ public class FakeClassnameTags123Api { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * To test class name in snake case * To test class name in snake case @@ -43,13 +42,13 @@ public class FakeClassnameTags123Api { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Client testClassname(Client body) throws ApiException { return testClassnameWithHttpInfo(body).getData(); - } + } /** * To test class name in snake case @@ -59,8 +58,8 @@ public class FakeClassnameTags123Api { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { @@ -98,5 +97,5 @@ public class FakeClassnameTags123Api { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java index 11467f78a1..3a6881beec 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java @@ -36,7 +36,6 @@ public class PetApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * Add a new pet to the store * @@ -44,13 +43,12 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            */ public void addPet(Pet body) throws ApiException { - addPetWithHttpInfo(body); } @@ -62,9 +60,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            405 Invalid input -
                                                            */ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { @@ -100,7 +98,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -111,13 +109,12 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            */ public void deletePet(Long petId, String apiKey) throws ApiException { - deletePetWithHttpInfo(petId, apiKey); } @@ -130,9 +127,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid pet value -
                                                            */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { @@ -171,7 +168,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -182,14 +179,14 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            */ public List findPetsByStatus(List status) throws ApiException { return findPetsByStatusWithHttpInfo(status).getData(); - } + } /** * Finds Pets by status @@ -199,9 +196,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid status value -
                                                            */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { @@ -240,7 +237,7 @@ public class PetApi { GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -249,16 +246,16 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            * @deprecated */ @Deprecated public List findPetsByTags(List tags) throws ApiException { return findPetsByTagsWithHttpInfo(tags).getData(); - } + } /** * Finds Pets by tags @@ -268,9 +265,9 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid tag value -
                                                            * @deprecated */ @@ -311,7 +308,7 @@ public class PetApi { GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Find pet by ID * Returns a single pet @@ -320,15 +317,15 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            */ public Pet getPetById(Long petId) throws ApiException { return getPetByIdWithHttpInfo(petId).getData(); - } + } /** * Find pet by ID @@ -338,10 +335,10 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { @@ -380,7 +377,7 @@ public class PetApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Update an existing pet * @@ -388,15 +385,14 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - - + + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            */ public void updatePet(Pet body) throws ApiException { - updatePetWithHttpInfo(body); } @@ -408,11 +404,11 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - - - - + + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Pet not found -
                                                            405 Validation exception -
                                                            */ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { @@ -448,7 +444,7 @@ public class PetApi { String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -460,12 +456,11 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            */ public void updatePetWithForm(Long petId, String name, String status) throws ApiException { - updatePetWithFormWithHttpInfo(petId, name, status); } @@ -479,8 +474,8 @@ public class PetApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            Status Code Description Response Headers
                                                            405 Invalid input -
                                                            */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { @@ -521,7 +516,7 @@ if (status != null) String[] localVarAuthNames = new String[] { "petstore_auth" }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -534,13 +529,13 @@ if (status != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { return uploadFileWithHttpInfo(petId, additionalMetadata, file).getData(); - } + } /** * uploads an image @@ -552,8 +547,8 @@ if (status != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { @@ -596,7 +591,7 @@ if (file != null) GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * uploads an image (required) * @@ -607,13 +602,13 @@ if (file != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData(); - } + } /** * uploads an image (required) @@ -625,8 +620,8 @@ if (file != null) * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { @@ -674,5 +669,5 @@ if (requiredFile != null) GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java index 42734da7a6..1d91724c7e 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java @@ -34,7 +34,6 @@ public class StoreApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * Delete purchase order by ID * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -42,13 +41,12 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public void deleteOrder(String orderId) throws ApiException { - deleteOrderWithHttpInfo(orderId); } @@ -60,9 +58,9 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { @@ -99,7 +97,7 @@ public class StoreApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -109,13 +107,13 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public Map getInventory() throws ApiException { return getInventoryWithHttpInfo().getData(); - } + } /** * Returns pet inventories by status @@ -124,8 +122,8 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { @@ -158,7 +156,7 @@ public class StoreApi { GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Find purchase order by ID * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -167,15 +165,15 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public Order getOrderById(Long orderId) throws ApiException { return getOrderByIdWithHttpInfo(orderId).getData(); - } + } /** * Find purchase order by ID @@ -185,10 +183,10 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid ID supplied -
                                                            404 Order not found -
                                                            */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { @@ -227,7 +225,7 @@ public class StoreApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Place an order for a pet * @@ -236,14 +234,14 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            */ public Order placeOrder(Order body) throws ApiException { return placeOrderWithHttpInfo(body).getData(); - } + } /** * Place an order for a pet @@ -253,9 +251,9 @@ public class StoreApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid Order -
                                                            */ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { @@ -293,5 +291,5 @@ public class StoreApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java index ab4ae8c089..4bd9e6801a 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java @@ -34,7 +34,6 @@ public class UserApi { public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** * Create user * This can only be done by the logged in user. @@ -42,12 +41,11 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void createUser(User body) throws ApiException { - createUserWithHttpInfo(body); } @@ -59,8 +57,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { @@ -96,7 +94,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -106,12 +104,11 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void createUsersWithArrayInput(List body) throws ApiException { - createUsersWithArrayInputWithHttpInfo(body); } @@ -123,8 +120,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { @@ -160,7 +157,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -170,12 +167,11 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void createUsersWithListInput(List body) throws ApiException { - createUsersWithListInputWithHttpInfo(body); } @@ -187,8 +183,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { @@ -224,7 +220,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -234,13 +230,12 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public void deleteUser(String username) throws ApiException { - deleteUserWithHttpInfo(username); } @@ -252,9 +247,9 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { @@ -291,7 +286,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -302,15 +297,15 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public User getUserByName(String username) throws ApiException { return getUserByNameWithHttpInfo(username).getData(); - } + } /** * Get user by user name @@ -320,10 +315,10 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - - + + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            200 successful operation -
                                                            400 Invalid username supplied -
                                                            404 User not found -
                                                            */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { @@ -362,7 +357,7 @@ public class UserApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Logs user into the system * @@ -372,14 +367,14 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            */ public String loginUser(String username, String password) throws ApiException { return loginUserWithHttpInfo(username, password).getData(); - } + } /** * Logs user into the system @@ -390,9 +385,9 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            Status Code Description Response Headers
                                                            200 successful operation * X-Rate-Limit - calls per hour allowed by the user
                                                            * X-Expires-After - date in UTC when token expires
                                                            400 Invalid username/password supplied -
                                                            */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { @@ -437,19 +432,18 @@ public class UserApi { GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } + } /** * Logs out current logged in user session * * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public void logoutUser() throws ApiException { - logoutUserWithHttpInfo(); } @@ -460,8 +454,8 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - + +
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            Status Code Description Response Headers
                                                            0 successful operation -
                                                            */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { @@ -492,7 +486,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } /** @@ -503,13 +497,12 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            */ public void updateUser(String username, User body) throws ApiException { - updateUserWithHttpInfo(username, body); } @@ -522,9 +515,9 @@ public class UserApi { * @throws ApiException if fails to make API call * @http.response.details - - - + + +
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            Status Code Description Response Headers
                                                            400 Invalid user supplied -
                                                            404 User not found -
                                                            */ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { @@ -566,7 +559,7 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); } } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index b6db8d2a2c..837b5ea024 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,9 +42,8 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() throws ApiException { - Client client = null; - Client response = api.call123testSpecialTags(client); - + Client body = null; + Client response = api.call123testSpecialTags(body); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeApiTest.java index 07f4a80a5b..5f2fd58220 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -22,6 +22,7 @@ import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.openapitools.client.model.OuterComposite; import org.openapitools.client.model.User; +import org.openapitools.client.model.XmlItem; import org.junit.Test; import org.junit.Ignore; @@ -39,6 +40,21 @@ public class FakeApiTest { private final FakeApi api = new FakeApi(); + /** + * creates an XmlItem + * + * this route creates an XmlItem + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createXmlItemTest() throws ApiException { + XmlItem xmlItem = null; + api.createXmlItem(xmlItem); + // TODO: test validations + } + /** * * @@ -51,7 +67,6 @@ public class FakeApiTest { public void fakeOuterBooleanSerializeTest() throws ApiException { Boolean body = null; Boolean response = api.fakeOuterBooleanSerialize(body); - // TODO: test validations } @@ -65,9 +80,8 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { - OuterComposite outerComposite = null; - OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); - + OuterComposite body = null; + OuterComposite response = api.fakeOuterCompositeSerialize(body); // TODO: test validations } @@ -83,7 +97,6 @@ public class FakeApiTest { public void fakeOuterNumberSerializeTest() throws ApiException { BigDecimal body = null; BigDecimal response = api.fakeOuterNumberSerialize(body); - // TODO: test validations } @@ -99,7 +112,6 @@ public class FakeApiTest { public void fakeOuterStringSerializeTest() throws ApiException { String body = null; String response = api.fakeOuterStringSerialize(body); - // TODO: test validations } @@ -113,9 +125,8 @@ public class FakeApiTest { */ @Test public void testBodyWithFileSchemaTest() throws ApiException { - FileSchemaTestClass fileSchemaTestClass = null; - api.testBodyWithFileSchema(fileSchemaTestClass); - + FileSchemaTestClass body = null; + api.testBodyWithFileSchema(body); // TODO: test validations } @@ -130,9 +141,8 @@ public class FakeApiTest { @Test public void testBodyWithQueryParamsTest() throws ApiException { String query = null; - User user = null; - api.testBodyWithQueryParams(query, user); - + User body = null; + api.testBodyWithQueryParams(query, body); // TODO: test validations } @@ -146,9 +156,8 @@ public class FakeApiTest { */ @Test public void testClientModelTest() throws ApiException { - Client client = null; - Client response = api.testClientModel(client); - + Client body = null; + Client response = api.testClientModel(body); // TODO: test validations } @@ -177,7 +186,6 @@ public class FakeApiTest { String password = null; String paramCallback = null; api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - // TODO: test validations } @@ -200,7 +208,6 @@ public class FakeApiTest { List enumFormStringArray = null; String enumFormString = null; api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - // TODO: test validations } @@ -220,8 +227,14 @@ public class FakeApiTest { Integer stringGroup = null; Boolean booleanGroup = null; Long int64Group = null; - api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - + api.testGroupParameters() + .requiredStringGroup(requiredStringGroup) + .requiredBooleanGroup(requiredBooleanGroup) + .requiredInt64Group(requiredInt64Group) + .stringGroup(stringGroup) + .booleanGroup(booleanGroup) + .int64Group(int64Group) + .execute(); // TODO: test validations } @@ -235,9 +248,8 @@ public class FakeApiTest { */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { - Map requestBody = null; - api.testInlineAdditionalProperties(requestBody); - + Map param = null; + api.testInlineAdditionalProperties(param); // TODO: test validations } @@ -254,7 +266,25 @@ public class FakeApiTest { String param = null; String param2 = null; api.testJsonFormData(param, param2); - + // TODO: test validations + } + + /** + * + * + * To test the collection format in query parameters + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryParameterCollectionFormatTest() throws ApiException { + List pipe = null; + List ioutil = null; + List http = null; + List url = null; + List context = null; + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index e2ac28cb12..7199931679 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,9 +42,8 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() throws ApiException { - Client client = null; - Client response = api.testClassname(client); - + Client body = null; + Client response = api.testClassname(body); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/PetApiTest.java index d3fbe90a5a..fd382967f1 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -44,9 +44,8 @@ public class PetApiTest { */ @Test public void addPetTest() throws ApiException { - Pet pet = null; - api.addPet(pet); - + Pet body = null; + api.addPet(body); // TODO: test validations } @@ -63,7 +62,6 @@ public class PetApiTest { Long petId = null; String apiKey = null; api.deletePet(petId, apiKey); - // TODO: test validations } @@ -79,7 +77,6 @@ public class PetApiTest { public void findPetsByStatusTest() throws ApiException { List status = null; List response = api.findPetsByStatus(status); - // TODO: test validations } @@ -95,7 +92,6 @@ public class PetApiTest { public void findPetsByTagsTest() throws ApiException { List tags = null; List response = api.findPetsByTags(tags); - // TODO: test validations } @@ -111,7 +107,6 @@ public class PetApiTest { public void getPetByIdTest() throws ApiException { Long petId = null; Pet response = api.getPetById(petId); - // TODO: test validations } @@ -125,9 +120,8 @@ public class PetApiTest { */ @Test public void updatePetTest() throws ApiException { - Pet pet = null; - api.updatePet(pet); - + Pet body = null; + api.updatePet(body); // TODO: test validations } @@ -145,7 +139,6 @@ public class PetApiTest { String name = null; String status = null; api.updatePetWithForm(petId, name, status); - // TODO: test validations } @@ -163,7 +156,23 @@ public class PetApiTest { String additionalMetadata = null; File file = null; ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - + // TODO: test validations + } + + /** + * uploads an image (required) + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileWithRequiredFileTest() throws ApiException { + Long petId = null; + File requiredFile = null; + String additionalMetadata = null; + ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/StoreApiTest.java index f83e6c3897..cd36a70fec 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -44,7 +44,6 @@ public class StoreApiTest { public void deleteOrderTest() throws ApiException { String orderId = null; api.deleteOrder(orderId); - // TODO: test validations } @@ -59,7 +58,6 @@ public class StoreApiTest { @Test public void getInventoryTest() throws ApiException { Map response = api.getInventory(); - // TODO: test validations } @@ -75,7 +73,6 @@ public class StoreApiTest { public void getOrderByIdTest() throws ApiException { Long orderId = null; Order response = api.getOrderById(orderId); - // TODO: test validations } @@ -89,9 +86,8 @@ public class StoreApiTest { */ @Test public void placeOrderTest() throws ApiException { - Order order = null; - Order response = api.placeOrder(order); - + Order body = null; + Order response = api.placeOrder(body); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/UserApiTest.java index 79e0b6b2bb..f7ef9050c9 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,9 +42,8 @@ public class UserApiTest { */ @Test public void createUserTest() throws ApiException { - User user = null; - api.createUser(user); - + User body = null; + api.createUser(body); // TODO: test validations } @@ -58,9 +57,8 @@ public class UserApiTest { */ @Test public void createUsersWithArrayInputTest() throws ApiException { - List user = null; - api.createUsersWithArrayInput(user); - + List body = null; + api.createUsersWithArrayInput(body); // TODO: test validations } @@ -74,9 +72,8 @@ public class UserApiTest { */ @Test public void createUsersWithListInputTest() throws ApiException { - List user = null; - api.createUsersWithListInput(user); - + List body = null; + api.createUsersWithListInput(body); // TODO: test validations } @@ -92,7 +89,6 @@ public class UserApiTest { public void deleteUserTest() throws ApiException { String username = null; api.deleteUser(username); - // TODO: test validations } @@ -108,7 +104,6 @@ public class UserApiTest { public void getUserByNameTest() throws ApiException { String username = null; User response = api.getUserByName(username); - // TODO: test validations } @@ -125,7 +120,6 @@ public class UserApiTest { String username = null; String password = null; String response = api.loginUser(username, password); - // TODO: test validations } @@ -140,7 +134,6 @@ public class UserApiTest { @Test public void logoutUserTest() throws ApiException { api.logoutUser(); - // TODO: test validations } @@ -155,9 +148,8 @@ public class UserApiTest { @Test public void updateUserTest() throws ApiException { String username = null; - User user = null; - api.updateUser(username, user); - + User body = null; + api.updateUser(username, body); // TODO: test validations } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java index 2b0bd0bbae..ec44af7838 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java index c6dd88eea8..ceb024c562 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java index 9d474c0dd8..517e5a10ae 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index c6bcc988bf..2e3844ba97 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,11 +13,13 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -41,19 +43,91 @@ public class AdditionalPropertiesClassTest { } /** - * Test the property 'mapProperty' + * Test the property 'mapString' */ @Test - public void mapPropertyTest() { - // TODO: test mapProperty + public void mapStringTest() { + // TODO: test mapString } /** - * Test the property 'mapOfMapProperty' + * Test the property 'mapNumber' */ @Test - public void mapOfMapPropertyTest() { - // TODO: test mapOfMapProperty + public void mapNumberTest() { + // TODO: test mapNumber + } + + /** + * Test the property 'mapInteger' + */ + @Test + public void mapIntegerTest() { + // TODO: test mapInteger + } + + /** + * Test the property 'mapBoolean' + */ + @Test + public void mapBooleanTest() { + // TODO: test mapBoolean + } + + /** + * Test the property 'mapArrayInteger' + */ + @Test + public void mapArrayIntegerTest() { + // TODO: test mapArrayInteger + } + + /** + * Test the property 'mapArrayAnytype' + */ + @Test + public void mapArrayAnytypeTest() { + // TODO: test mapArrayAnytype + } + + /** + * Test the property 'mapMapString' + */ + @Test + public void mapMapStringTest() { + // TODO: test mapMapString + } + + /** + * Test the property 'mapMapAnytype' + */ + @Test + public void mapMapAnytypeTest() { + // TODO: test mapMapAnytype + } + + /** + * Test the property 'anytype1' + */ + @Test + public void anytype1Test() { + // TODO: test anytype1 + } + + /** + * Test the property 'anytype2' + */ + @Test + public void anytype2Test() { + // TODO: test anytype2 + } + + /** + * Test the property 'anytype3' + */ + @Test + public void anytype3Test() { + // TODO: test anytype3 } } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java index bf1b1c427b..66a7b85623 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java index b9cb6470e3..4e03485a44 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java index 3cbcb8ec3b..e0c72c5863 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java index 1d3c05075e..c84d987e76 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AnimalTest.java index beb02882b3..c0d10ec5a3 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonSubTypes; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java index ae7970522b..e25187a3b6 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java index 6151b7068b..ae10618239 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayTestTest.java index 4bb62b6569..36bd9951cf 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ArrayTestTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CapitalizationTest.java index eae9be7938..a701b341fc 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CapitalizationTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CatAllOfTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CatAllOfTest.java index 69b226745d..1d85a04472 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CatAllOfTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CatAllOfTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CatTest.java index dcb9f2d4ca..dbf40678a2 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CatTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,14 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; +import org.openapitools.client.model.CatAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CategoryTest.java index 1df27cf032..6027994a2a 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ClassModelTest.java index 04eb02f835..8914c9cad4 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ClassModelTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ClientTest.java index 03b6bb41a5..c21b346272 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ClientTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ClientTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/DogAllOfTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/DogAllOfTest.java index 1b83dcefc4..6e4b491080 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/DogAllOfTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/DogAllOfTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/DogTest.java index 06ac28f804..a46bc508d4 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/DogTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/DogTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,12 +13,14 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.client.model.Animal; +import org.openapitools.client.model.DogAllOf; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumArraysTest.java index 11b5f01985..45b8fbbd82 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumArraysTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumClassTest.java index cb51ca50c9..9e45543fac 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumClassTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumTestTest.java index 13122a0cb9..04e7afb197 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java index a6b0d8ff7b..ef37e666be 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/FormatTestTest.java index 6081209ef1..710501b51b 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -146,4 +147,12 @@ public class FormatTestTest { // TODO: test password } + /** + * Test the property 'bigDecimal' + */ + @Test + public void bigDecimalTest() { + // TODO: test bigDecimal + } + } diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java index 2c4b2470b9..e902c10038 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/MapTestTest.java index 0f08d8c88f..a0c991bb75 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/MapTestTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/MapTestTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java index c308aec0a9..f8a8c734ba 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/Model200ResponseTest.java index 1ad55ca32e..82c7208079 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/Model200ResponseTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java index 73d28676ae..97a1287aa4 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ModelReturnTest.java index b073fda001..f884519ebc 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ModelReturnTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/NameTest.java index e81ebc38e6..cb3a94cf74 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/NameTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/NameTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/NumberOnlyTest.java index 565c8bd062..f4fbd5ee8b 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/NumberOnlyTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OrderTest.java index c2d3025a26..d24c8479f5 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OrderTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OrderTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OuterCompositeTest.java index 49b656a93f..ebea3ca304 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OuterCompositeTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OuterEnumTest.java index 61154c6d88..cf0ebae0fa 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/OuterEnumTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/PetTest.java index bf6908e4a4..c3c0d4cc35 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/PetTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java index e48b31a39f..b82a7d0ef5 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java index 1696eee82d..d5a19c371e 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TagTest.java index b37aca5fdf..5c2cc6f49e 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TagTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java index 409076e80a..e96ac74443 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java index ffd8f3ddc3..56641d163a 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -56,6 +57,14 @@ public class TypeHolderExampleTest { // TODO: test numberItem } + /** + * Test the property 'floatItem' + */ + @Test + public void floatItemTest() { + // TODO: test floatItem + } + /** * Test the property 'integerItem' */ diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/UserTest.java index 76733c9e72..ce40d3a2a6 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/UserTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/UserTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/XmlItemTest.java index 55e75391e0..501c414555 100644 --- a/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ b/samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/model/XmlItemTest.java @@ -2,7 +2,7 @@ * OpenAPI Petstore * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * - * OpenAPI spec version: 1.0.0 + * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,6 +13,7 @@ package org.openapitools.client.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; @@ -225,51 +226,51 @@ public class XmlItemTest { } /** - * Test the property 'prefixNamespaceString' + * Test the property 'prefixNsString' */ @Test - public void prefixNamespaceStringTest() { - // TODO: test prefixNamespaceString + public void prefixNsStringTest() { + // TODO: test prefixNsString } /** - * Test the property 'prefixNamespaceNumber' + * Test the property 'prefixNsNumber' */ @Test - public void prefixNamespaceNumberTest() { - // TODO: test prefixNamespaceNumber + public void prefixNsNumberTest() { + // TODO: test prefixNsNumber } /** - * Test the property 'prefixNamespaceInteger' + * Test the property 'prefixNsInteger' */ @Test - public void prefixNamespaceIntegerTest() { - // TODO: test prefixNamespaceInteger + public void prefixNsIntegerTest() { + // TODO: test prefixNsInteger } /** - * Test the property 'prefixNamespaceBoolean' + * Test the property 'prefixNsBoolean' */ @Test - public void prefixNamespaceBooleanTest() { - // TODO: test prefixNamespaceBoolean + public void prefixNsBooleanTest() { + // TODO: test prefixNsBoolean } /** - * Test the property 'prefixNamespaceArray' + * Test the property 'prefixNsArray' */ @Test - public void prefixNamespaceArrayTest() { - // TODO: test prefixNamespaceArray + public void prefixNsArrayTest() { + // TODO: test prefixNsArray } /** - * Test the property 'prefixNamespaceWrappedArray' + * Test the property 'prefixNsWrappedArray' */ @Test - public void prefixNamespaceWrappedArrayTest() { - // TODO: test prefixNamespaceWrappedArray + public void prefixNsWrappedArrayTest() { + // TODO: test prefixNsWrappedArray } } From 2722c602acf7ac92b7a1a45f2098068846774147 Mon Sep 17 00:00:00 2001 From: Nicholas Muesch Date: Sat, 18 Jan 2020 04:25:18 -0500 Subject: [PATCH 70/82] Escape query params before invoking api (#5023) * Escape query params before invoking api * Update petstore file * Update remaining petstore examples --- .../main/resources/Java/libraries/jersey2/ApiClient.mustache | 2 +- .../src/main/java/org/openapitools/client/ApiClient.java | 2 +- .../src/main/java/org/openapitools/client/ApiClient.java | 2 +- .../src/main/java/org/openapitools/client/ApiClient.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache index b12740b0f6..0f83a20450 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/ApiClient.mustache @@ -694,7 +694,7 @@ public class ApiClient { if (queryParams != null) { for (Pair queryParam : queryParams) { if (queryParam.getValue() != null) { - target = target.queryParam(queryParam.getName(), queryParam.getValue()); + target = target.queryParam(queryParam.getName(), escapeString(queryParam.getValue())); } } } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java index c92e4584cb..7776f178e8 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/ApiClient.java @@ -678,7 +678,7 @@ public class ApiClient { if (queryParams != null) { for (Pair queryParam : queryParams) { if (queryParam.getValue() != null) { - target = target.queryParam(queryParam.getName(), queryParam.getValue()); + target = target.queryParam(queryParam.getName(), escapeString(queryParam.getValue())); } } } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java index bd0facace1..a0aff55642 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java @@ -678,7 +678,7 @@ public class ApiClient { if (queryParams != null) { for (Pair queryParam : queryParams) { if (queryParam.getValue() != null) { - target = target.queryParam(queryParam.getName(), queryParam.getValue()); + target = target.queryParam(queryParam.getName(), escapeString(queryParam.getValue())); } } } diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java index bd0facace1..a0aff55642 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/ApiClient.java @@ -678,7 +678,7 @@ public class ApiClient { if (queryParams != null) { for (Pair queryParam : queryParams) { if (queryParam.getValue() != null) { - target = target.queryParam(queryParam.getName(), queryParam.getValue()); + target = target.queryParam(queryParam.getName(), escapeString(queryParam.getValue())); } } } From d1948c4b411dd8aa709cf32170a56a26d8a2c9e6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 18 Jan 2020 19:11:51 +0800 Subject: [PATCH 71/82] better code format in java jersey doc (#5031) --- .../Java/libraries/jersey2/api_doc.mustache | 24 +++++-- .../java/jersey2-java6/docs/AnotherFakeApi.md | 4 +- .../java/jersey2-java6/docs/FakeApi.md | 64 ++++--------------- .../docs/FakeClassnameTags123Api.md | 4 +- .../java/jersey2-java6/docs/PetApi.md | 40 +++--------- .../java/jersey2-java6/docs/StoreApi.md | 17 ++--- .../java/jersey2-java6/docs/UserApi.md | 38 +++-------- .../java/jersey2-java8/docs/AnotherFakeApi.md | 4 +- .../java/jersey2-java8/docs/FakeApi.md | 64 ++++--------------- .../docs/FakeClassnameTags123Api.md | 4 +- .../java/jersey2-java8/docs/PetApi.md | 40 +++--------- .../java/jersey2-java8/docs/StoreApi.md | 17 ++--- .../java/jersey2-java8/docs/UserApi.md | 38 +++-------- .../java/jersey2/docs/AnotherFakeApi.md | 4 +- .../petstore/java/jersey2/docs/FakeApi.md | 64 ++++--------------- .../jersey2/docs/FakeClassnameTags123Api.md | 4 +- .../petstore/java/jersey2/docs/PetApi.md | 40 +++--------- .../petstore/java/jersey2/docs/StoreApi.md | 17 ++--- .../petstore/java/jersey2/docs/UserApi.md | 38 +++-------- 19 files changed, 128 insertions(+), 397 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache index 7e62976258..f162d1cc97 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api_doc.mustache @@ -14,8 +14,12 @@ Method | HTTP request | Description ## {{operationId}} -{{^vendorExtensions.x-group-parameters}}> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{/vendorExtensions.x-group-parameters}} -{{#vendorExtensions.x-group-parameters}}> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute();{{/vendorExtensions.x-group-parameters}} +{{^vendorExtensions.x-group-parameters}} +> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) +{{/vendorExtensions.x-group-parameters}} +{{#vendorExtensions.x-group-parameters}} +> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}}.execute(); +{{/vendorExtensions.x-group-parameters}} {{summary}}{{#notes}} @@ -60,12 +64,18 @@ public class Example { {{#allParams}} {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} {{/allParams}} - try { {{^vendorExtensions.x-group-parameters}} - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/vendorExtensions.x-group-parameters}} - {{#vendorExtensions.x-group-parameters}}{{#returnType}}{{{returnType}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}} + try { + {{^vendorExtensions.x-group-parameters}} + {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + {{/vendorExtensions.x-group-parameters}} + {{#vendorExtensions.x-group-parameters}} + {{#returnType}}{{{returnType}}} result = {{/returnType}}api.{{operationId}}({{#pathParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/pathParams}}){{#allParams}}{{^isPathParam}} .{{paramName}}({{paramName}}){{/isPathParam}}{{/allParams}} - .execute();{{/vendorExtensions.x-group-parameters}} - {{#returnType}}System.out.println(result);{{/returnType}} + .execute(); + {{/vendorExtensions.x-group-parameters}} + {{#returnType}} + System.out.println(result); + {{/returnType}} } catch (ApiException e) { System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md index 6b6f08a5d8..059616ec6b 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description > Client call123testSpecialTags(body) - To test special tags To test special tags and operation ID starting with number @@ -34,9 +33,8 @@ public class Example { AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md index 7d866f1743..543c51f066 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/FakeApi.md @@ -25,7 +25,6 @@ Method | HTTP request | Description > createXmlItem(xmlItem) - creates an XmlItem this route creates an XmlItem @@ -47,10 +46,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body - try { + try { apiInstance.createXmlItem(xmlItem); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#createXmlItem"); System.err.println("Status code: " + e.getCode()); @@ -94,7 +91,6 @@ No authorization required - Test serialization of outer boolean types ### Example @@ -114,9 +110,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Boolean body = true; // Boolean | Input boolean as post body - try { + try { Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); @@ -161,7 +156,6 @@ No authorization required - Test serialization of object with outer number type ### Example @@ -181,9 +175,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body - try { + try { OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -228,7 +221,6 @@ No authorization required - Test serialization of outer number types ### Example @@ -248,9 +240,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body - try { + try { BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); @@ -295,7 +286,6 @@ No authorization required - Test serialization of outer string types ### Example @@ -315,9 +305,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String body = "body_example"; // String | Input string as post body - try { + try { String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); @@ -362,7 +351,6 @@ No authorization required - For this test, the body for this request much reference a schema named `File`. ### Example @@ -382,10 +370,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | - try { + try { apiInstance.testBodyWithFileSchema(body); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -429,7 +415,6 @@ No authorization required - ### Example ```java @@ -448,10 +433,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | User body = new User(); // User | - try { + try { apiInstance.testBodyWithQueryParams(query, body); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -494,7 +477,6 @@ No authorization required > Client testClientModel(body) - To test \"client\" model To test "client" model @@ -516,9 +498,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClientModel(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -561,7 +542,6 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters @@ -605,10 +585,8 @@ public class Example { OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None - try { + try { apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEndpointParameters"); System.err.println("Status code: " + e.getCode()); @@ -664,7 +642,6 @@ null (empty response body) > testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) - To test enum parameters To test enum parameters @@ -693,10 +670,8 @@ public class Example { Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) List enumFormStringArray = "$"; // List | Form parameter enum test (string array) String enumFormString = "-efg"; // String | Form parameter enum test (string) - try { + try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -744,7 +719,6 @@ No authorization required ## testGroupParameters - > testGroupParameters().requiredStringGroup(requiredStringGroup).requiredBooleanGroup(requiredBooleanGroup).requiredInt64Group(requiredInt64Group).stringGroup(stringGroup).booleanGroup(booleanGroup).int64Group(int64Group).execute(); Fake endpoint to test group parameters (optional) @@ -773,7 +747,7 @@ public class Example { Integer stringGroup = 56; // Integer | String in group parameters Boolean booleanGroup = true; // Boolean | Boolean in group parameters Long int64Group = 56L; // Long | Integer in group parameters - try { + try { api.testGroupParameters() .requiredStringGroup(requiredStringGroup) .requiredBooleanGroup(requiredBooleanGroup) @@ -782,7 +756,6 @@ public class Example { .booleanGroup(booleanGroup) .int64Group(int64Group) .execute(); - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testGroupParameters"); System.err.println("Status code: " + e.getCode()); @@ -829,7 +802,6 @@ No authorization required > testInlineAdditionalProperties(param) - test inline additionalProperties ### Example @@ -849,10 +821,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Map param = new HashMap(); // Map | request body - try { + try { apiInstance.testInlineAdditionalProperties(param); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -894,7 +864,6 @@ No authorization required > testJsonFormData(param, param2) - test json serialization of form data ### Example @@ -915,10 +884,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String param = "param_example"; // String | field1 String param2 = "param2_example"; // String | field2 - try { + try { apiInstance.testJsonFormData(param, param2); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testJsonFormData"); System.err.println("Status code: " + e.getCode()); @@ -963,7 +930,6 @@ No authorization required - To test the collection format in query parameters ### Example @@ -987,10 +953,8 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | - try { + try { apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md index 1d683e302f..14a74a37a4 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-java6/docs/FakeClassnameTags123Api.md @@ -12,7 +12,6 @@ Method | HTTP request | Description > Client testClassname(body) - To test class name in snake case To test class name in snake case @@ -41,9 +40,8 @@ public class Example { FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClassname(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); diff --git a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md index 00452d3fec..875a8e6783 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md @@ -20,7 +20,6 @@ Method | HTTP request | Description > addPet(body) - Add a new pet to the store ### Example @@ -45,10 +44,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.addPet(body); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -91,7 +88,6 @@ null (empty response body) > deletePet(petId, apiKey) - Deletes a pet ### Example @@ -117,10 +113,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | - try { + try { apiInstance.deletePet(petId, apiKey); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#deletePet"); System.err.println("Status code: " + e.getCode()); @@ -164,7 +158,6 @@ null (empty response body) > List<Pet> findPetsByStatus(status) - Finds Pets by status Multiple status values can be provided with comma separated strings @@ -191,9 +184,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List status = Arrays.asList("available"); // List | Status values that need to be considered for filter - try { + try { List result = apiInstance.findPetsByStatus(status); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByStatus"); @@ -237,7 +229,6 @@ Name | Type | Description | Notes > List<Pet> findPetsByTags(tags) - Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -264,9 +255,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List tags = Arrays.asList(); // List | Tags to filter by - try { + try { List result = apiInstance.findPetsByTags(tags); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByTags"); @@ -310,7 +300,6 @@ Name | Type | Description | Notes > Pet getPetById(petId) - Find pet by ID Returns a single pet @@ -339,9 +328,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | ID of pet to return - try { + try { Pet result = apiInstance.getPetById(petId); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#getPetById"); @@ -386,7 +374,6 @@ Name | Type | Description | Notes > updatePet(body) - Update an existing pet ### Example @@ -411,10 +398,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.updatePet(body); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -459,7 +444,6 @@ null (empty response body) > updatePetWithForm(petId, name, status) - Updates a pet in the store with form data ### Example @@ -486,10 +470,8 @@ public class Example { Long petId = 56L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | Updated name of the pet String status = "status_example"; // String | Updated status of the pet - try { + try { apiInstance.updatePetWithForm(petId, name, status); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePetWithForm"); System.err.println("Status code: " + e.getCode()); @@ -533,7 +515,6 @@ null (empty response body) > ModelApiResponse uploadFile(petId, additionalMetadata, file) - uploads an image ### Example @@ -560,9 +541,8 @@ public class Example { Long petId = 56L; // Long | ID of pet to update String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server File file = new File("/path/to/file"); // File | file to upload - try { + try { ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFile"); @@ -607,7 +587,6 @@ Name | Type | Description | Notes > ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) - uploads an image (required) ### Example @@ -634,9 +613,8 @@ public class Example { Long petId = 56L; // Long | ID of pet to update File requiredFile = new File("/path/to/file"); // File | file to upload String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server - try { + try { ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); diff --git a/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md index f3a9b2320c..6625d5969e 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/StoreApi.md @@ -15,7 +15,6 @@ Method | HTTP request | Description > deleteOrder(orderId) - Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -37,10 +36,8 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); String orderId = "orderId_example"; // String | ID of the order that needs to be deleted - try { + try { apiInstance.deleteOrder(orderId); - - } catch (ApiException e) { System.err.println("Exception when calling StoreApi#deleteOrder"); System.err.println("Status code: " + e.getCode()); @@ -83,7 +80,6 @@ No authorization required > Map<String, Integer> getInventory() - Returns pet inventories by status Returns a map of status codes to quantities @@ -111,9 +107,8 @@ public class Example { //api_key.setApiKeyPrefix("Token"); StoreApi apiInstance = new StoreApi(defaultClient); - try { + try { Map result = apiInstance.getInventory(); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getInventory"); @@ -153,7 +148,6 @@ This endpoint does not need any parameter. > Order getOrderById(orderId) - Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -175,9 +169,8 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Long orderId = 56L; // Long | ID of pet that needs to be fetched - try { + try { Order result = apiInstance.getOrderById(orderId); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getOrderById"); @@ -222,7 +215,6 @@ No authorization required > Order placeOrder(body) - Place an order for a pet ### Example @@ -242,9 +234,8 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Order body = new Order(); // Order | order placed for purchasing the pet - try { + try { Order result = apiInstance.placeOrder(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); diff --git a/samples/client/petstore/java/jersey2-java6/docs/UserApi.md b/samples/client/petstore/java/jersey2-java6/docs/UserApi.md index 9bd97f6969..ca9f550c31 100644 --- a/samples/client/petstore/java/jersey2-java6/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java6/docs/UserApi.md @@ -19,7 +19,6 @@ Method | HTTP request | Description > createUser(body) - Create user This can only be done by the logged in user. @@ -41,10 +40,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); User body = new User(); // User | Created user object - try { + try { apiInstance.createUser(body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -86,7 +83,6 @@ No authorization required > createUsersWithArrayInput(body) - Creates list of users with given input array ### Example @@ -106,10 +102,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithArrayInput(body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -151,7 +145,6 @@ No authorization required > createUsersWithListInput(body) - Creates list of users with given input array ### Example @@ -171,10 +164,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithListInput(body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -216,7 +207,6 @@ No authorization required > deleteUser(username) - Delete user This can only be done by the logged in user. @@ -238,10 +228,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be deleted - try { + try { apiInstance.deleteUser(username); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#deleteUser"); System.err.println("Status code: " + e.getCode()); @@ -284,7 +272,6 @@ No authorization required > User getUserByName(username) - Get user by user name ### Example @@ -304,9 +291,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. - try { + try { User result = apiInstance.getUserByName(username); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#getUserByName"); @@ -351,7 +337,6 @@ No authorization required > String loginUser(username, password) - Logs user into the system ### Example @@ -372,9 +357,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The user name for login String password = "password_example"; // String | The password for login in clear text - try { + try { String result = apiInstance.loginUser(username, password); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#loginUser"); @@ -419,7 +403,6 @@ No authorization required > logoutUser() - Logs out current logged in user session ### Example @@ -438,10 +421,8 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - try { + try { apiInstance.logoutUser(); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#logoutUser"); System.err.println("Status code: " + e.getCode()); @@ -480,7 +461,6 @@ No authorization required > updateUser(username, body) - Updated user This can only be done by the logged in user. @@ -503,10 +483,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted User body = new User(); // User | Updated user object - try { + try { apiInstance.updateUser(username, body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md index 6b6f08a5d8..059616ec6b 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description > Client call123testSpecialTags(body) - To test special tags To test special tags and operation ID starting with number @@ -34,9 +33,8 @@ public class Example { AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index 7d866f1743..543c51f066 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -25,7 +25,6 @@ Method | HTTP request | Description > createXmlItem(xmlItem) - creates an XmlItem this route creates an XmlItem @@ -47,10 +46,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body - try { + try { apiInstance.createXmlItem(xmlItem); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#createXmlItem"); System.err.println("Status code: " + e.getCode()); @@ -94,7 +91,6 @@ No authorization required - Test serialization of outer boolean types ### Example @@ -114,9 +110,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Boolean body = true; // Boolean | Input boolean as post body - try { + try { Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); @@ -161,7 +156,6 @@ No authorization required - Test serialization of object with outer number type ### Example @@ -181,9 +175,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body - try { + try { OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -228,7 +221,6 @@ No authorization required - Test serialization of outer number types ### Example @@ -248,9 +240,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body - try { + try { BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); @@ -295,7 +286,6 @@ No authorization required - Test serialization of outer string types ### Example @@ -315,9 +305,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String body = "body_example"; // String | Input string as post body - try { + try { String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); @@ -362,7 +351,6 @@ No authorization required - For this test, the body for this request much reference a schema named `File`. ### Example @@ -382,10 +370,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | - try { + try { apiInstance.testBodyWithFileSchema(body); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -429,7 +415,6 @@ No authorization required - ### Example ```java @@ -448,10 +433,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | User body = new User(); // User | - try { + try { apiInstance.testBodyWithQueryParams(query, body); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -494,7 +477,6 @@ No authorization required > Client testClientModel(body) - To test \"client\" model To test "client" model @@ -516,9 +498,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClientModel(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -561,7 +542,6 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters @@ -605,10 +585,8 @@ public class Example { OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None - try { + try { apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEndpointParameters"); System.err.println("Status code: " + e.getCode()); @@ -664,7 +642,6 @@ null (empty response body) > testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) - To test enum parameters To test enum parameters @@ -693,10 +670,8 @@ public class Example { Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) List enumFormStringArray = "$"; // List | Form parameter enum test (string array) String enumFormString = "-efg"; // String | Form parameter enum test (string) - try { + try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -744,7 +719,6 @@ No authorization required ## testGroupParameters - > testGroupParameters().requiredStringGroup(requiredStringGroup).requiredBooleanGroup(requiredBooleanGroup).requiredInt64Group(requiredInt64Group).stringGroup(stringGroup).booleanGroup(booleanGroup).int64Group(int64Group).execute(); Fake endpoint to test group parameters (optional) @@ -773,7 +747,7 @@ public class Example { Integer stringGroup = 56; // Integer | String in group parameters Boolean booleanGroup = true; // Boolean | Boolean in group parameters Long int64Group = 56L; // Long | Integer in group parameters - try { + try { api.testGroupParameters() .requiredStringGroup(requiredStringGroup) .requiredBooleanGroup(requiredBooleanGroup) @@ -782,7 +756,6 @@ public class Example { .booleanGroup(booleanGroup) .int64Group(int64Group) .execute(); - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testGroupParameters"); System.err.println("Status code: " + e.getCode()); @@ -829,7 +802,6 @@ No authorization required > testInlineAdditionalProperties(param) - test inline additionalProperties ### Example @@ -849,10 +821,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Map param = new HashMap(); // Map | request body - try { + try { apiInstance.testInlineAdditionalProperties(param); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -894,7 +864,6 @@ No authorization required > testJsonFormData(param, param2) - test json serialization of form data ### Example @@ -915,10 +884,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String param = "param_example"; // String | field1 String param2 = "param2_example"; // String | field2 - try { + try { apiInstance.testJsonFormData(param, param2); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testJsonFormData"); System.err.println("Status code: " + e.getCode()); @@ -963,7 +930,6 @@ No authorization required - To test the collection format in query parameters ### Example @@ -987,10 +953,8 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | - try { + try { apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md index 1d683e302f..14a74a37a4 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeClassnameTags123Api.md @@ -12,7 +12,6 @@ Method | HTTP request | Description > Client testClassname(body) - To test class name in snake case To test class name in snake case @@ -41,9 +40,8 @@ public class Example { FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClassname(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); diff --git a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md index 00452d3fec..875a8e6783 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md @@ -20,7 +20,6 @@ Method | HTTP request | Description > addPet(body) - Add a new pet to the store ### Example @@ -45,10 +44,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.addPet(body); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -91,7 +88,6 @@ null (empty response body) > deletePet(petId, apiKey) - Deletes a pet ### Example @@ -117,10 +113,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | - try { + try { apiInstance.deletePet(petId, apiKey); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#deletePet"); System.err.println("Status code: " + e.getCode()); @@ -164,7 +158,6 @@ null (empty response body) > List<Pet> findPetsByStatus(status) - Finds Pets by status Multiple status values can be provided with comma separated strings @@ -191,9 +184,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List status = Arrays.asList("available"); // List | Status values that need to be considered for filter - try { + try { List result = apiInstance.findPetsByStatus(status); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByStatus"); @@ -237,7 +229,6 @@ Name | Type | Description | Notes > List<Pet> findPetsByTags(tags) - Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -264,9 +255,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List tags = Arrays.asList(); // List | Tags to filter by - try { + try { List result = apiInstance.findPetsByTags(tags); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByTags"); @@ -310,7 +300,6 @@ Name | Type | Description | Notes > Pet getPetById(petId) - Find pet by ID Returns a single pet @@ -339,9 +328,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | ID of pet to return - try { + try { Pet result = apiInstance.getPetById(petId); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#getPetById"); @@ -386,7 +374,6 @@ Name | Type | Description | Notes > updatePet(body) - Update an existing pet ### Example @@ -411,10 +398,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.updatePet(body); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -459,7 +444,6 @@ null (empty response body) > updatePetWithForm(petId, name, status) - Updates a pet in the store with form data ### Example @@ -486,10 +470,8 @@ public class Example { Long petId = 56L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | Updated name of the pet String status = "status_example"; // String | Updated status of the pet - try { + try { apiInstance.updatePetWithForm(petId, name, status); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePetWithForm"); System.err.println("Status code: " + e.getCode()); @@ -533,7 +515,6 @@ null (empty response body) > ModelApiResponse uploadFile(petId, additionalMetadata, file) - uploads an image ### Example @@ -560,9 +541,8 @@ public class Example { Long petId = 56L; // Long | ID of pet to update String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server File file = new File("/path/to/file"); // File | file to upload - try { + try { ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFile"); @@ -607,7 +587,6 @@ Name | Type | Description | Notes > ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) - uploads an image (required) ### Example @@ -634,9 +613,8 @@ public class Example { Long petId = 56L; // Long | ID of pet to update File requiredFile = new File("/path/to/file"); // File | file to upload String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server - try { + try { ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); diff --git a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md index f3a9b2320c..6625d5969e 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md @@ -15,7 +15,6 @@ Method | HTTP request | Description > deleteOrder(orderId) - Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -37,10 +36,8 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); String orderId = "orderId_example"; // String | ID of the order that needs to be deleted - try { + try { apiInstance.deleteOrder(orderId); - - } catch (ApiException e) { System.err.println("Exception when calling StoreApi#deleteOrder"); System.err.println("Status code: " + e.getCode()); @@ -83,7 +80,6 @@ No authorization required > Map<String, Integer> getInventory() - Returns pet inventories by status Returns a map of status codes to quantities @@ -111,9 +107,8 @@ public class Example { //api_key.setApiKeyPrefix("Token"); StoreApi apiInstance = new StoreApi(defaultClient); - try { + try { Map result = apiInstance.getInventory(); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getInventory"); @@ -153,7 +148,6 @@ This endpoint does not need any parameter. > Order getOrderById(orderId) - Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -175,9 +169,8 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Long orderId = 56L; // Long | ID of pet that needs to be fetched - try { + try { Order result = apiInstance.getOrderById(orderId); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getOrderById"); @@ -222,7 +215,6 @@ No authorization required > Order placeOrder(body) - Place an order for a pet ### Example @@ -242,9 +234,8 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Order body = new Order(); // Order | order placed for purchasing the pet - try { + try { Order result = apiInstance.placeOrder(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); diff --git a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md index 9bd97f6969..ca9f550c31 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/UserApi.md @@ -19,7 +19,6 @@ Method | HTTP request | Description > createUser(body) - Create user This can only be done by the logged in user. @@ -41,10 +40,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); User body = new User(); // User | Created user object - try { + try { apiInstance.createUser(body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -86,7 +83,6 @@ No authorization required > createUsersWithArrayInput(body) - Creates list of users with given input array ### Example @@ -106,10 +102,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithArrayInput(body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -151,7 +145,6 @@ No authorization required > createUsersWithListInput(body) - Creates list of users with given input array ### Example @@ -171,10 +164,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithListInput(body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -216,7 +207,6 @@ No authorization required > deleteUser(username) - Delete user This can only be done by the logged in user. @@ -238,10 +228,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be deleted - try { + try { apiInstance.deleteUser(username); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#deleteUser"); System.err.println("Status code: " + e.getCode()); @@ -284,7 +272,6 @@ No authorization required > User getUserByName(username) - Get user by user name ### Example @@ -304,9 +291,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. - try { + try { User result = apiInstance.getUserByName(username); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#getUserByName"); @@ -351,7 +337,6 @@ No authorization required > String loginUser(username, password) - Logs user into the system ### Example @@ -372,9 +357,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The user name for login String password = "password_example"; // String | The password for login in clear text - try { + try { String result = apiInstance.loginUser(username, password); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#loginUser"); @@ -419,7 +403,6 @@ No authorization required > logoutUser() - Logs out current logged in user session ### Example @@ -438,10 +421,8 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - try { + try { apiInstance.logoutUser(); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#logoutUser"); System.err.println("Status code: " + e.getCode()); @@ -480,7 +461,6 @@ No authorization required > updateUser(username, body) - Updated user This can only be done by the logged in user. @@ -503,10 +483,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted User body = new User(); // User | Updated user object - try { + try { apiInstance.updateUser(username, body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md index 6b6f08a5d8..059616ec6b 100644 --- a/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2/docs/AnotherFakeApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description > Client call123testSpecialTags(body) - To test special tags To test special tags and operation ID starting with number @@ -34,9 +33,8 @@ public class Example { AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.call123testSpecialTags(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/jersey2/docs/FakeApi.md b/samples/client/petstore/java/jersey2/docs/FakeApi.md index 7d866f1743..543c51f066 100644 --- a/samples/client/petstore/java/jersey2/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2/docs/FakeApi.md @@ -25,7 +25,6 @@ Method | HTTP request | Description > createXmlItem(xmlItem) - creates an XmlItem this route creates an XmlItem @@ -47,10 +46,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body - try { + try { apiInstance.createXmlItem(xmlItem); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#createXmlItem"); System.err.println("Status code: " + e.getCode()); @@ -94,7 +91,6 @@ No authorization required - Test serialization of outer boolean types ### Example @@ -114,9 +110,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Boolean body = true; // Boolean | Input boolean as post body - try { + try { Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); @@ -161,7 +156,6 @@ No authorization required - Test serialization of object with outer number type ### Example @@ -181,9 +175,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body - try { + try { OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -228,7 +221,6 @@ No authorization required - Test serialization of outer number types ### Example @@ -248,9 +240,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body - try { + try { BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); @@ -295,7 +286,6 @@ No authorization required - Test serialization of outer string types ### Example @@ -315,9 +305,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String body = "body_example"; // String | Input string as post body - try { + try { String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); @@ -362,7 +351,6 @@ No authorization required - For this test, the body for this request much reference a schema named `File`. ### Example @@ -382,10 +370,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | - try { + try { apiInstance.testBodyWithFileSchema(body); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -429,7 +415,6 @@ No authorization required - ### Example ```java @@ -448,10 +433,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | User body = new User(); // User | - try { + try { apiInstance.testBodyWithQueryParams(query, body); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -494,7 +477,6 @@ No authorization required > Client testClientModel(body) - To test \"client\" model To test "client" model @@ -516,9 +498,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClientModel(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -561,7 +542,6 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters @@ -605,10 +585,8 @@ public class Example { OffsetDateTime dateTime = new OffsetDateTime(); // OffsetDateTime | None String password = "password_example"; // String | None String paramCallback = "paramCallback_example"; // String | None - try { + try { apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEndpointParameters"); System.err.println("Status code: " + e.getCode()); @@ -664,7 +642,6 @@ null (empty response body) > testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) - To test enum parameters To test enum parameters @@ -693,10 +670,8 @@ public class Example { Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double) List enumFormStringArray = "$"; // List | Form parameter enum test (string array) String enumFormString = "-efg"; // String | Form parameter enum test (string) - try { + try { apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -744,7 +719,6 @@ No authorization required ## testGroupParameters - > testGroupParameters().requiredStringGroup(requiredStringGroup).requiredBooleanGroup(requiredBooleanGroup).requiredInt64Group(requiredInt64Group).stringGroup(stringGroup).booleanGroup(booleanGroup).int64Group(int64Group).execute(); Fake endpoint to test group parameters (optional) @@ -773,7 +747,7 @@ public class Example { Integer stringGroup = 56; // Integer | String in group parameters Boolean booleanGroup = true; // Boolean | Boolean in group parameters Long int64Group = 56L; // Long | Integer in group parameters - try { + try { api.testGroupParameters() .requiredStringGroup(requiredStringGroup) .requiredBooleanGroup(requiredBooleanGroup) @@ -782,7 +756,6 @@ public class Example { .booleanGroup(booleanGroup) .int64Group(int64Group) .execute(); - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testGroupParameters"); System.err.println("Status code: " + e.getCode()); @@ -829,7 +802,6 @@ No authorization required > testInlineAdditionalProperties(param) - test inline additionalProperties ### Example @@ -849,10 +821,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); Map param = new HashMap(); // Map | request body - try { + try { apiInstance.testInlineAdditionalProperties(param); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -894,7 +864,6 @@ No authorization required > testJsonFormData(param, param2) - test json serialization of form data ### Example @@ -915,10 +884,8 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String param = "param_example"; // String | field1 String param2 = "param2_example"; // String | field2 - try { + try { apiInstance.testJsonFormData(param, param2); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testJsonFormData"); System.err.println("Status code: " + e.getCode()); @@ -963,7 +930,6 @@ No authorization required - To test the collection format in query parameters ### Example @@ -987,10 +953,8 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | - try { + try { apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - - } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); diff --git a/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md index 1d683e302f..14a74a37a4 100644 --- a/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/jersey2/docs/FakeClassnameTags123Api.md @@ -12,7 +12,6 @@ Method | HTTP request | Description > Client testClassname(body) - To test class name in snake case To test class name in snake case @@ -41,9 +40,8 @@ public class Example { FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); Client body = new Client(); // Client | client model - try { + try { Client result = apiInstance.testClassname(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); diff --git a/samples/client/petstore/java/jersey2/docs/PetApi.md b/samples/client/petstore/java/jersey2/docs/PetApi.md index 00452d3fec..875a8e6783 100644 --- a/samples/client/petstore/java/jersey2/docs/PetApi.md +++ b/samples/client/petstore/java/jersey2/docs/PetApi.md @@ -20,7 +20,6 @@ Method | HTTP request | Description > addPet(body) - Add a new pet to the store ### Example @@ -45,10 +44,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.addPet(body); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -91,7 +88,6 @@ null (empty response body) > deletePet(petId, apiKey) - Deletes a pet ### Example @@ -117,10 +113,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | Pet id to delete String apiKey = "apiKey_example"; // String | - try { + try { apiInstance.deletePet(petId, apiKey); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#deletePet"); System.err.println("Status code: " + e.getCode()); @@ -164,7 +158,6 @@ null (empty response body) > List<Pet> findPetsByStatus(status) - Finds Pets by status Multiple status values can be provided with comma separated strings @@ -191,9 +184,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List status = Arrays.asList("available"); // List | Status values that need to be considered for filter - try { + try { List result = apiInstance.findPetsByStatus(status); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByStatus"); @@ -237,7 +229,6 @@ Name | Type | Description | Notes > List<Pet> findPetsByTags(tags) - Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @@ -264,9 +255,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); List tags = Arrays.asList(); // List | Tags to filter by - try { + try { List result = apiInstance.findPetsByTags(tags); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#findPetsByTags"); @@ -310,7 +300,6 @@ Name | Type | Description | Notes > Pet getPetById(petId) - Find pet by ID Returns a single pet @@ -339,9 +328,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Long petId = 56L; // Long | ID of pet to return - try { + try { Pet result = apiInstance.getPetById(petId); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#getPetById"); @@ -386,7 +374,6 @@ Name | Type | Description | Notes > updatePet(body) - Update an existing pet ### Example @@ -411,10 +398,8 @@ public class Example { PetApi apiInstance = new PetApi(defaultClient); Pet body = new Pet(); // Pet | Pet object that needs to be added to the store - try { + try { apiInstance.updatePet(body); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -459,7 +444,6 @@ null (empty response body) > updatePetWithForm(petId, name, status) - Updates a pet in the store with form data ### Example @@ -486,10 +470,8 @@ public class Example { Long petId = 56L; // Long | ID of pet that needs to be updated String name = "name_example"; // String | Updated name of the pet String status = "status_example"; // String | Updated status of the pet - try { + try { apiInstance.updatePetWithForm(petId, name, status); - - } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePetWithForm"); System.err.println("Status code: " + e.getCode()); @@ -533,7 +515,6 @@ null (empty response body) > ModelApiResponse uploadFile(petId, additionalMetadata, file) - uploads an image ### Example @@ -560,9 +541,8 @@ public class Example { Long petId = 56L; // Long | ID of pet to update String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server File file = new File("/path/to/file"); // File | file to upload - try { + try { ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFile"); @@ -607,7 +587,6 @@ Name | Type | Description | Notes > ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) - uploads an image (required) ### Example @@ -634,9 +613,8 @@ public class Example { Long petId = 56L; // Long | ID of pet to update File requiredFile = new File("/path/to/file"); // File | file to upload String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server - try { + try { ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); diff --git a/samples/client/petstore/java/jersey2/docs/StoreApi.md b/samples/client/petstore/java/jersey2/docs/StoreApi.md index f3a9b2320c..6625d5969e 100644 --- a/samples/client/petstore/java/jersey2/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2/docs/StoreApi.md @@ -15,7 +15,6 @@ Method | HTTP request | Description > deleteOrder(orderId) - Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors @@ -37,10 +36,8 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); String orderId = "orderId_example"; // String | ID of the order that needs to be deleted - try { + try { apiInstance.deleteOrder(orderId); - - } catch (ApiException e) { System.err.println("Exception when calling StoreApi#deleteOrder"); System.err.println("Status code: " + e.getCode()); @@ -83,7 +80,6 @@ No authorization required > Map<String, Integer> getInventory() - Returns pet inventories by status Returns a map of status codes to quantities @@ -111,9 +107,8 @@ public class Example { //api_key.setApiKeyPrefix("Token"); StoreApi apiInstance = new StoreApi(defaultClient); - try { + try { Map result = apiInstance.getInventory(); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getInventory"); @@ -153,7 +148,6 @@ This endpoint does not need any parameter. > Order getOrderById(orderId) - Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions @@ -175,9 +169,8 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Long orderId = 56L; // Long | ID of pet that needs to be fetched - try { + try { Order result = apiInstance.getOrderById(orderId); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#getOrderById"); @@ -222,7 +215,6 @@ No authorization required > Order placeOrder(body) - Place an order for a pet ### Example @@ -242,9 +234,8 @@ public class Example { StoreApi apiInstance = new StoreApi(defaultClient); Order body = new Order(); // Order | order placed for purchasing the pet - try { + try { Order result = apiInstance.placeOrder(body); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); diff --git a/samples/client/petstore/java/jersey2/docs/UserApi.md b/samples/client/petstore/java/jersey2/docs/UserApi.md index 9bd97f6969..ca9f550c31 100644 --- a/samples/client/petstore/java/jersey2/docs/UserApi.md +++ b/samples/client/petstore/java/jersey2/docs/UserApi.md @@ -19,7 +19,6 @@ Method | HTTP request | Description > createUser(body) - Create user This can only be done by the logged in user. @@ -41,10 +40,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); User body = new User(); // User | Created user object - try { + try { apiInstance.createUser(body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -86,7 +83,6 @@ No authorization required > createUsersWithArrayInput(body) - Creates list of users with given input array ### Example @@ -106,10 +102,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithArrayInput(body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -151,7 +145,6 @@ No authorization required > createUsersWithListInput(body) - Creates list of users with given input array ### Example @@ -171,10 +164,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); List body = Arrays.asList(); // List | List of user object - try { + try { apiInstance.createUsersWithListInput(body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -216,7 +207,6 @@ No authorization required > deleteUser(username) - Delete user This can only be done by the logged in user. @@ -238,10 +228,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be deleted - try { + try { apiInstance.deleteUser(username); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#deleteUser"); System.err.println("Status code: " + e.getCode()); @@ -284,7 +272,6 @@ No authorization required > User getUserByName(username) - Get user by user name ### Example @@ -304,9 +291,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. - try { + try { User result = apiInstance.getUserByName(username); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#getUserByName"); @@ -351,7 +337,6 @@ No authorization required > String loginUser(username, password) - Logs user into the system ### Example @@ -372,9 +357,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | The user name for login String password = "password_example"; // String | The password for login in clear text - try { + try { String result = apiInstance.loginUser(username, password); - System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#loginUser"); @@ -419,7 +403,6 @@ No authorization required > logoutUser() - Logs out current logged in user session ### Example @@ -438,10 +421,8 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - try { + try { apiInstance.logoutUser(); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#logoutUser"); System.err.println("Status code: " + e.getCode()); @@ -480,7 +461,6 @@ No authorization required > updateUser(username, body) - Updated user This can only be done by the logged in user. @@ -503,10 +483,8 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted User body = new User(); // User | Updated user object - try { + try { apiInstance.updateUser(username, body); - - } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); From ea55968737fa80a3e306d1b08032ff4d911774c9 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sat, 18 Jan 2020 18:53:05 -0500 Subject: [PATCH 72/82] =?UTF-8?q?Evaluating=20https=20issues=20in=20Circle?= =?UTF-8?q?CI=20(on=20top=20of=20CiscoM31-maven-h=E2=80=A6=20(#5034)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * replace http with https. Replace http://central.maven.org with https://repo1.maven.org * replace http://www.apache.org/licenses/LICENSE-2.0 with https://www.apache.org/licenses/LICENSE-2.0 * Force HTTPS for mavenCentral gradle DSL Co-authored-by: Sebastien Rosset --- LICENSE | 2 +- appveyor.yml | 2 +- bin/utils/release/bump.sh | 2 +- bin/utils/release/release_version_update.sh | 2 +- .../release/release_version_update_docs.sh | 2 +- bin/utils/release_checkout.rb | 18 +++---- bin/utils/release_version_update_docs.sh | 2 +- docs/building.md | 6 +-- docs/installation.md | 6 +-- docs/plugins.md | 2 +- .../codegen/OpenAPIGenerator.java | 2 +- .../codegen/cmd/CompletionCommand.java | 2 +- .../openapitools/codegen/cmd/ConfigHelp.java | 2 +- .../openapitools/codegen/cmd/Generate.java | 2 +- .../codegen/cmd/GenerateBatch.java | 2 +- .../org/openapitools/codegen/cmd/Meta.java | 2 +- .../openapitools/codegen/cmd/Validate.java | 2 +- .../org/openapitools/codegen/cmd/Version.java | 2 +- .../codegen/cmd/GenerateTest.java | 2 +- .../codegen/cmd/utils/OptionUtilsTest.java | 2 +- .../api/AbstractTemplatingEngineAdapter.java | 2 +- .../codegen/api/TemplatingEngineAdapter.java | 2 +- .../codegen/api/TemplatingGenerator.java | 2 +- .../openapitools/codegen/config/Context.java | 2 +- .../codegen/config/GeneratorSettings.java | 2 +- .../codegen/config/WorkflowSettings.java | 2 +- .../openapitools/codegen/meta/FeatureSet.java | 2 +- .../codegen/meta/GeneratorMetadata.java | 2 +- .../openapitools/codegen/meta/Stability.java | 2 +- .../features/ClientModificationFeature.java | 2 +- .../meta/features/DataTypeFeature.java | 2 +- .../meta/features/DocumentationFeature.java | 2 +- .../codegen/meta/features/GlobalFeature.java | 2 +- .../meta/features/ParameterFeature.java | 2 +- .../meta/features/SchemaSupportFeature.java | 2 +- .../meta/features/SecurityFeature.java | 2 +- .../meta/features/WireFormatFeature.java | 2 +- .../meta/features/annotations/OAS2.java | 2 +- .../meta/features/annotations/OAS3.java | 2 +- .../annotations/ToolingExtension.java | 2 +- .../codegen/validation/GenericValidator.java | 2 +- .../codegen/validation/Invalid.java | 2 +- .../codegen/validation/Severity.java | 2 +- .../codegen/validation/Valid.java | 2 +- .../codegen/validation/Validated.java | 2 +- .../codegen/validation/ValidationResult.java | 2 +- .../codegen/validation/ValidationRule.java | 2 +- .../codegen/validation/Validator.java | 2 +- .../codegen/config/WorkflowSettingsTest.java | 2 +- .../validation/GenericValidatorTest.java | 2 +- .../codegen/validation/ValidatedTest.java | 2 +- .../validation/ValidationRuleTest.java | 2 +- .../README.adoc | 2 +- .../build.gradle | 6 +-- .../samples/local-spec/build.gradle | 2 +- .../gradle/plugin/OpenApiGeneratorPlugin.kt | 2 +- .../OpenApiGeneratorGenerateExtension.kt | 2 +- .../OpenApiGeneratorGeneratorsExtension.kt | 2 +- .../OpenApiGeneratorMetaExtension.kt | 2 +- .../OpenApiGeneratorValidateExtension.kt | 2 +- .../gradle/plugin/tasks/GenerateTask.kt | 2 +- .../gradle/plugin/tasks/GeneratorsTask.kt | 2 +- .../generator/gradle/plugin/tasks/MetaTask.kt | 2 +- .../gradle/plugin/tasks/ValidateTask.kt | 2 +- .../examples/java-client.xml | 2 +- .../examples/kotlin.xml | 2 +- .../examples/multi-module/java-client/pom.xml | 2 +- .../examples/multi-module/pom.xml | 2 +- .../multi-module/sample-schema/pom.xml | 2 +- .../src/main/resources/openapi.yaml | 12 ++--- .../examples/non-java-invalid-spec.xml | 2 +- .../examples/non-java.xml | 2 +- .../examples/spring.xml | 2 +- .../examples/swagger.yaml | 12 ++--- .../codegen/plugin/CodeGenMojo.java | 2 +- .../codegen/online/OpenAPI2SpringBoot.java | 2 +- .../codegen/online/RFC3339DateFormat.java | 2 +- .../codegen/online/api/ApiOriginFilter.java | 2 +- .../codegen/online/api/ApiUtil.java | 2 +- .../codegen/online/api/GenApi.java | 2 +- .../codegen/online/api/GenApiController.java | 2 +- .../codegen/online/api/GenApiDelegate.java | 2 +- .../online/configuration/HomeController.java | 2 +- .../OpenAPIDocumentationConfig.java | 4 +- .../codegen/online/model/ApiResponse.java | 2 +- .../codegen/online/model/Generated.java | 2 +- .../codegen/online/model/GeneratorInput.java | 2 +- .../codegen/online/model/ResponseCode.java | 2 +- .../codegen/online/service/GenApiService.java | 2 +- .../codegen/online/service/Generator.java | 2 +- .../codegen/online/service/ZipUtil.java | 2 +- .../codegen/AbstractGenerator.java | 2 +- .../org/openapitools/codegen/CliOption.java | 2 +- .../openapitools/codegen/ClientOptInput.java | 2 +- .../openapitools/codegen/CodegenCallback.java | 2 +- .../openapitools/codegen/CodegenConfig.java | 2 +- .../codegen/CodegenConfigLoader.java | 2 +- .../codegen/CodegenConstants.java | 2 +- .../openapitools/codegen/CodegenModel.java | 2 +- .../codegen/CodegenModelFactory.java | 2 +- .../codegen/CodegenModelType.java | 2 +- .../codegen/CodegenOperation.java | 2 +- .../codegen/CodegenParameter.java | 2 +- .../openapitools/codegen/CodegenProperty.java | 2 +- .../openapitools/codegen/CodegenResponse.java | 2 +- .../openapitools/codegen/CodegenSecurity.java | 2 +- .../org/openapitools/codegen/CodegenType.java | 2 +- .../openapitools/codegen/DefaultCodegen.java | 2 +- .../codegen/DefaultGenerator.java | 2 +- .../org/openapitools/codegen/Generator.java | 2 +- .../codegen/GlobalSupportingFile.java | 2 +- .../codegen/InlineModelResolver.java | 2 +- .../openapitools/codegen/SupportingFile.java | 2 +- .../codegen/TemplatingEngineLoader.java | 2 +- .../openapitools/codegen/auth/AuthMethod.java | 2 +- .../openapitools/codegen/auth/AuthParser.java | 2 +- .../codegen/config/CodegenConfigurator.java | 2 +- .../config/CodegenConfiguratorUtils.java | 2 +- .../codegen/config/GlobalSettings.java | 2 +- .../codegen/examples/ExampleGenerator.java | 2 +- .../codegen/examples/XmlExampleGenerator.java | 2 +- .../ignore/CodegenIgnoreProcessor.java | 2 +- .../codegen/ignore/rules/DirectoryRule.java | 2 +- .../codegen/ignore/rules/EverythingRule.java | 2 +- .../codegen/ignore/rules/FileRule.java | 2 +- .../ignore/rules/IgnoreLineParser.java | 2 +- .../codegen/ignore/rules/InvalidRule.java | 2 +- .../codegen/ignore/rules/ParserException.java | 2 +- .../codegen/ignore/rules/Part.java | 2 +- .../codegen/ignore/rules/RootedFileRule.java | 2 +- .../codegen/ignore/rules/Rule.java | 2 +- .../codegen/languages/AbstractAdaCodegen.java | 2 +- .../languages/AbstractApexCodegen.java | 2 +- .../languages/AbstractCSharpCodegen.java | 2 +- .../codegen/languages/AbstractCppCodegen.java | 2 +- .../languages/AbstractEiffelCodegen.java | 2 +- .../languages/AbstractFSharpCodegen.java | 2 +- .../codegen/languages/AbstractGoCodegen.java | 2 +- .../languages/AbstractGraphQLCodegen.java | 2 +- .../languages/AbstractJavaCodegen.java | 2 +- .../AbstractJavaJAXRSServerCodegen.java | 2 +- .../languages/AbstractKotlinCodegen.java | 2 +- .../codegen/languages/AbstractPhpCodegen.java | 2 +- .../languages/AbstractRubyCodegen.java | 2 +- .../languages/AbstractScalaCodegen.java | 2 +- .../AbstractTypeScriptClientCodegen.java | 2 +- .../codegen/languages/AdaCodegen.java | 2 +- .../codegen/languages/AdaServerCodegen.java | 2 +- .../languages/AndroidClientCodegen.java | 2 +- .../languages/Apache2ConfigCodegen.java | 2 +- .../codegen/languages/ApexClientCodegen.java | 2 +- .../AsciidocDocumentationCodegen.java | 2 +- .../languages/AspNetCoreServerCodegen.java | 2 +- .../codegen/languages/AvroSchemaCodegen.java | 2 +- .../codegen/languages/BashClientCodegen.java | 2 +- .../languages/CLibcurlClientCodegen.java | 2 +- .../languages/CSharpClientCodegen.java | 2 +- .../languages/CSharpDotNet2ClientCodegen.java | 2 +- .../languages/CSharpNancyFXServerCodegen.java | 2 +- .../languages/CSharpNetCoreClientCodegen.java | 2 +- .../languages/ClojureClientCodegen.java | 2 +- .../languages/ConfluenceWikiCodegen.java | 2 +- .../languages/CppPistacheServerCodegen.java | 2 +- .../languages/CppQt5ClientCodegen.java | 2 +- .../CppQt5QHttpEngineServerCodegen.java | 2 +- .../languages/CppRestSdkClientCodegen.java | 2 +- .../languages/CppRestbedServerCodegen.java | 2 +- .../languages/CppTizenClientCodegen.java | 2 +- .../codegen/languages/DartClientCodegen.java | 2 +- .../languages/DartDioClientCodegen.java | 2 +- .../languages/DartJaguarClientCodegen.java | 2 +- .../languages/EiffelClientCodegen.java | 2 +- .../languages/ElixirClientCodegen.java | 2 +- .../codegen/languages/ElmClientCodegen.java | 2 +- .../languages/ErlangClientCodegen.java | 2 +- .../languages/ErlangProperCodegen.java | 2 +- .../languages/ErlangServerCodegen.java | 2 +- .../codegen/languages/FlashClientCodegen.java | 2 +- .../FsharpFunctionsServerCodegen.java | 2 +- .../languages/FsharpGiraffeServerCodegen.java | 2 +- .../codegen/languages/GoClientCodegen.java | 2 +- .../GoClientExperimentalCodegen.java | 2 +- .../codegen/languages/GoGinServerCodegen.java | 2 +- .../codegen/languages/GoServerCodegen.java | 2 +- .../GraphQLNodeJSExpressServerCodegen.java | 2 +- .../languages/GraphQLSchemaCodegen.java | 2 +- .../languages/GroovyClientCodegen.java | 2 +- .../languages/HaskellHttpClientCodegen.java | 2 +- .../languages/HaskellServantCodegen.java | 2 +- .../languages/JMeterClientCodegen.java | 2 +- .../languages/JavaCXFClientCodegen.java | 2 +- .../languages/JavaCXFExtServerCodegen.java | 2 +- .../languages/JavaCXFServerCodegen.java | 2 +- .../codegen/languages/JavaClientCodegen.java | 2 +- .../languages/JavaInflectorServerCodegen.java | 2 +- .../JavaJAXRSCXFCDIServerCodegen.java | 2 +- .../languages/JavaJAXRSSpecServerCodegen.java | 2 +- .../languages/JavaJerseyServerCodegen.java | 2 +- .../languages/JavaMSF4JServerCodegen.java | 2 +- .../languages/JavaPKMSTServerCodegen.java | 2 +- .../languages/JavaPlayFrameworkCodegen.java | 2 +- .../JavaResteasyEapServerCodegen.java | 2 +- .../languages/JavaResteasyServerCodegen.java | 2 +- .../languages/JavaUndertowServerCodegen.java | 2 +- .../languages/JavaVertXServerCodegen.java | 2 +- .../languages/JavaVertXWebServerCodegen.java | 2 +- .../languages/JavascriptClientCodegen.java | 2 +- ...JavascriptClosureAngularClientCodegen.java | 2 +- .../JavascriptFlowtypedClientCodegen.java | 2 +- .../languages/KotlinClientCodegen.java | 2 +- .../languages/KotlinServerCodegen.java | 2 +- .../languages/KotlinSpringServerCodegen.java | 2 +- .../languages/KotlinVertxServerCodegen.java | 2 +- .../codegen/languages/LuaClientCodegen.java | 2 +- .../codegen/languages/MysqlSchemaCodegen.java | 2 +- .../codegen/languages/NimClientCodegen.java | 2 +- .../languages/NodeJSExpressServerCodegen.java | 2 +- .../languages/NodeJSServerCodegen.java | 2 +- .../codegen/languages/OCamlClientCodegen.java | 2 +- .../codegen/languages/ObjcClientCodegen.java | 2 +- .../codegen/languages/OpenAPIGenerator.java | 2 +- .../languages/OpenAPIYamlGenerator.java | 2 +- .../codegen/languages/PerlClientCodegen.java | 2 +- .../codegen/languages/PhpClientCodegen.java | 2 +- .../languages/PhpLaravelServerCodegen.java | 2 +- .../languages/PhpLumenServerCodegen.java | 2 +- .../languages/PhpSilexServerCodegen.java | 2 +- .../languages/PhpSlim4ServerCodegen.java | 2 +- .../languages/PhpSlimServerCodegen.java | 2 +- .../languages/PhpSymfonyServerCodegen.java | 2 +- ...endExpressivePathHandlerServerCodegen.java | 2 +- .../languages/PowerShellClientCodegen.java | 2 +- .../languages/ProtobufSchemaCodegen.java | 2 +- .../PythonAbstractConnexionServerCodegen.java | 2 +- .../PythonAiohttpConnexionServerCodegen.java | 2 +- .../PythonBluePlanetServerCodegen.java | 2 +- .../languages/PythonClientCodegen.java | 2 +- .../PythonClientExperimentalCodegen.java | 2 +- .../PythonFlaskConnexionServerCodegen.java | 2 +- .../codegen/languages/RClientCodegen.java | 2 +- .../codegen/languages/RubyClientCodegen.java | 2 +- .../languages/RubyOnRailsServerCodegen.java | 2 +- .../languages/RubySinatraServerCodegen.java | 2 +- .../codegen/languages/RustClientCodegen.java | 2 +- .../codegen/languages/RustServerCodegen.java | 2 +- .../languages/ScalaAkkaClientCodegen.java | 2 +- .../languages/ScalaFinchServerCodegen.java | 2 +- .../languages/ScalaGatlingCodegen.java | 2 +- .../languages/ScalaHttpClientCodegen.java | 2 +- .../languages/ScalaLagomServerCodegen.java | 2 +- .../ScalaPlayFrameworkServerCodegen.java | 2 +- .../languages/ScalatraServerCodegen.java | 2 +- .../languages/ScalazClientCodegen.java | 2 +- .../codegen/languages/SpringCodegen.java | 2 +- .../codegen/languages/StaticDocCodegen.java | 2 +- .../languages/StaticHtml2Generator.java | 2 +- .../languages/StaticHtmlGenerator.java | 2 +- .../codegen/languages/Swift3Codegen.java | 2 +- .../codegen/languages/Swift4Codegen.java | 2 +- .../languages/Swift5ClientCodegen.java | 2 +- .../codegen/languages/SwiftClientCodegen.java | 2 +- .../TypeScriptAngularClientCodegen.java | 2 +- .../TypeScriptAngularJsClientCodegen.java | 2 +- .../TypeScriptAureliaClientCodegen.java | 2 +- .../TypeScriptAxiosClientCodegen.java | 2 +- .../TypeScriptFetchClientCodegen.java | 2 +- .../TypeScriptInversifyClientCodegen.java | 2 +- .../TypeScriptJqueryClientCodegen.java | 2 +- .../TypeScriptNodeClientCodegen.java | 2 +- .../TypeScriptReduxQueryClientCodegen.java | 2 +- .../TypeScriptRxjsClientCodegen.java | 2 +- .../BeanValidationExtendedFeatures.java | 2 +- .../features/BeanValidationFeatures.java | 2 +- .../languages/features/CXFFeatures.java | 2 +- .../languages/features/CXFServerFeatures.java | 2 +- .../languages/features/GzipFeatures.java | 2 +- .../languages/features/GzipTestFeatures.java | 2 +- .../languages/features/JbossFeature.java | 2 +- .../languages/features/LoggingFeatures.java | 2 +- .../features/LoggingTestFeatures.java | 2 +- .../languages/features/OptionalFeatures.java | 2 +- .../PerformBeanValidationFeatures.java | 2 +- .../languages/features/SpringFeatures.java | 2 +- .../languages/features/SwaggerFeatures.java | 2 +- .../languages/features/SwaggerUIFeatures.java | 2 +- .../features/UseGenericResponseFeatures.java | 2 +- .../templating/HandlebarsEngineAdapter.java | 2 +- .../templating/MustacheEngineAdapter.java | 2 +- .../templating/mustache/CamelCaseLambda.java | 2 +- .../templating/mustache/IndentedLambda.java | 2 +- .../mustache/JoinWithCommaLambda.java | 2 +- .../templating/mustache/LowercaseLambda.java | 2 +- .../mustache/SplitStringLambda.java | 2 +- .../templating/mustache/TitlecaseLambda.java | 2 +- .../mustache/TrimWhitespaceLambda.java | 2 +- .../templating/mustache/UppercaseLambda.java | 2 +- .../codegen/utils/ImplementationVersion.java | 2 +- .../openapitools/codegen/utils/JsonCache.java | 2 +- .../codegen/utils/JsonCacheImpl.java | 2 +- .../openapitools/codegen/utils/Markdown.java | 2 +- .../codegen/utils/ModelUtils.java | 2 +- .../codegen/utils/OptionUtils.java | 2 +- .../openapitools/codegen/utils/SemVer.java | 2 +- .../codegen/utils/URLPathUtils.java | 2 +- .../resources/Groovy/build.gradle.mustache | 2 +- .../main/resources/Java/build.gradle.mustache | 4 +- .../libraries/feign/build.gradle.mustache | 2 +- .../google-api-client/build.gradle.mustache | 2 +- .../libraries/jersey2/build.gradle.mustache | 2 +- .../microprofile/licenseInfo.mustache | 2 +- .../libraries/native/build.gradle.mustache | 4 +- .../okhttp-gson/build.gradle.mustache | 2 +- .../rest-assured/build.gradle.mustache | 2 +- .../libraries/resteasy/build.gradle.mustache | 2 +- .../resttemplate/build.gradle.mustache | 2 +- .../libraries/retrofit/build.gradle.mustache | 2 +- .../libraries/retrofit2/build.gradle.mustache | 2 +- .../libraries/vertx/build.gradle.mustache | 2 +- .../JavaJaxRS/cxf-ext/licenseInfo.mustache | 2 +- .../JavaJaxRS/cxf/licenseInfo.mustache | 2 +- .../JavaJaxRS/resteasy/eap/gradle.mustache | 2 +- .../JavaJaxRS/resteasy/gradle.mustache | 2 +- .../JavaPlayFramework/LICENSE.mustache | 2 +- .../src/main/resources/_common/LICENSE | 2 +- .../src/main/resources/android/build.mustache | 2 +- .../android/libraries/volley/build.mustache | 2 +- .../codegen/kotlin/build_gradle.mustache | 2 +- .../htmlDocs2/css_bootstrap.mustache | 2 +- .../resources/htmlDocs2/js_bootstrap.mustache | 2 +- .../kotlin-client/build.gradle.mustache | 4 +- .../libraries/ktor/build.gradle.mustache | 4 +- .../spring-boot/buildGradleKts.mustache | 6 +-- .../assets/css/bootstrap-responsive.css | 2 +- .../openapi-static/assets/css/bootstrap.css | 2 +- .../openapi-static/assets/js/bootstrap.js | 26 ++++----- .../StrictJsonDeserializationVisitor.mustache | 2 +- .../TypeMismatchException.mustache | 2 +- .../main/resources/scala-gatling/build.gradle | 2 +- .../scala-httpclient/build.gradle.mustache | 2 +- .../resources/scala-httpclient/pom.mustache | 3 +- .../src/main/resources/scalatra/sbt | 8 +-- .../codegen/AbstractIntegrationTest.java | 2 +- .../codegen/AbstractOptionsTest.java | 2 +- .../codegen/DefaultCodegenTest.java | 2 +- .../codegen/InlineModelResolverTest.java | 2 +- .../codegen/MockDefaultGenerator.java | 2 +- .../android/AndroidClientCodegenTest.java | 2 +- .../codegen/bash/BashClientOptionsTest.java | 2 +- .../openapitools/codegen/bash/BashTest.java | 2 +- .../config/CodegenConfiguratorTest.java | 2 +- .../csharp/CSharpClientCodegenTest.java | 2 +- .../codegen/csharp/CSharpModelTest.java | 2 +- .../codegen/csharp/CsharpModelEnumTest.java | 2 +- .../codegen/dart/DartClientCodegenTest.java | 2 +- .../codegen/dart/DartClientOptionsTest.java | 2 +- .../codegen/dart/DartModelTest.java | 2 +- .../dartdio/DartDioClientCodegenTest.java | 2 +- .../dartdio/DartDioClientOptionsTest.java | 2 +- .../codegen/dartdio/DartDioModelTest.java | 2 +- .../eiffel/AbstractEiffelCodegenTest.java | 2 +- .../eiffel/EiffelClientCodegenTest.java | 2 +- .../elixir/ElixirClientOptionsTest.java | 2 +- .../codegen/elm/ElmClientCodegenTest.java | 2 +- .../fsharp/FSharpServerCodegenTest.java | 2 +- .../codegen/go/AbstractGoCodegenTest.java | 2 +- .../codegen/go/GoClientCodegenTest.java | 2 +- .../codegen/go/GoClientOptionsTest.java | 2 +- .../openapitools/codegen/go/GoModelTest.java | 2 +- .../HaskellHttpClientCodegenTest.java | 2 +- .../haskellservant/HaskellModelTest.java | 2 +- .../HaskellServantCodegenTest.java | 2 +- .../HaskellServantOptionsTest.java | 2 +- .../codegen/html/StaticHtmlGeneratorTest.java | 2 +- .../codegen/java/AbstractJavaCodegenTest.java | 2 +- .../java/JavaCXFClientCodegenTest.java | 2 +- .../codegen/java/JavaClientCodegenTest.java | 2 +- .../codegen/java/JavaInheritanceTest.java | 2 +- .../codegen/java/JavaModelEnumTest.java | 2 +- .../codegen/java/JavaModelTest.java | 2 +- .../AbstractJavaJAXRSServerCodegenTest.java | 2 +- .../play/JavaPlayFrameworkCodegenTest.java | 2 +- .../java/spring/SpringCodegenTest.java | 2 +- .../JavascriptClientCodegenTest.java | 2 +- ...scriptClosureAngularClientCodegenTest.java | 2 +- .../kotlin/KotlinClientCodegenModelTest.java | 2 +- .../codegen/lua/LuaClientCodegenTest.java | 2 +- .../lumen/PhpLumenServerOptionsTest.java | 2 +- .../codegen/mysql/MysqlSchemaCodegenTest.java | 2 +- .../codegen/mysql/MysqlSchemaOptionsTest.java | 2 +- .../codegen/objc/ObjcClientCodegenTest.java | 2 +- .../codegen/objc/ObjcClientOptionsTest.java | 2 +- .../codegen/objc/ObjcModelTest.java | 2 +- .../options/BashClientOptionsProvider.java | 2 +- .../options/DartClientOptionsProvider.java | 2 +- .../options/DartDioClientOptionsProvider.java | 2 +- .../options/ElixirClientOptionsProvider.java | 2 +- .../options/GoClientOptionsProvider.java | 2 +- .../options/GoGinServerOptionsProvider.java | 2 +- .../options/GoServerOptionsProvider.java | 2 +- .../HaskellServantOptionsProvider.java | 2 +- .../options/MysqlSchemaOptionsProvider.java | 2 +- .../options/ObjcClientOptionsProvider.java | 2 +- .../codegen/options/OptionsProvider.java | 2 +- .../options/PerlClientOptionsProvider.java | 2 +- .../options/PhpClientOptionsProvider.java | 2 +- .../PhpLumenServerOptionsProvider.java | 2 +- .../PhpSilexServerOptionsProvider.java | 2 +- .../PhpSlim4ServerOptionsProvider.java | 2 +- .../options/PhpSlimServerOptionsProvider.java | 2 +- .../options/PythonClientOptionsProvider.java | 2 +- .../options/RubyClientOptionsProvider.java | 2 +- .../RubySinatraServerOptionsProvider.java | 2 +- .../ScalaAkkaClientOptionsProvider.java | 2 +- .../ScalaHttpClientOptionsProvider.java | 2 +- .../options/Swift3OptionsProvider.java | 2 +- .../options/Swift4OptionsProvider.java | 2 +- .../options/Swift5OptionsProvider.java | 2 +- ...ypeScriptAngularClientOptionsProvider.java | 2 +- ...eScriptAngularJsClientOptionsProvider.java | 2 +- ...ypeScriptAureliaClientOptionsProvider.java | 2 +- .../TypeScriptFetchClientOptionsProvider.java | 2 +- .../TypeScriptNodeClientOptionsProvider.java | 2 +- .../codegen/perl/PerlClientCodegenTest.java | 2 +- .../codegen/perl/PerlClientOptionsTest.java | 2 +- .../codegen/php/AbstractPhpCodegenTest.java | 2 +- .../codegen/php/PhpClientCodegenTest.java | 2 +- .../codegen/php/PhpClientExampleTest.java | 2 +- .../codegen/php/PhpClientOptionsTest.java | 2 +- .../php/PhpLaravelServerCodegenTest.java | 2 +- .../codegen/php/PhpModelTest.java | 2 +- .../php/PhpSymfonyServerCodegenTest.java | 2 +- .../protobuf/ProtobufSchemaCodegenTest.java | 2 +- .../python/PythonClientCodegenTest.java | 2 +- .../python/PythonClientExperimentalTest.java | 2 +- .../python/PythonClientOptionsTest.java | 2 +- .../codegen/python/PythonTest.java | 2 +- .../codegen/r/RClientCodegenTest.java | 2 +- .../codegen/ruby/RubyClientCodegenTest.java | 2 +- .../codegen/ruby/RubyClientOptionsTest.java | 2 +- .../RubySinatraServerOptionsTest.java | 2 +- .../codegen/rust/RustClientCodegenTest.java | 2 +- .../scalaakka/ScalaAkkaClientCodegenTest.java | 2 +- .../scalaakka/ScalaAkkaClientOptionsTest.java | 2 +- .../ScalaHttpClientModelTest.java | 2 +- .../ScalaHttpClientOptionsTest.java | 2 +- .../silex/PhpSilexServerOptionsTest.java | 2 +- .../slim/PhpSlimServerCodegenTest.java | 2 +- .../slim/PhpSlimServerOptionsTest.java | 2 +- .../slim4/PhpSlim4ServerCodegenTest.java | 2 +- .../slim4/PhpSlim4ServerOptionsTest.java | 2 +- .../codegen/swift3/Swift3CodegenTest.java | 2 +- .../codegen/swift3/Swift3ModelTest.java | 2 +- .../codegen/swift3/Swift3OptionsTest.java | 2 +- .../codegen/swift4/Swift4CodegenTest.java | 2 +- .../codegen/swift4/Swift4ModelEnumTest.java | 2 +- .../codegen/swift4/Swift4ModelTest.java | 2 +- .../codegen/swift4/Swift4OptionsTest.java | 2 +- .../swift5/Swift5ClientCodegenTest.java | 2 +- .../codegen/swift5/Swift5ModelEnumTest.java | 2 +- .../codegen/swift5/Swift5ModelTest.java | 2 +- .../codegen/swift5/Swift5OptionsTest.java | 2 +- .../mustache/SplitStringLambdaTest.java | 2 +- .../mustache/TrimWhitespaceLambdaTest.java | 2 +- .../codegen/testutils/AssertFile.java | 2 +- .../testutils/IntegrationTestPathsConfig.java | 2 +- .../TypeScriptAureliaClientOptionsTest.java | 2 +- .../TypeScriptFetchClientOptionsTest.java | 2 +- .../fetch/TypeScriptFetchModelTest.java | 2 +- .../TypeScriptAngularClientOptionsTest.java | 2 +- .../TypeScriptAngularModelTest.java | 2 +- ...arAdditionalPropertiesIntegrationTest.java | 2 +- ...tAngularArrayAndObjectIntegrationTest.java | 2 +- ...pescriptAngularPestoreIntegrationTest.java | 2 +- .../TypeScriptAngularJsClientOptionsTest.java | 2 +- .../TypeScriptAngularJsModelTest.java | 2 +- .../TypeScriptNodeClientOptionsTest.java | 2 +- .../TypeScriptNodeModelTest.java | 2 +- .../TypescriptNodeES5IntegrationTest.java | 2 +- .../TypescriptNodeEnumIntegrationTest.java | 2 +- .../codegen/utils/JsonCacheTest.java | 2 +- .../codegen/utils/ModelUtilsTest.java | 2 +- .../codegen/utils/URLPathUtilsTest.java | 2 +- .../codegen/yaml/YamlGeneratorTest.java | 2 +- .../test/resources/1_2/petstore-1.2/api-docs | 2 +- .../test/resources/2_0/binaryDataTest.json | 2 +- .../test/resources/2_0/datePropertyTest.json | 2 +- .../test/resources/2_0/fileResponseTest.json | 2 +- .../2_0/globalConsumesAndProduces.json | 2 +- .../test/resources/2_0/globalSecurity.json | 2 +- .../2_0/long_description_issue_7839.json | 2 +- .../src/test/resources/2_0/petstore-bash.json | 2 +- .../test/resources/2_0/petstore-nullable.yaml | 2 +- .../src/test/resources/2_0/petstore-orig.json | 2 +- .../test/resources/2_0/petstore-proto.yaml | 2 +- .../resources/2_0/petstore-security-test.yaml | 2 +- .../resources/2_0/petstore-vendor-mime.yaml | 2 +- .../2_0/petstore-with-date-field.yaml | 2 +- ...ith-fake-endpoints-models-for-testing.yaml | 2 +- .../src/test/resources/2_0/petstore.json | 2 +- .../src/test/resources/2_0/petstore.yaml | 2 +- .../resources/2_0/petstore_issue_7999.json | 2 +- .../src/test/resources/2_0/postBodyTest.json | 2 +- ...ith-fake-endpoints-models-for-testing.yaml | 2 +- .../2_0/refAliasedPrimitiveWithValidation.yml | 2 +- .../src/test/resources/2_0/requiredTest.json | 2 +- .../resources/2_0/responseHeaderTest.yaml | 2 +- .../resources/2_0/responseSelectionTest.json | 2 +- ...ith-fake-endpoints-models-for-testing.yaml | 2 +- ...ith-fake-endpoints-models-for-testing.yaml | 2 +- .../src/test/resources/3_0/examples.yaml | 2 +- .../src/test/resources/3_0/fromParameter.yaml | 2 +- .../src/test/resources/3_0/issue-4062.yaml | 2 +- .../src/test/resources/3_0/issue392.yaml | 2 +- .../src/test/resources/3_0/issue4584.yaml | 2 +- .../src/test/resources/3_0/issue796.yaml | 2 +- .../src/test/resources/3_0/issue_2053.yaml | 2 +- .../src/test/resources/3_0/issue_3248.yaml | 2 +- .../test/resources/3_0/objectQueryParam.yaml | 2 +- .../3_0/petstore-with-complex-headers.yaml | 2 +- ...ith-fake-endpoints-models-for-testing.yaml | 2 +- .../3_0/petstore-with-nullable-required.yaml | 2 +- .../src/test/resources/3_0/petstore.json | 2 +- .../src/test/resources/3_0/petstore.yaml | 2 +- .../resources/3_0/petstore_oas3_test.yaml | 2 +- .../src/test/resources/3_0/produces.yaml | 2 +- .../additional-properties-expected/LICENSE | 2 +- .../api/user.service.ts | 2 +- .../model/user.ts | 2 +- .../additional-properties-spec.json | 2 +- .../array-and-object-expected/LICENSE | 2 +- .../api/project.service.ts | 2 +- .../model/projectEntity.ts | 2 +- .../model/projectEntityLocation.ts | 2 +- .../model/projectList.ts | 2 +- .../typescript/node-es5-expected/LICENSE | 2 +- .../typescript/node-es5-expected/api.ts | 2 +- .../typescript/node-es5-spec.json | 2 +- .../typescript/petstore-expected/LICENSE | 2 +- .../petstore-expected/api/pet.service.ts | 2 +- .../petstore-expected/api/store.service.ts | 2 +- .../petstore-expected/api/user.service.ts | 2 +- .../petstore-expected/model/apiResponse.ts | 2 +- .../petstore-expected/model/category.ts | 2 +- .../petstore-expected/model/order.ts | 2 +- .../typescript/petstore-expected/model/pet.ts | 2 +- .../typescript/petstore-expected/model/tag.ts | 2 +- .../petstore-expected/model/user.ts | 2 +- .../typescript/petstore-spec.json | 2 +- .../src/test/resources/petstore.json | 2 +- mvnw | 2 +- mvnw.cmd | 2 +- pom.xml | 2 +- samples/client/petstore/bash/client.sh | 2 +- samples/client/petstore/bash/petstore-cli | 2 +- samples/client/petstore/clojure/project.clj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../ios/Flutter/flutter_assets/LICENSE | 4 +- .../ios/Flutter/flutter_assets/LICENSE | 4 +- .../go-petstore/api/openapi.yaml | 2 +- .../go/go-petstore-withXml/api/openapi.yaml | 2 +- .../petstore/go/go-petstore/api/openapi.yaml | 2 +- samples/client/petstore/groovy/build.gradle | 2 +- .../petstore/haskell-http-client/openapi.yaml | 2 +- .../client/petstore/java/feign/build.gradle | 2 +- samples/client/petstore/java/feign/pom.xml | 2 +- .../petstore/java/feign10x/build.gradle | 2 +- samples/client/petstore/java/feign10x/pom.xml | 2 +- .../java/google-api-client/build.gradle | 2 +- .../petstore/java/google-api-client/pom.xml | 2 +- .../client/petstore/java/jersey1/build.gradle | 4 +- samples/client/petstore/java/jersey1/pom.xml | 2 +- .../petstore/java/jersey2-java6/pom.xml | 2 +- .../petstore/java/jersey2-java8/build.gradle | 2 +- .../petstore/java/jersey2-java8/pom.xml | 2 +- .../client/petstore/java/jersey2/build.gradle | 2 +- samples/client/petstore/java/jersey2/pom.xml | 2 +- .../openapitools/client/api/ApiException.java | 2 +- .../client/api/ApiExceptionMapper.java | 2 +- .../org/openapitools/client/api/PetApi.java | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../org/openapitools/client/api/UserApi.java | 2 +- .../openapitools/client/model/Category.java | 2 +- .../client/model/ModelApiResponse.java | 2 +- .../org/openapitools/client/model/Order.java | 2 +- .../org/openapitools/client/model/Pet.java | 2 +- .../org/openapitools/client/model/Tag.java | 2 +- .../org/openapitools/client/model/User.java | 2 +- .../openapitools/client/api/PetApiTest.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../openapitools/client/api/UserApiTest.java | 2 +- .../client/model/CategoryTest.java | 2 +- .../client/model/ModelApiResponseTest.java | 2 +- .../openapitools/client/model/OrderTest.java | 2 +- .../openapitools/client/model/PetTest.java | 2 +- .../openapitools/client/model/TagTest.java | 2 +- .../openapitools/client/model/UserTest.java | 2 +- .../client/petstore/java/native/build.gradle | 4 +- samples/client/petstore/java/native/pom.xml | 2 +- .../okhttp-gson-parcelableModel/build.gradle | 2 +- .../java/okhttp-gson-parcelableModel/pom.xml | 2 +- .../petstore/java/okhttp-gson/build.gradle | 2 +- .../client/petstore/java/okhttp-gson/pom.xml | 2 +- .../petstore/java/rest-assured/build.gradle | 2 +- .../client/petstore/java/rest-assured/pom.xml | 2 +- .../petstore/java/resteasy/build.gradle | 2 +- samples/client/petstore/java/resteasy/pom.xml | 2 +- .../java/resttemplate-withXml/build.gradle | 2 +- .../java/resttemplate-withXml/pom.xml | 2 +- .../petstore/java/resttemplate/build.gradle | 2 +- .../client/petstore/java/resttemplate/pom.xml | 2 +- .../petstore/java/retrofit/build.gradle | 2 +- samples/client/petstore/java/retrofit/pom.xml | 2 +- .../java/retrofit2-play24/build.gradle | 2 +- .../petstore/java/retrofit2-play24/pom.xml | 2 +- .../java/retrofit2-play25/build.gradle | 2 +- .../petstore/java/retrofit2-play25/pom.xml | 2 +- .../java/retrofit2-play26/build.gradle | 2 +- .../petstore/java/retrofit2-play26/pom.xml | 2 +- .../petstore/java/retrofit2/build.gradle | 2 +- .../client/petstore/java/retrofit2/pom.xml | 2 +- .../petstore/java/retrofit2rx/build.gradle | 2 +- .../client/petstore/java/retrofit2rx/pom.xml | 2 +- .../petstore/java/retrofit2rx2/build.gradle | 2 +- .../client/petstore/java/retrofit2rx2/pom.xml | 2 +- .../client/petstore/java/vertx/build.gradle | 2 +- samples/client/petstore/java/vertx/pom.xml | 2 +- .../petstore/java/webclient/build.gradle | 4 +- .../client/petstore/java/webclient/pom.xml | 2 +- .../API/Client/PetApi.js | 2 +- .../API/Client/StoreApi.js | 2 +- .../API/Client/UserApi.js | 2 +- .../lib/goog/base.js | 2 +- .../java/org/openapitools/api/PetApiTest.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../org/openapitools/api/UserApiTest.java | 2 +- .../client/petstore/kotlin-gson/build.gradle | 4 +- .../kotlin-json-request-date/build.gradle | 4 +- .../kotlin-moshi-codegen/build.gradle | 4 +- .../petstore/kotlin-nonpublic/build.gradle | 4 +- .../petstore/kotlin-nullable/build.gradle | 4 +- .../petstore/kotlin-okhttp3/build.gradle | 4 +- .../petstore/kotlin-retrofit2/build.gradle | 4 +- .../petstore/kotlin-string/build.gradle | 4 +- .../petstore/kotlin-threetenbp/build.gradle | 4 +- samples/client/petstore/kotlin/build.gradle | 4 +- .../org/openapitools/client/ApiInvoker.scala | 2 +- .../org/openapitools/client/api/PetApi.scala | 53 +++++++++++++++---- .../openapitools/client/api/StoreApi.scala | 29 +++++++--- .../org/openapitools/client/api/UserApi.scala | 53 +++++++++++++++---- .../client/model/ApiResponse.scala | 2 +- .../openapitools/client/model/Category.scala | 2 +- .../org/openapitools/client/model/Order.scala | 2 +- .../org/openapitools/client/model/Pet.scala | 2 +- .../org/openapitools/client/model/Tag.scala | 2 +- .../org/openapitools/client/model/User.scala | 2 +- .../client/petstore/scala-httpclient/pom.xml | 3 +- .../typescript-angular-v2/default/LICENSE | 2 +- .../docs/assets/css/bootstrap-responsive.css | 2 +- .../docs/assets/css/bootstrap.css | 2 +- .../dynamic-html/docs/assets/js/bootstrap.js | 26 ++++----- samples/documentation/html/index.html | 2 +- samples/documentation/html2/index.html | 6 +-- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../go-petstore/api/openapi.yaml | 2 +- .../petstore/go/go-petstore/api/openapi.yaml | 2 +- .../petstore/go-api-server/api/openapi.yaml | 2 +- .../go-gin-api-server/api/openapi.yaml | 2 +- .../StrictJsonDeserializationVisitor.php | 2 +- .../Service/TypeMismatchException.php | 2 +- .../openapi_server/openapi/openapi.yaml | 2 +- .../openapi_server/openapi/openapi.yaml | 2 +- .../wwwroot/openapi-original.json | 2 +- .../petstore/erlang-server/priv/openapi.json | 2 +- .../petstore/go-api-server/api/openapi.yaml | 2 +- .../go-gin-api-server/api/openapi.yaml | 2 +- .../server/petstore/java-inflector/pom.xml | 2 +- .../src/main/openapi/openapi.yaml | 2 +- .../LICENSE | 2 +- .../public/openapi.json | 2 +- .../java-play-framework-async/LICENSE | 2 +- .../public/openapi.json | 2 +- .../LICENSE | 2 +- .../public/openapi.json | 2 +- .../LICENSE | 2 +- .../public/openapi.json | 2 +- .../LICENSE | 2 +- .../public/openapi.json | 2 +- .../LICENSE | 2 +- .../public/openapi.json | 2 +- .../java-play-framework-no-interface/LICENSE | 2 +- .../public/openapi.json | 2 +- .../java-play-framework-no-swagger-ui/LICENSE | 2 +- .../java-play-framework-no-wrap-calls/LICENSE | 2 +- .../public/openapi.json | 2 +- .../petstore/java-play-framework/LICENSE | 2 +- .../java-play-framework/public/openapi.json | 2 +- .../src/main/resources/config/openapi.json | 2 +- .../rx/src/main/resources/openapi.yaml | 2 +- .../async/src/main/resources/openapi.json | 2 +- .../rx/src/main/resources/openapi.json | 2 +- .../java/org/openapitools/api/PetApiTest.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../org/openapitools/api/UserApiTest.java | 2 +- .../java/org/openapitools/api/PetApiTest.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../org/openapitools/api/UserApiTest.java | 2 +- .../openapitools/api/AnotherFakeApiTest.java | 2 +- .../org/openapitools/api/FakeApiTest.java | 2 +- .../api/FakeClassnameTags123ApiTest.java | 2 +- .../java/org/openapitools/api/PetApiTest.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../org/openapitools/api/UserApiTest.java | 2 +- .../openapitools/api/AnotherFakeApiTest.java | 2 +- .../org/openapitools/api/FakeApiTest.java | 2 +- .../api/FakeClassnameTags123ApiTest.java | 2 +- .../java/org/openapitools/api/PetApiTest.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../org/openapitools/api/UserApiTest.java | 2 +- .../server/petstore/jaxrs-datelib-j8/pom.xml | 2 +- .../java/org/openapitools/api/Bootstrap.java | 2 +- samples/server/petstore/jaxrs-jersey/pom.xml | 2 +- .../java/org/openapitools/api/Bootstrap.java | 2 +- .../jaxrs-resteasy/eap-java8/build.gradle | 2 +- .../jaxrs-resteasy/eap-joda/build.gradle | 2 +- .../petstore/jaxrs-resteasy/eap/build.gradle | 2 +- .../src/main/openapi/openapi.yaml | 2 +- .../src/main/openapi/openapi.yaml | 2 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 2 +- .../java/org/openapitools/api/Bootstrap.java | 2 +- .../java/org/openapitools/api/Bootstrap.java | 2 +- .../petstore/jaxrs/jersey2-useTags/pom.xml | 2 +- .../java/org/openapitools/api/Bootstrap.java | 2 +- samples/server/petstore/jaxrs/jersey2/pom.xml | 2 +- .../java/org/openapitools/api/Bootstrap.java | 2 +- .../petstore/kotlin-server/ktor/build.gradle | 4 +- .../build.gradle.kts | 6 +-- .../kotlin-springboot/build.gradle.kts | 6 +-- .../src/IO.Swagger/IO.Swagger.nuspec | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../nodejs-express-server/api/openapi.yaml | 2 +- .../nodejs-express-server/api/swagger.yaml | 2 +- .../StrictJsonDeserializationVisitor.php | 2 +- .../Service/TypeMismatchException.php | 2 +- .../openapi_server/openapi/openapi.yaml | 2 +- .../openapi_server/openapi/openapi.yaml | 2 +- .../openapi_server/openapi/openapi.yaml | 2 +- .../server/petstore/ruby-sinatra/openapi.yaml | 2 +- .../server/petstore/ruby-sinatra/swagger.yaml | 2 +- .../api/openapi.yaml | 2 +- .../scala-play-server/public/openapi.json | 2 +- samples/server/petstore/scalatra/sbt | 8 +-- .../scalatra/src/main/scala/ServletApp.scala | 2 +- .../OpenAPIDocumentationConfig.java | 2 +- .../SwaggerDocumentationConfig.java | 2 +- .../OpenAPIDocumentationConfig.java | 2 +- .../SwaggerDocumentationConfig.java | 2 +- .../OpenAPIDocumentationConfig.java | 2 +- .../OpenAPIDocumentationConfig.java | 2 +- .../OpenAPIDocumentationConfig.java | 2 +- .../OpenAPIDocumentationConfig.java | 2 +- .../OpenAPIDocumentationConfig.java | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../OpenAPIDocumentationConfig.java | 2 +- .../OpenAPIDocumentationConfig.java | 2 +- .../OpenAPIDocumentationConfig.java | 2 +- samples/yaml/api-docs.yml | 2 +- 771 files changed, 962 insertions(+), 877 deletions(-) diff --git a/LICENSE b/LICENSE index c806b7a847..310853b896 100644 --- a/LICENSE +++ b/LICENSE @@ -193,7 +193,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/appveyor.yml b/appveyor.yml index afafbd2e70..b029aa6944 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ # for CI with appveyor.yml -# Ref: http://www.yegor256.com/2015/01/10/windows-appveyor-maven.html +# Ref: https://www.yegor256.com/2015/01/10/windows-appveyor-maven.html version: '{branch}-{build}' image: Visual Studio 2017 hosts: diff --git a/bin/utils/release/bump.sh b/bin/utils/release/bump.sh index 1afeffde16..1de9df213d 100755 --- a/bin/utils/release/bump.sh +++ b/bin/utils/release/bump.sh @@ -8,7 +8,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/bin/utils/release/release_version_update.sh b/bin/utils/release/release_version_update.sh index abc227a202..95d41712c5 100755 --- a/bin/utils/release/release_version_update.sh +++ b/bin/utils/release/release_version_update.sh @@ -11,7 +11,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/bin/utils/release/release_version_update_docs.sh b/bin/utils/release/release_version_update_docs.sh index 287b9a3e7d..9a47f86bbf 100755 --- a/bin/utils/release/release_version_update_docs.sh +++ b/bin/utils/release/release_version_update_docs.sh @@ -11,7 +11,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/bin/utils/release_checkout.rb b/bin/utils/release_checkout.rb index 8f82bf4bdc..2ceabba344 100755 --- a/bin/utils/release_checkout.rb +++ b/bin/utils/release_checkout.rb @@ -75,9 +75,9 @@ def check_readme url = "https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/README.md" matches = ["[#{$version}](https://github.com/OpenAPITools/openapi-generator/releases/tag/v#{$version})", - "JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar`", - "wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar -O openapi-generator-cli.jar", - "Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar"] + "JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar`", + "wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar -O openapi-generator-cli.jar", + "Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar"] open(url) do |f| content = f.read has_outdated = false @@ -104,7 +104,7 @@ end def check_openapi_generator_jar print "Checking openapi-generator JAR ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator/#{$version}/openapi-generator-#{$version}.jar" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator/#{$version}/openapi-generator-#{$version}.jar" if check_url(url) puts "[OK]" @@ -118,7 +118,7 @@ end def check_openapi_generator_cli_jar print "Checking openapi-generator-cli JAR ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar" if check_url(url) puts "[OK]" @@ -130,7 +130,7 @@ end def check_openapi_generator_maven_plugin_jar print "Checking openapi-generator-maven-plugin JAR ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator-maven-plugin/#{$version}/openapi-generator-maven-plugin-#{$version}.jar" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-maven-plugin/#{$version}/openapi-generator-maven-plugin-#{$version}.jar" if check_url(url) puts "[OK]" @@ -142,7 +142,7 @@ end def check_openapi_generator_gradle_plugin_jar print "Checking openapi-generator-gradle-plugin JAR ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator-gradle-plugin/#{$version}/openapi-generator-gradle-plugin-#{$version}.jar" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-gradle-plugin/#{$version}/openapi-generator-gradle-plugin-#{$version}.jar" if check_url(url) puts "[OK]" @@ -154,7 +154,7 @@ end def check_openapi_generator_online_jar print "Checking openapi-generator-online JAR ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator-online/#{$version}/openapi-generator-online-#{$version}.jar" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-online/#{$version}/openapi-generator-online-#{$version}.jar" if check_url(url) puts "[OK]" @@ -166,7 +166,7 @@ end def check_openapi_generator_project_pom print "Checking openapi-generator-project pom.xml ... " - url = "http://central.maven.org/maven2/org/openapitools/openapi-generator-project/#{$version}/openapi-generator-project-#{$version}.pom" + url = "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-project/#{$version}/openapi-generator-project-#{$version}.pom" if check_url(url) puts "[OK]" diff --git a/bin/utils/release_version_update_docs.sh b/bin/utils/release_version_update_docs.sh index df743e8e47..c6b8f12921 100755 --- a/bin/utils/release_version_update_docs.sh +++ b/bin/utils/release_version_update_docs.sh @@ -8,7 +8,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/docs/building.md b/docs/building.md index aa029b4cb6..257721f418 100644 --- a/docs/building.md +++ b/docs/building.md @@ -7,9 +7,9 @@ title: Building the code To build from source, you need the following installed and available in your `$PATH:` -* [Java 8](http://java.oracle.com) +* [Java 8](https://java.oracle.com) -* [Apache maven 3.3.4 or greater](http://maven.apache.org/) +* [Apache maven 3.3.4 or greater](https://maven.apache.org/) After cloning the project, you can build it from source with this command: @@ -53,7 +53,7 @@ Once built, `run-in-docker.sh` will act as an executable for openapi-generator-c Prerequisite: install [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads). ```bash -git clone http://github.com/openapitools/openapi-generator.git +git clone https://github.com/openapitools/openapi-generator.git cd openapi-generator vagrant up vagrant ssh diff --git a/docs/installation.md b/docs/installation.md index 0c555d1350..16cc1005f0 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -79,18 +79,18 @@ docker run --rm \ If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar` For **Mac/Linux** users: ```bash -wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar -O openapi-generator-cli.jar +wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar ``` After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. diff --git a/docs/plugins.md b/docs/plugins.md index 923d1ea24e..213c839992 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -51,7 +51,7 @@ To include in your project, add the following to `build.gradle`: buildscript { repositories { mavenLocal() - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } } dependencies { classpath "org.openapitools:openapi-generator-gradle-plugin:3.3.4" diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java index 5806bc6312..8770c48a35 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/OpenAPIGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/CompletionCommand.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/CompletionCommand.java index 2ffa120835..369137fa9f 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/CompletionCommand.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/CompletionCommand.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java index 3033560fca..feb0f35f74 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java index 99080ba9c0..cf8f8a1dd3 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java index bbcab6c446..f1e6632b33 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java index aad40007de..2326dcadf2 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java index 4011a44888..153475f503 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Validate.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Version.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Version.java index eb6bfa5608..93e2b378a7 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Version.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Version.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java index a2304283d6..8f1879dd98 100644 --- a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java +++ b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/GenerateTest.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/utils/OptionUtilsTest.java b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/utils/OptionUtilsTest.java index 143659b556..37c4039423 100644 --- a/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/utils/OptionUtilsTest.java +++ b/modules/openapi-generator-cli/src/test/java/org/openapitools/codegen/cmd/utils/OptionUtilsTest.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/AbstractTemplatingEngineAdapter.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/AbstractTemplatingEngineAdapter.java index cc6786bb53..6c568f6ad3 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/AbstractTemplatingEngineAdapter.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/AbstractTemplatingEngineAdapter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingEngineAdapter.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingEngineAdapter.java index 7923026782..93b371c963 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingEngineAdapter.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingEngineAdapter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java index ddafbc0345..57a4d0f3df 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/api/TemplatingGenerator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java index 6bd2588ae1..4aceaacb2c 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/Context.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java index e0772f8aea..495ac2df1a 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/GeneratorSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java index 174109f37b..2bc94188cf 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java index 3279eb9737..3d93eefd93 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/FeatureSet.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java index aa8aee1091..c4bf3d369e 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/GeneratorMetadata.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java index 00c672284e..bc79af2430 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/Stability.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java index de5cba65a1..3e5a2ad125 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ClientModificationFeature.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java index bfb7477a20..7a86144c68 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DataTypeFeature.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java index 5bedfa40ef..dda611e474 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/DocumentationFeature.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java index 9120619d9c..f8b2a6d0b6 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/GlobalFeature.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java index 07f9225a0f..6c9a3d6b88 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/ParameterFeature.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java index e9351638c6..e8a2a65198 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SchemaSupportFeature.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java index 592d3e0122..194141e8d3 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/SecurityFeature.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java index 0de757355f..d7b888e12b 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/WireFormatFeature.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java index 1f233021f1..3926cfa797 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS2.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java index 78542ffcea..75f5b2fc34 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/OAS3.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java index e592b915dd..5751417bf0 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/meta/features/annotations/ToolingExtension.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java index 2cac087605..c095bc5abd 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/GenericValidator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java index 2f3745ebf0..ad59a62853 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Invalid.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java index 7818dfd620..e03d0f68c5 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Severity.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java index d31443dca2..350f118ed0 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Valid.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java index 4800cd9ce7..2df3b9c3ae 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validated.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java index 166ce2b2df..374c354454 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationResult.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java index b774e8653d..e220e0482c 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/ValidationRule.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java index a47e829fe6..fdf23fb366 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/validation/Validator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/config/WorkflowSettingsTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/config/WorkflowSettingsTest.java index c375e98df2..3ab0048677 100644 --- a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/config/WorkflowSettingsTest.java +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/config/WorkflowSettingsTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java index 0a258d2a13..d37dc827c8 100644 --- a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/GenericValidatorTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java index 8109461de5..44cf125f5c 100644 --- a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidatedTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java index afa6c02ff5..ce0fa165ce 100644 --- a/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java +++ b/modules/openapi-generator-core/src/test/java/org/openapitools/codegen/validation/ValidationRuleTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 806e7734ef..88ef8a1f5e 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -56,7 +56,7 @@ Using https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_appl buildscript { repositories { mavenLocal() - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } // or, via Gradle Plugin Portal: // url "https://plugins.gradle.org/m2/" } diff --git a/modules/openapi-generator-gradle-plugin/build.gradle b/modules/openapi-generator-gradle-plugin/build.gradle index fa60040099..8dd9dfa068 100644 --- a/modules/openapi-generator-gradle-plugin/build.gradle +++ b/modules/openapi-generator-gradle-plugin/build.gradle @@ -2,7 +2,7 @@ buildscript { ext.kotlin_version = '1.3.20' repositories { mavenLocal() - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } maven { url "https://plugins.gradle.org/m2/" } @@ -46,7 +46,7 @@ targetCompatibility = 1.8 repositories { jcenter() - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } mavenLocal() maven { url "https://oss.sonatype.org/content/repositories/releases/" @@ -119,7 +119,7 @@ publishing { licenses { license { name = "The Apache Software License, Version 2.0" - url = "http://www.apache.org/licenses/LICENSE-2.0.txt" + url = "https://www.apache.org/licenses/LICENSE-2.0.txt" distribution = "repo" } } diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle index 99e3d0f674..6241891c60 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle @@ -1,7 +1,7 @@ buildscript { repositories { mavenLocal() - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } maven { url "https://plugins.gradle.org/m2/" } diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt index 07afe14b5e..f69052bc67 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt index d7bce4b9b2..55dee4400e 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt index 53de4c037e..585eaee884 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGeneratorsExtension.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorMetaExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorMetaExtension.kt index 94d298a31b..e78070ab12 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorMetaExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorMetaExtension.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt index 3b4a1853b9..cbf525bd7c 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorValidateExtension.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index a0f2ceccf6..0ffc93cf4f 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GeneratorsTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GeneratorsTask.kt index b32a1c1e9b..3960a95de6 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GeneratorsTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GeneratorsTask.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/MetaTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/MetaTask.kt index 7d11f4d8b6..6a4a180665 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/MetaTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/MetaTask.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt index 0956ba22c2..6e5283163b 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/ValidateTask.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml index c0416bfe6b..bc5e8d7f3b 100644 --- a/modules/openapi-generator-maven-plugin/examples/java-client.xml +++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml @@ -5,7 +5,7 @@ jar 1.0-SNAPSHOT sample-project - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/kotlin.xml b/modules/openapi-generator-maven-plugin/examples/kotlin.xml index 83b54be3da..3a2979232c 100644 --- a/modules/openapi-generator-maven-plugin/examples/kotlin.xml +++ b/modules/openapi-generator-maven-plugin/examples/kotlin.xml @@ -6,7 +6,7 @@ jar 1.0-SNAPSHOT sample-project - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml index e3cdcca022..643bf333dd 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml @@ -11,7 +11,7 @@ jar 1.0-SNAPSHOT java-client - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml index 5e4a60c7f1..058c89c3bd 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml @@ -5,7 +5,7 @@ pom 1.0-SNAPSHOT parent-project - http://maven.apache.org + https://maven.apache.org sample-schema diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/pom.xml index ee143b27a5..6ad8699375 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/pom.xml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/pom.xml @@ -12,7 +12,7 @@ jar 1.0-SNAPSHOT sample-schema - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml b/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml index c6d37b2575..fffd7f152b 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml @@ -2,17 +2,17 @@ swagger: "2.0" info: description: "This is a sample server Petstore server. You can find out more about\ - \ Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\ + \ Swagger at [https://swagger.io](https://swagger.io) or on [irc.freenode.net, #swagger](https://swagger.io/irc/).\ \ For this sample, you can use the api key `special-key` to test the authorization\ \ filters." version: "1.0.0" title: "Swagger Petstore" - termsOfService: "http://swagger.io/terms/" + termsOfService: "https://swagger.io/terms/" contact: email: "apiteam@swagger.io" license: name: "Apache 2.0" - url: "http://www.apache.org/licenses/LICENSE-2.0.html" + url: "https://www.apache.org/licenses/LICENSE-2.0.html" host: "petstore.swagger.io" basePath: "/v2" tags: @@ -20,14 +20,14 @@ tags: description: "Everything about your Pets" externalDocs: description: "Find out more" - url: "http://swagger.io" + url: "https://swagger.io" - name: "store" description: "Access to Petstore orders" - name: "user" description: "Operations about user" externalDocs: description: "Find out more about our store" - url: "http://swagger.io" + url: "https://swagger.io" schemes: - "http" paths: @@ -699,4 +699,4 @@ definitions: type: "string" externalDocs: description: "Find out more about Swagger" - url: "http://swagger.io" + url: "https://swagger.io" diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml index 81f008570a..e05fd2eef0 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml @@ -5,7 +5,7 @@ jar 1.0-SNAPSHOT sample-project - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml index 2ec02ae10f..469d1eb1c7 100644 --- a/modules/openapi-generator-maven-plugin/examples/non-java.xml +++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml @@ -5,7 +5,7 @@ jar 1.0-SNAPSHOT sample-project - http://maven.apache.org + https://maven.apache.org diff --git a/modules/openapi-generator-maven-plugin/examples/spring.xml b/modules/openapi-generator-maven-plugin/examples/spring.xml index cd9b115797..dda872981b 100644 --- a/modules/openapi-generator-maven-plugin/examples/spring.xml +++ b/modules/openapi-generator-maven-plugin/examples/spring.xml @@ -6,7 +6,7 @@ jar 1.0-SNAPSHOT sample-project - http://maven.apache.org + https://maven.apache.org org.springframework.boot diff --git a/modules/openapi-generator-maven-plugin/examples/swagger.yaml b/modules/openapi-generator-maven-plugin/examples/swagger.yaml index c6d37b2575..fffd7f152b 100644 --- a/modules/openapi-generator-maven-plugin/examples/swagger.yaml +++ b/modules/openapi-generator-maven-plugin/examples/swagger.yaml @@ -2,17 +2,17 @@ swagger: "2.0" info: description: "This is a sample server Petstore server. You can find out more about\ - \ Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\ + \ Swagger at [https://swagger.io](https://swagger.io) or on [irc.freenode.net, #swagger](https://swagger.io/irc/).\ \ For this sample, you can use the api key `special-key` to test the authorization\ \ filters." version: "1.0.0" title: "Swagger Petstore" - termsOfService: "http://swagger.io/terms/" + termsOfService: "https://swagger.io/terms/" contact: email: "apiteam@swagger.io" license: name: "Apache 2.0" - url: "http://www.apache.org/licenses/LICENSE-2.0.html" + url: "https://www.apache.org/licenses/LICENSE-2.0.html" host: "petstore.swagger.io" basePath: "/v2" tags: @@ -20,14 +20,14 @@ tags: description: "Everything about your Pets" externalDocs: description: "Find out more" - url: "http://swagger.io" + url: "https://swagger.io" - name: "store" description: "Access to Petstore orders" - name: "user" description: "Operations about user" externalDocs: description: "Find out more about our store" - url: "http://swagger.io" + url: "https://swagger.io" schemes: - "http" paths: @@ -699,4 +699,4 @@ definitions: type: "string" externalDocs: description: "Find out more about Swagger" - url: "http://swagger.io" + url: "https://swagger.io" diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index 6a709267e4..6dc8fb5fd0 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/OpenAPI2SpringBoot.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/OpenAPI2SpringBoot.java index 6e525d8fdb..f3d367e224 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/OpenAPI2SpringBoot.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/OpenAPI2SpringBoot.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/RFC3339DateFormat.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/RFC3339DateFormat.java index 68c3b0db38..fa2752bd6f 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/RFC3339DateFormat.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/RFC3339DateFormat.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiOriginFilter.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiOriginFilter.java index dd6ff5dcfe..fe721809dc 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiOriginFilter.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiOriginFilter.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiUtil.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiUtil.java index b58943652b..f6b510480a 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiUtil.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/ApiUtil.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApi.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApi.java index ccebc41337..220a227445 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApi.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApi.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiController.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiController.java index 9bc0953512..190cc107ed 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiController.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiController.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiDelegate.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiDelegate.java index 5f92c365d8..e2f6be0dae 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiDelegate.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/api/GenApiDelegate.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java index 04912686cc..4d38f5aa11 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/HomeController.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java index 39fb8bb2a5..6d257c070f 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/configuration/OpenAPIDocumentationConfig.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -56,7 +56,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Generator Online") .description("This is an online openapi generator server. You can find out more at https://github.com/OpenAPITools/openapi-generator.") .license("Apache 2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version(version) .contact(new Contact("","", "")) diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ApiResponse.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ApiResponse.java index 1db77598bd..b1a1938200 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ApiResponse.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ApiResponse.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/Generated.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/Generated.java index e78f201bb7..832e178caf 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/Generated.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/Generated.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java index e36ed64db1..15c71a60c2 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/GeneratorInput.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ResponseCode.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ResponseCode.java index 196569305d..a8af9ab76f 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ResponseCode.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/model/ResponseCode.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/GenApiService.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/GenApiService.java index 5d695f5830..f10599b593 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/GenApiService.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/GenApiService.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java index dd60956491..1b0ac76c7b 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/ZipUtil.java b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/ZipUtil.java index 2719cecd1d..7b5e31991b 100644 --- a/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/ZipUtil.java +++ b/modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/ZipUtil.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java index f4f62b30bc..64b74e1ad0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/AbstractGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CliOption.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CliOption.java index 49c8d7143a..940f3fd22f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CliOption.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CliOption.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java index 2a6f32028a..ebbadee8e0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ClientOptInput.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenCallback.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenCallback.java index 982433c64d..0efcfeb1e7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenCallback.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenCallback.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java index 5b587db411..2d8d1b9e37 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfig.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfigLoader.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfigLoader.java index 6aa2cb56bf..6c552a97b8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfigLoader.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConfigLoader.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java index ca990d7fe5..7bdbad35ed 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index f8eb675d47..eda6b1d69f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelFactory.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelFactory.java index e16c6bf25c..580cc1e77f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelFactory.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelFactory.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelType.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelType.java index 67cfba6719..6d85bcf2c2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelType.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModelType.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java index 2f83917104..117eb9a1ed 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index 14fb30a861..955ae16023 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index c72d24bc08..91e4948b0b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index b814f2207f..66be8b8c63 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java index e7abb8c90d..83acfcf482 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenSecurity.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenType.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenType.java index 1c5e318edb..bf4c9c4d7c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenType.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenType.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 326b710418..65b06022d2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 2d263ed386..2d7b768b31 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/Generator.java index 7a62aa5be7..a38ce189e7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/Generator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/GlobalSupportingFile.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/GlobalSupportingFile.java index 8e97662c98..06b6e9cfab 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/GlobalSupportingFile.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/GlobalSupportingFile.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index 8201a27b04..e5e519d32c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/SupportingFile.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/SupportingFile.java index 6046da1cd6..a41196e54f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/SupportingFile.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/SupportingFile.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/TemplatingEngineLoader.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/TemplatingEngineLoader.java index e33e1ff77e..7f7a3000d2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/TemplatingEngineLoader.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/TemplatingEngineLoader.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthMethod.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthMethod.java index a56257765f..136a3b3b64 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthMethod.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthMethod.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthParser.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthParser.java index 798d9c1e03..a18d8bdcfd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthParser.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/auth/AuthParser.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index f19f8d1bf5..31cadc1e29 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java index 6708694993..3c5b6c919b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfiguratorUtils.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java index 0f07882102..82855b4ae3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/GlobalSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java index 5ce8089d19..ffc664c3cf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java index 961320c404..562fbe0046 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/XmlExampleGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/CodegenIgnoreProcessor.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/CodegenIgnoreProcessor.java index fe7991a554..666c13d30d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/CodegenIgnoreProcessor.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/CodegenIgnoreProcessor.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/DirectoryRule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/DirectoryRule.java index 9870a8a434..6081fc4c13 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/DirectoryRule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/DirectoryRule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/EverythingRule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/EverythingRule.java index 00a3ad6bec..b50222f020 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/EverythingRule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/EverythingRule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/FileRule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/FileRule.java index dc2b7321b2..c5f731f597 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/FileRule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/FileRule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/IgnoreLineParser.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/IgnoreLineParser.java index a3dcedac12..7bdb44b525 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/IgnoreLineParser.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/IgnoreLineParser.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/InvalidRule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/InvalidRule.java index 21c170569c..841a4ff7c0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/InvalidRule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/InvalidRule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/ParserException.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/ParserException.java index 7ab93f93b4..19cf3ac18b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/ParserException.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/ParserException.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Part.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Part.java index ef948c416f..eeb47acea5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Part.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Part.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/RootedFileRule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/RootedFileRule.java index 5db309afda..91b4499b1a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/RootedFileRule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/RootedFileRule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Rule.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Rule.java index 079ac3c7a1..fd56a05329 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Rule.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/ignore/rules/Rule.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java index 50f2db6005..b3177163df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractAdaCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java index d2a20593f5..e8a1aca42d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 90e536e575..7e6c09e4ae 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java index df98e9aa55..c49f5681e5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCppCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java index 4b95e1038d..b19a6a2404 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java index ddb9aa0224..6ec6970518 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractFSharpCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index f83783b2d3..6b910f4467 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java index 7eb5421c16..ddfaa16c86 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGraphQLCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 854420d9e7..af6e1cde6c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java index 4b2d39877d..45ffa3b36b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaJAXRSServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java index c8486b8fef..0c935ed9ff 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractKotlinCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index 340c08f3df..aeb076b850 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java index 53381ed9d9..e2c1f13128 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractRubyCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java index 80d17966d5..b0e44e5565 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index a9fb88098d..ab6869f5c3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java index f61d173b07..1726b0cda8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java index 1e08cf6365..329065b22c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AdaServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java index f64275f047..150f723180 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AndroidClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java index d8083c08d2..ebd2cd3b32 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Apache2ConfigCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java index b0cebcf66c..38717bf23c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java index d60f60a9df..731e951ec6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AsciidocDocumentationCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index 494040b8bf..fdcad979bf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java index 180be0df3d..6e96542eaa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AvroSchemaCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java index 4e521f04a1..3c13a4a2f7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java index c6e540a9b4..24c035ab87 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java index 47a9c22df8..4f318bb2b5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java index 4f73f6d7e0..11d32d5f05 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpDotNet2ClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java index 8d1b4cc091..2ca162a2c5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 4556749168..d97c2d800b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java index f7ca751bc2..6500a8a478 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ClojureClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java index e1633b8d2e..e368355cc6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ConfluenceWikiCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java index ef0ef650d7..6d9ba3c32e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppPistacheServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java index 449e2b8351..a199ab9f70 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5ClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java index 01d0536f9c..74f668f369 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5QHttpEngineServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java index c26eafc126..8058932f91 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java index db8ee00a19..fa22aef268 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java index 7d7f25a3a6..970753d6a2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppTizenClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index f57f18a963..8a2ce0f289 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 7a4886f5ed..8cded7e4c0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java index 6f1f1b2a37..9cc531c096 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartJaguarClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java index 55550123a8..e1f2979564 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/EiffelClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java index 9e5a56cb25..d96f85319a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java index 6bb00f2458..181a38f1cb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElmClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java index 763bbfae6f..6a5bf184e8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java index 29eda6a0f7..55a3a975c0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java index e9986d000b..068c36a6ff 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java index fa4d9d1d65..c5a38e1807 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FlashClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java index 496cad4086..a90446eab2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpFunctionsServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java index d62461e57f..ea4c79468b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java index 4b926fd3ef..ae267797fb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java index 181363a972..29e7f55860 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientExperimentalCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java index 576931f440..632d4c3eb2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java index c0ecbb7a9a..0828146346 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java index 11cf0bb20c..bebc631748 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLNodeJSExpressServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java index a003ecc576..99c13c2005 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GraphQLSchemaCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java index 804aef64e7..22c083218d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java index 40b630906d..e22199b430 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellHttpClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java index 3d49225891..2701f3d2aa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java index da504db4ca..17d2a1230f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java index e47deba1e3..bb206b12f6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java index f26731cd95..355afddd0b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java index 7e383fe0c9..24aa5fb62e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index ef591c7b30..4fbba05d82 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java index a1ef139f6d..e68737e72a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaInflectorServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java index a07d461e26..f21ad4f5c4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java index f954285d8e..f47edb272e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java index 0ee67836a4..a0bb1ac6eb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJerseyServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java index a39440ef40..708b7447ee 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMSF4JServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java index be0ccd395f..7095fa54a2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPKMSTServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java index 99da073cc8..ffe6f8660f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaPlayFrameworkCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java index 26864dd1a6..2439d1fb74 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java index dda2731b01..b8beedfee1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java index 64575cf08a..c051d13cb9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaUndertowServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java index 36a9df5ad4..a9e0332ca7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java index 1f79ab8dd5..82b1f4ba1e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaVertXWebServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java index 4e9d82ccdb..1bb9c9f2b9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java index f73d3c35d7..7cc1215f46 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptClosureAngularClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java index 182b9bbacd..4d97d70437 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 92c85c4038..c8ba96bba7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java index 10883a7149..25e40fcd62 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java index 5957f20752..c1b781ce9f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinSpringServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java index fe583b862e..193358867c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinVertxServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java index 70e280accc..564931583b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/LuaClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java index 22ec3f631f..12a7e013f0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/MysqlSchemaCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java index 71dee2f682..a0fefd2485 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NimClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java index 4208321258..c57f5abf42 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSExpressServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java index c697ce827c..d4a3c7594a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/NodeJSServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java index f383324352..4ce0c93a4e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OCamlClientCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java index 6b3d9c086c..bcf153340e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ObjcClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java index 453ddb44ba..3cd85d2110 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java index 42225f848a..49c9fb788b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/OpenAPIYamlGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java index cdd8a10fad..c11841e315 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java index d18ce438ec..09524470cd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java index ee6f6467b9..cccbc73925 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLaravelServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java index a26e4e8bed..dbfca26277 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpLumenServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java index 7bfdd01e9b..fb39852d2e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSilexServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java index 43efb15906..2aa867d6aa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java index edda290c64..8c5d84a8e5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java index 580e308f47..851fca240d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSymfonyServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java index 9356873fc0..19436f73ef 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpZendExpressivePathHandlerServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java index 925fdb7065..af8f712e93 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PowerShellClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java index 3af77bee7d..66c731d077 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ProtobufSchemaCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java index 46ab49f8f4..3954e98f9b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAbstractConnexionServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java index e083e39496..c3afd660f4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonAiohttpConnexionServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java index a0908990e2..dd60815d0d 100755 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonBluePlanetServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 99943b209b..52a29fe3dc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java index 5d8d9089db..6a18abea01 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientExperimentalCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java index 5cb5dbb3f9..085b9e821e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonFlaskConnexionServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index 378421c1ad..273978d0a7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index 992cebfc57..9022c2462f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java index 1bec9edbd6..ddcc5c6f21 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java index 9326ea91e6..7f626aade4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index 6991f272bf..e5f1e88a4e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java index 406caa69c1..ed18518866 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java index 7fca9da3c8..2d291924a7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaAkkaClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java index fa2c969c16..e830d1b316 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaFinchServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java index 06c504bf51..304b43a14b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaGatlingCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java index 5ab68b7f6c..0d6462160f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttpClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java index e196cf9fec..c7f97cc690 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaLagomServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java index ccc65a54b2..b0684b48be 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaPlayFrameworkServerCodegen.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java index 3aeba0eb1f..c511b29ba8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalatraServerCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java index db65acdf6c..8274a6aa65 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalazClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index f4218df1fc..5478f307bc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java index 0ec8faff99..9faa3e7144 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticDocCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java index b763eb2308..13f1e3689b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtml2Generator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java index 326ecc83c5..a633da650a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/StaticHtmlGenerator.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java index 741afe492d..1f5e536841 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift3Codegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index 1815b649ec..454eb43b77 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 1f5a9c75f4..094eec48df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java index 33f991ef53..c5daa1f54c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index b7fdfe07ae..ef30687897 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java index dc68aace1e..3b51411718 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java index 3ed6203c2a..e989b00638 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index 633a8ff3ce..4d9f143835 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java index baee47295d..b21869c748 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java index 3b1c5d4dab..75b91392fa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java index a45e24be95..275af5c82e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java index b5ccea1606..9eac980e36 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java index 6c6cffadfa..560083e601 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptReduxQueryClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java index f9a396008d..7510a25f09 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationExtendedFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationExtendedFeatures.java index 68c7aa93b0..172ac8f025 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationExtendedFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationExtendedFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationFeatures.java index aa06e03c6f..44ded47f71 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/BeanValidationFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFFeatures.java index 094ab91d23..2564ea05f8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFServerFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFServerFeatures.java index 4a23170c05..d009595e20 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFServerFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/CXFServerFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipFeatures.java index 7112155d60..683d23f258 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipTestFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipTestFeatures.java index 6b57cc4828..26a6f93aef 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipTestFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/GzipTestFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/JbossFeature.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/JbossFeature.java index ca2fac36e3..463075836a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/JbossFeature.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/JbossFeature.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingFeatures.java index 91b95b7861..17a79e1a59 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingTestFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingTestFeatures.java index e5b2a52d4e..cef8873cdc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingTestFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/LoggingTestFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/OptionalFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/OptionalFeatures.java index a714697258..39c1746f09 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/OptionalFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/OptionalFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/PerformBeanValidationFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/PerformBeanValidationFeatures.java index b9f2f13809..a09e00815e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/PerformBeanValidationFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/PerformBeanValidationFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SpringFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SpringFeatures.java index 59a8bf5251..78ff54738e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SpringFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SpringFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerFeatures.java index f84b203def..0487bcef88 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerUIFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerUIFeatures.java index 1bcb85a508..27483bce2d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerUIFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/SwaggerUIFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/UseGenericResponseFeatures.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/UseGenericResponseFeatures.java index 6e4cfffc16..713e349e3a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/UseGenericResponseFeatures.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/features/UseGenericResponseFeatures.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/HandlebarsEngineAdapter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/HandlebarsEngineAdapter.java index 21158b95ca..974c2097ac 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/HandlebarsEngineAdapter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/HandlebarsEngineAdapter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/MustacheEngineAdapter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/MustacheEngineAdapter.java index 0e0b7ea4d8..e5606afdad 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/MustacheEngineAdapter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/MustacheEngineAdapter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/CamelCaseLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/CamelCaseLambda.java index 2c5fbd9e55..32f62042c9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/CamelCaseLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/CamelCaseLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/IndentedLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/IndentedLambda.java index c3656ed64a..ffd1269516 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/IndentedLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/IndentedLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java index ec99428222..2c6e80e262 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/LowercaseLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/LowercaseLambda.java index 42f292f240..f930eaa2c0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/LowercaseLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/LowercaseLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SplitStringLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SplitStringLambda.java index 89e99804aa..70c7e5ee15 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SplitStringLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/SplitStringLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TitlecaseLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TitlecaseLambda.java index a51218f0ee..2d94a5ad7b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TitlecaseLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TitlecaseLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TrimWhitespaceLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TrimWhitespaceLambda.java index bdf1d13653..29e2e36c35 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TrimWhitespaceLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/TrimWhitespaceLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UppercaseLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UppercaseLambda.java index b225eafd3c..4063f3a842 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UppercaseLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UppercaseLambda.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ImplementationVersion.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ImplementationVersion.java index 1a14420018..6c5c5839b6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ImplementationVersion.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ImplementationVersion.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCache.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCache.java index 561d1e6e53..df68513a95 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCache.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCache.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java index 3f2688fc5e..a08173dedb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonCacheImpl.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/Markdown.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/Markdown.java index add7e674cc..0afc19159f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/Markdown.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/Markdown.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java index 6b02731d12..08c878b21c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OptionUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OptionUtils.java index 543714c015..8aea1fa934 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OptionUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/OptionUtils.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java index 80262459de..b2b58a8da3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/SemVer.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java index fffccddd90..abb50ca496 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/URLPathUtils.java @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache index fbb6e30e0b..969998fd67 100644 --- a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache @@ -22,7 +22,7 @@ buildscript { } repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } mavenLocal() } diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index b761d147c5..abfb8653be 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -16,7 +16,7 @@ buildscript { } repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index 24e668fdf3..cd78d9e03d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache index 346ed6625b..e190e36cda 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index 16cc03eeeb..5a162a7d71 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/licenseInfo.mustache index 02acad802e..d148ab0a41 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/microprofile/licenseInfo.mustache @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache index c797b1ba9b..a92d040f62 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache @@ -6,13 +6,13 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } } repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index a149c68220..67f7a7cda4 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -9,7 +9,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache index f6487eefc5..0caef5e4aa 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache index 08ab4a3cce..5f716aad84 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index a957f76822..610d25d147 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache index af83cc1ef0..7431d90eba 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache index 7d8a096e83..813886e4b5 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache index 456356c925..e135bc2212 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache @@ -5,7 +5,7 @@ group = '{{groupId}}' version = '{{artifactVersion}}' repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/licenseInfo.mustache index 02acad802e..d148ab0a41 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/licenseInfo.mustache @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/licenseInfo.mustache index 02acad802e..d148ab0a41 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/licenseInfo.mustache @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache index 0191d3d8a7..98e22a8af1 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache @@ -4,7 +4,7 @@ project.version = "{{artifactVersion}}" project.group = "{{groupId}}" repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } } dependencies { diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache index e55118c44a..924376cb70 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache @@ -4,7 +4,7 @@ project.version = "{{artifactVersion}}" project.group = "{{groupId}}" repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } } dependencies { diff --git a/modules/openapi-generator/src/main/resources/JavaPlayFramework/LICENSE.mustache b/modules/openapi-generator/src/main/resources/JavaPlayFramework/LICENSE.mustache index 4baedcb95f..19823e1cac 100644 --- a/modules/openapi-generator/src/main/resources/JavaPlayFramework/LICENSE.mustache +++ b/modules/openapi-generator/src/main/resources/JavaPlayFramework/LICENSE.mustache @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/modules/openapi-generator/src/main/resources/_common/LICENSE b/modules/openapi-generator/src/main/resources/_common/LICENSE index 8dada3edaf..3f4d322ebd 100644 --- a/modules/openapi-generator/src/main/resources/_common/LICENSE +++ b/modules/openapi-generator/src/main/resources/_common/LICENSE @@ -192,7 +192,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/modules/openapi-generator/src/main/resources/android/build.mustache b/modules/openapi-generator/src/main/resources/android/build.mustache index 0e564cee5c..ea6766fa05 100644 --- a/modules/openapi-generator/src/main/resources/android/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/build.mustache @@ -5,7 +5,7 @@ project.version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache index 30d1640af8..f608fe18f7 100644 --- a/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache @@ -5,7 +5,7 @@ project.version = '{{artifactVersion}}' buildscript { repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache b/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache index 60ec7dd944..7eb5405326 100644 --- a/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache @@ -11,7 +11,7 @@ version = "1.0-SNAPSHOT" repositories { mavenLocal() - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } } dependencies { diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/css_bootstrap.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/css_bootstrap.mustache index f84ec4773f..626b68fa61 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/css_bootstrap.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/css_bootstrap.mustache @@ -4,7 +4,7 @@ * * Copyright 2013 Twitter, Inc * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world by @mdo and @fat. */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/js_bootstrap.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/js_bootstrap.mustache index 66770d8b78..e8fd9045fb 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/js_bootstrap.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/js_bootstrap.mustache @@ -2,7 +2,7 @@ /*! * Bootstrap.js by @fat & @mdo * Copyright 2013 Twitter, Inc. -* http://www.apache.org/licenses/LICENSE-2.0.txt +* https://www.apache.org/licenses/LICENSE-2.0.txt */ !function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})}(window.jQuery),!function(e){"use strict";function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e(' diff --git a/samples/openapi3/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/openapi3/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index c49c57e440..40ee0ddda0 100644 --- a/samples/openapi3/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/openapi3/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -20,7 +20,7 @@ A library generated from a OpenAPI doc - http://www.apache.org/licenses/LICENSE-2.0.html + https://www.apache.org/licenses/LICENSE-2.0.html diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml index c5e930efc5..06a1bb8d46 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -5,7 +5,7 @@ info: " \' license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index a138e08ef9..71d688ccea 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -5,7 +5,7 @@ info: " \' license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml index c5e930efc5..06a1bb8d46 100644 --- a/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-api-server/api/openapi.yaml @@ -5,7 +5,7 @@ info: " \' license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml index c5e930efc5..06a1bb8d46 100644 --- a/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/openapi3/server/petstore/go-gin-api-server/api/openapi.yaml @@ -5,7 +5,7 @@ info: " \' license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Service/StrictJsonDeserializationVisitor.php b/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Service/StrictJsonDeserializationVisitor.php index 2095bd873b..fbb811869a 100644 --- a/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Service/StrictJsonDeserializationVisitor.php +++ b/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Service/StrictJsonDeserializationVisitor.php @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Service/TypeMismatchException.php b/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Service/TypeMismatchException.php index 33c9cb7ab7..6ec34a6ce8 100644 --- a/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Service/TypeMismatchException.php +++ b/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Service/TypeMismatchException.php @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml index 42547ecf8a..aa04dfb3cb 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml +++ b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml @@ -4,7 +4,7 @@ info: the api key `special-key` to test the authorization filters. license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 externalDocs: diff --git a/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml b/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml index 42547ecf8a..aa04dfb3cb 100644 --- a/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml +++ b/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml @@ -4,7 +4,7 @@ info: the api key `special-key` to test the authorization filters. license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 externalDocs: diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json index ec994f8fca..c72a9d39da 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -4,7 +4,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/erlang-server/priv/openapi.json b/samples/server/petstore/erlang-server/priv/openapi.json index a0a4803cd0..a754e1b0f0 100644 --- a/samples/server/petstore/erlang-server/priv/openapi.json +++ b/samples/server/petstore/erlang-server/priv/openapi.json @@ -5,7 +5,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "version" : "1.0.0" }, diff --git a/samples/server/petstore/go-api-server/api/openapi.yaml b/samples/server/petstore/go-api-server/api/openapi.yaml index e12f7f2a85..0c61c20995 100644 --- a/samples/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-api-server/api/openapi.yaml @@ -4,7 +4,7 @@ info: the api key `special-key` to test the authorization filters. license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/server/petstore/go-gin-api-server/api/openapi.yaml index e12f7f2a85..0c61c20995 100644 --- a/samples/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-gin-api-server/api/openapi.yaml @@ -4,7 +4,7 @@ info: the api key `special-key` to test the authorization filters. license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/java-inflector/pom.xml b/samples/server/petstore/java-inflector/pom.xml index 3aa1a320fc..f4388821a6 100644 --- a/samples/server/petstore/java-inflector/pom.xml +++ b/samples/server/petstore/java-inflector/pom.xml @@ -15,7 +15,7 @@ Unlicense - http://www.apache.org/licenses/LICENSE-2.0.html + https://www.apache.org/licenses/LICENSE-2.0.html repo diff --git a/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml b/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml index ae9b35de6a..277114e852 100644 --- a/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml @@ -5,7 +5,7 @@ info: " \' license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/java-play-framework-api-package-override/LICENSE b/samples/server/petstore/java-play-framework-api-package-override/LICENSE index 4baedcb95f..19823e1cac 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/LICENSE +++ b/samples/server/petstore/java-play-framework-api-package-override/LICENSE @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index 50b8a73731..1a86372171 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -4,7 +4,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/java-play-framework-async/LICENSE b/samples/server/petstore/java-play-framework-async/LICENSE index 4baedcb95f..19823e1cac 100644 --- a/samples/server/petstore/java-play-framework-async/LICENSE +++ b/samples/server/petstore/java-play-framework-async/LICENSE @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index 50b8a73731..1a86372171 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -4,7 +4,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/java-play-framework-controller-only/LICENSE b/samples/server/petstore/java-play-framework-controller-only/LICENSE index 4baedcb95f..19823e1cac 100644 --- a/samples/server/petstore/java-play-framework-controller-only/LICENSE +++ b/samples/server/petstore/java-play-framework-controller-only/LICENSE @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index 50b8a73731..1a86372171 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -4,7 +4,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/LICENSE b/samples/server/petstore/java-play-framework-fake-endpoints/LICENSE index 4baedcb95f..19823e1cac 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/LICENSE +++ b/samples/server/petstore/java-play-framework-fake-endpoints/LICENSE @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index b78cb13f21..edbfa20608 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -4,7 +4,7 @@ "description" : "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/LICENSE b/samples/server/petstore/java-play-framework-no-bean-validation/LICENSE index 4baedcb95f..19823e1cac 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/LICENSE +++ b/samples/server/petstore/java-play-framework-no-bean-validation/LICENSE @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index 50b8a73731..1a86372171 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -4,7 +4,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/LICENSE b/samples/server/petstore/java-play-framework-no-exception-handling/LICENSE index 4baedcb95f..19823e1cac 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/LICENSE +++ b/samples/server/petstore/java-play-framework-no-exception-handling/LICENSE @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index 50b8a73731..1a86372171 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -4,7 +4,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/java-play-framework-no-interface/LICENSE b/samples/server/petstore/java-play-framework-no-interface/LICENSE index 4baedcb95f..19823e1cac 100644 --- a/samples/server/petstore/java-play-framework-no-interface/LICENSE +++ b/samples/server/petstore/java-play-framework-no-interface/LICENSE @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index 50b8a73731..1a86372171 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -4,7 +4,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/LICENSE b/samples/server/petstore/java-play-framework-no-swagger-ui/LICENSE index 4baedcb95f..19823e1cac 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/LICENSE +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/LICENSE @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/LICENSE b/samples/server/petstore/java-play-framework-no-wrap-calls/LICENSE index 4baedcb95f..19823e1cac 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/LICENSE +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/LICENSE @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index 50b8a73731..1a86372171 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -4,7 +4,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/java-play-framework/LICENSE b/samples/server/petstore/java-play-framework/LICENSE index 4baedcb95f..19823e1cac 100644 --- a/samples/server/petstore/java-play-framework/LICENSE +++ b/samples/server/petstore/java-play-framework/LICENSE @@ -1,7 +1,7 @@ This software is licensed under the Apache 2 license, quoted below. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with -the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. +the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index 50b8a73731..1a86372171 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -4,7 +4,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json index d536f6b090..9bf88937dd 100644 --- a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json +++ b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json @@ -5,7 +5,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "version" : "1.0.0" }, diff --git a/samples/server/petstore/java-vertx-web/rx/src/main/resources/openapi.yaml b/samples/server/petstore/java-vertx-web/rx/src/main/resources/openapi.yaml index fd6a6764be..c350451359 100644 --- a/samples/server/petstore/java-vertx-web/rx/src/main/resources/openapi.yaml +++ b/samples/server/petstore/java-vertx-web/rx/src/main/resources/openapi.yaml @@ -4,7 +4,7 @@ info: the api key `special-key` to test the authorization filters. license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 externalDocs: diff --git a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json index 01ebde2297..ab379a276b 100644 --- a/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json +++ b/samples/server/petstore/java-vertx/async/src/main/resources/openapi.json @@ -5,7 +5,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "version" : "1.0.0" }, diff --git a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json index fab44c6d95..f76425b944 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json +++ b/samples/server/petstore/java-vertx/rx/src/main/resources/openapi.json @@ -5,7 +5,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "version" : "1.0.0" }, diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/PetApiTest.java index 4f3509f5d6..48eec50eeb 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/PetApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/PetApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/StoreApiTest.java index 1f7a1dd303..54eb5757b9 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/StoreApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/UserApiTest.java index da2bd154e0..96ef6b222a 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/UserApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/UserApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/PetApiTest.java index 4f3509f5d6..48eec50eeb 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/PetApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/PetApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/StoreApiTest.java index 1f7a1dd303..54eb5757b9 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/StoreApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/UserApiTest.java index da2bd154e0..96ef6b222a 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/UserApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/UserApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/AnotherFakeApiTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/AnotherFakeApiTest.java index 2ee5a4036e..363cbb22d1 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/AnotherFakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/AnotherFakeApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/FakeApiTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/FakeApiTest.java index 5912420335..9986791a57 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/FakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/FakeApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java index 1be1a84276..ea4146e05b 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/PetApiTest.java index eab1b0f1ed..d6f41e2bb1 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/PetApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/PetApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/StoreApiTest.java index 3ffc74ae41..b56220e980 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/StoreApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/UserApiTest.java index 8d65b7b7fb..903780ff59 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/UserApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/UserApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java index 0ddcdbcd05..b1e50fee91 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/AnotherFakeApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java index 7ec4c982e3..6c3af9f58f 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java index 3e50a06b30..15194d65a8 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java index 420519d00e..265416d6e4 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/PetApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java index 74a6960493..62fa7f486c 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java index 2cbcf9455e..0aae86e82a 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/UserApiTest.java @@ -13,7 +13,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/jaxrs-datelib-j8/pom.xml b/samples/server/petstore/jaxrs-datelib-j8/pom.xml index 1c5a5d982f..b8d2142456 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/pom.xml +++ b/samples/server/petstore/jaxrs-datelib-j8/pom.xml @@ -9,7 +9,7 @@ Unlicense - http://www.apache.org/licenses/LICENSE-2.0.html + https://www.apache.org/licenses/LICENSE-2.0.html repo diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/Bootstrap.java index 1d5c3ae3e3..c292957ea4 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/Bootstrap.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/Bootstrap.java @@ -21,7 +21,7 @@ public class Bootstrap extends HttpServlet { .email("apiteam@swagger.io")) .license(new License() .name("Apache-2.0") - .url("http://www.apache.org/licenses/LICENSE-2.0.html")); + .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); diff --git a/samples/server/petstore/jaxrs-jersey/pom.xml b/samples/server/petstore/jaxrs-jersey/pom.xml index cad5fb45b9..965776a7ad 100644 --- a/samples/server/petstore/jaxrs-jersey/pom.xml +++ b/samples/server/petstore/jaxrs-jersey/pom.xml @@ -9,7 +9,7 @@ Unlicense - http://www.apache.org/licenses/LICENSE-2.0.html + https://www.apache.org/licenses/LICENSE-2.0.html repo diff --git a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/Bootstrap.java index 2856cda2f3..6d78a1a397 100644 --- a/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/Bootstrap.java +++ b/samples/server/petstore/jaxrs-jersey/src/main/java/org/openapitools/api/Bootstrap.java @@ -21,7 +21,7 @@ public class Bootstrap extends HttpServlet { .email("")) .license(new License() .name("Apache-2.0") - .url("http://www.apache.org/licenses/LICENSE-2.0.html")); + .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle index 8a4c7bbd48..bc16c9424f 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle @@ -4,7 +4,7 @@ project.version = "1.0.0" project.group = "org.openapitools" repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } } dependencies { diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle index ed9c2512cc..1a4dcb70ce 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle @@ -4,7 +4,7 @@ project.version = "1.0.0" project.group = "org.openapitools" repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } } dependencies { diff --git a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle index ed9c2512cc..1a4dcb70ce 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle @@ -4,7 +4,7 @@ project.version = "1.0.0" project.group = "org.openapitools" repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } } dependencies { diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml index 8ce9975a0a..d20a3573e5 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml @@ -5,7 +5,7 @@ info: " \' license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 464a6a7052..f6f5c60294 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -5,7 +5,7 @@ info: " \' license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 464a6a7052..f6f5c60294 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -5,7 +5,7 @@ info: " \' license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/Bootstrap.java index 020c4a1aff..a2f745f947 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/Bootstrap.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/Bootstrap.java @@ -21,7 +21,7 @@ public class Bootstrap extends HttpServlet { .email("")) .license(new License() .name("Apache-2.0") - .url("http://www.apache.org/licenses/LICENSE-2.0.html")); + .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/Bootstrap.java index 020c4a1aff..a2f745f947 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/Bootstrap.java +++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/Bootstrap.java @@ -21,7 +21,7 @@ public class Bootstrap extends HttpServlet { .email("")) .license(new License() .name("Apache-2.0") - .url("http://www.apache.org/licenses/LICENSE-2.0.html")); + .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml index a56cf1e395..d7988f18a4 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml @@ -9,7 +9,7 @@ Unlicense - http://www.apache.org/licenses/LICENSE-2.0.html + https://www.apache.org/licenses/LICENSE-2.0.html repo diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/Bootstrap.java index 020c4a1aff..a2f745f947 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/Bootstrap.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/Bootstrap.java @@ -21,7 +21,7 @@ public class Bootstrap extends HttpServlet { .email("")) .license(new License() .name("Apache-2.0") - .url("http://www.apache.org/licenses/LICENSE-2.0.html")); + .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); diff --git a/samples/server/petstore/jaxrs/jersey2/pom.xml b/samples/server/petstore/jaxrs/jersey2/pom.xml index 28c9590494..3d9768f459 100644 --- a/samples/server/petstore/jaxrs/jersey2/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2/pom.xml @@ -9,7 +9,7 @@ Unlicense - http://www.apache.org/licenses/LICENSE-2.0.html + https://www.apache.org/licenses/LICENSE-2.0.html repo diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/Bootstrap.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/Bootstrap.java index 020c4a1aff..a2f745f947 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/Bootstrap.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/Bootstrap.java @@ -21,7 +21,7 @@ public class Bootstrap extends HttpServlet { .email("")) .license(new License() .name("Apache-2.0") - .url("http://www.apache.org/licenses/LICENSE-2.0.html")); + .url("https://www.apache.org/licenses/LICENSE-2.0.html")); ServletContext context = config.getServletContext(); Swagger swagger = new Swagger().info(info); diff --git a/samples/server/petstore/kotlin-server/ktor/build.gradle b/samples/server/petstore/kotlin-server/ktor/build.gradle index f9dc2458a2..f595575e6f 100644 --- a/samples/server/petstore/kotlin-server/ktor/build.gradle +++ b/samples/server/petstore/kotlin-server/ktor/build.gradle @@ -12,7 +12,7 @@ buildscript { ext.shadow_version = '2.0.3' repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } maven { url "https://plugins.gradle.org/m2/" } @@ -50,7 +50,7 @@ shadowJar { } repositories { - mavenCentral() + maven { url = "https://repo1.maven.org/maven2" } maven { url "https://dl.bintray.com/kotlin/ktor" } maven { url "https://dl.bintray.com/kotlin/kotlinx" } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts b/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts index f4561be14b..682bfec8aa 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts +++ b/samples/server/petstore/kotlin-springboot-reactive/build.gradle.kts @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile buildscript { repositories { jcenter() - mavenCentral() + maven { url = uri("https://repo1.maven.org/maven2") } } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.0.M3") @@ -15,7 +15,7 @@ version = "1.0.0" repositories { jcenter() - mavenCentral() + maven { url = uri("https://repo1.maven.org/maven2") } } tasks.withType { @@ -51,7 +51,7 @@ dependencies { } repositories { - mavenCentral() + maven { url = uri("https://repo1.maven.org/maven2") } maven { url = uri("https://repo.spring.io/snapshot") } maven { url = uri("https://repo.spring.io/milestone") } } diff --git a/samples/server/petstore/kotlin-springboot/build.gradle.kts b/samples/server/petstore/kotlin-springboot/build.gradle.kts index 26f4601e57..49fe9400f7 100644 --- a/samples/server/petstore/kotlin-springboot/build.gradle.kts +++ b/samples/server/petstore/kotlin-springboot/build.gradle.kts @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile buildscript { repositories { jcenter() - mavenCentral() + maven { url = uri("https://repo1.maven.org/maven2") } } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:2.2.0.M3") @@ -15,7 +15,7 @@ version = "1.0.0" repositories { jcenter() - mavenCentral() + maven { url = uri("https://repo1.maven.org/maven2") } } tasks.withType { @@ -48,7 +48,7 @@ dependencies { } repositories { - mavenCentral() + maven { url = uri("https://repo1.maven.org/maven2") } maven { url = uri("https://repo.spring.io/snapshot") } maven { url = uri("https://repo.spring.io/milestone") } } diff --git a/samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.nuspec b/samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.nuspec index 889fe96ab0..360effbaf7 100644 --- a/samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.nuspec +++ b/samples/server/petstore/nancyfx-async/src/IO.Swagger/IO.Swagger.nuspec @@ -9,6 +9,6 @@ false NancyFx IO.Swagger API http://swagger.io/terms/ - http://www.apache.org/licenses/LICENSE-2.0.html + https://www.apache.org/licenses/LICENSE-2.0.html \ No newline at end of file diff --git a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index 102c48def9..d4ee2fc102 100644 --- a/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/server/petstore/nancyfx/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -8,6 +8,6 @@ openapi-generator false NancyFx Org.OpenAPITools API - http://www.apache.org/licenses/LICENSE-2.0.html + https://www.apache.org/licenses/LICENSE-2.0.html \ No newline at end of file diff --git a/samples/server/petstore/nodejs-express-server/api/openapi.yaml b/samples/server/petstore/nodejs-express-server/api/openapi.yaml index 401e628f3b..ab13ab57cf 100644 --- a/samples/server/petstore/nodejs-express-server/api/openapi.yaml +++ b/samples/server/petstore/nodejs-express-server/api/openapi.yaml @@ -4,7 +4,7 @@ info: the api key `special-key` to test the authorization filters. license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/nodejs-express-server/api/swagger.yaml b/samples/server/petstore/nodejs-express-server/api/swagger.yaml index 85b742e57a..a63c6e31c5 100644 --- a/samples/server/petstore/nodejs-express-server/api/swagger.yaml +++ b/samples/server/petstore/nodejs-express-server/api/swagger.yaml @@ -13,7 +13,7 @@ info: email: "apiteam@swagger.io" license: name: "Apache-2.0" - url: "http://www.apache.org/licenses/LICENSE-2.0.html" + url: "https://www.apache.org/licenses/LICENSE-2.0.html" basePath: "/v2" tags: - name: "pet" diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/StrictJsonDeserializationVisitor.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/StrictJsonDeserializationVisitor.php index 2095bd873b..fbb811869a 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/StrictJsonDeserializationVisitor.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/StrictJsonDeserializationVisitor.php @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/TypeMismatchException.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/TypeMismatchException.php index 33c9cb7ab7..6ec34a6ce8 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/TypeMismatchException.php +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Service/TypeMismatchException.php @@ -6,7 +6,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml index 3571653f41..d5215aa956 100644 --- a/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml @@ -4,7 +4,7 @@ info: the api key `special-key` to test the authorization filters. license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml index 122782a9b9..7d6c576e67 100644 --- a/samples/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml @@ -4,7 +4,7 @@ info: the api key `special-key` to test the authorization filters. license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml index 122782a9b9..7d6c576e67 100644 --- a/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml @@ -4,7 +4,7 @@ info: the api key `special-key` to test the authorization filters. license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/ruby-sinatra/openapi.yaml b/samples/server/petstore/ruby-sinatra/openapi.yaml index b8e8bf1ec3..2a48cecf82 100644 --- a/samples/server/petstore/ruby-sinatra/openapi.yaml +++ b/samples/server/petstore/ruby-sinatra/openapi.yaml @@ -4,7 +4,7 @@ info: the api key `special-key` to test the authorization filters. license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 externalDocs: diff --git a/samples/server/petstore/ruby-sinatra/swagger.yaml b/samples/server/petstore/ruby-sinatra/swagger.yaml index 566357546e..bc7c6e9ae1 100644 --- a/samples/server/petstore/ruby-sinatra/swagger.yaml +++ b/samples/server/petstore/ruby-sinatra/swagger.yaml @@ -12,7 +12,7 @@ info: email: "apiteam@swagger.io" license: name: "Apache 2.0" - url: "http://www.apache.org/licenses/LICENSE-2.0.html" + url: "https://www.apache.org/licenses/LICENSE-2.0.html" host: "petstore.swagger.io" basePath: "/v2" tags: diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index e94a4c5fe9..c429303371 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -5,7 +5,7 @@ info: " \' license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/scala-play-server/public/openapi.json b/samples/server/petstore/scala-play-server/public/openapi.json index 0ef21458be..8ebbe96756 100644 --- a/samples/server/petstore/scala-play-server/public/openapi.json +++ b/samples/server/petstore/scala-play-server/public/openapi.json @@ -4,7 +4,7 @@ "description" : "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", "license" : { "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title" : "OpenAPI Petstore", "version" : "1.0.0" diff --git a/samples/server/petstore/scalatra/sbt b/samples/server/petstore/scalatra/sbt index 218f371c03..5719d8b786 100755 --- a/samples/server/petstore/scalatra/sbt +++ b/samples/server/petstore/scalatra/sbt @@ -17,10 +17,10 @@ declare -r latest_28="2.8.2" declare -r buildProps="project/build.properties" -declare -r sbt_launch_ivy_release_repo="http://repo.typesafe.com/typesafe/ivy-releases" +declare -r sbt_launch_ivy_release_repo="https://repo.typesafe.com/typesafe/ivy-releases" declare -r sbt_launch_ivy_snapshot_repo="https://repo.scala-sbt.org/scalasbt/ivy-snapshots" -declare -r sbt_launch_mvn_release_repo="http://repo.scala-sbt.org/scalasbt/maven-releases" -declare -r sbt_launch_mvn_snapshot_repo="http://repo.scala-sbt.org/scalasbt/maven-snapshots" +declare -r sbt_launch_mvn_release_repo="https://repo.scala-sbt.org/scalasbt/maven-releases" +declare -r sbt_launch_mvn_snapshot_repo="https://repo.scala-sbt.org/scalasbt/maven-snapshots" declare -r default_jvm_opts_common="-Xms512m -Xmx1536m -Xss2m" declare -r noshare_opts="-Dsbt.global.base=project/.sbtboot -Dsbt.boot.directory=project/.boot -Dsbt.ivy.home=project/.ivy" @@ -122,7 +122,7 @@ url_base () { local version="$1" case "$version" in - 0.7.*) echo "http://simple-build-tool.googlecode.com" ;; + 0.7.*) echo "https://simple-build-tool.googlecode.com" ;; # TODO: this URL does not exist 0.10.* ) echo "$sbt_launch_ivy_release_repo" ;; 0.11.[12]) echo "$sbt_launch_ivy_release_repo" ;; 0.*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9]) # ie "*-yyyymmdd-hhMMss" diff --git a/samples/server/petstore/scalatra/src/main/scala/ServletApp.scala b/samples/server/petstore/scalatra/src/main/scala/ServletApp.scala index 82268ea76e..d532f77b36 100644 --- a/samples/server/petstore/scalatra/src/main/scala/ServletApp.scala +++ b/samples/server/petstore/scalatra/src/main/scala/ServletApp.scala @@ -33,5 +33,5 @@ object OpenAPIInfo { """http://org.openapitools""", """team@openapitools.org""", """Apache-2.0""", - """http://www.apache.org/licenses/LICENSE-2.0.html""") + """https://www.apache.org/licenses/LICENSE-2.0.html""") } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java index 3ad72e7482..9dc9e8f880 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java @@ -27,7 +27,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "")) diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/SwaggerDocumentationConfig.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/SwaggerDocumentationConfig.java index 0184cf688d..4a567429c2 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/SwaggerDocumentationConfig.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/configuration/SwaggerDocumentationConfig.java @@ -21,7 +21,7 @@ public class SwaggerDocumentationConfig { .title("Swagger Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "apiteam@swagger.io")) diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java index 3ad72e7482..9dc9e8f880 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java @@ -27,7 +27,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "")) diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/SwaggerDocumentationConfig.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/SwaggerDocumentationConfig.java index 0184cf688d..4a567429c2 100644 --- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/SwaggerDocumentationConfig.java +++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/configuration/SwaggerDocumentationConfig.java @@ -21,7 +21,7 @@ public class SwaggerDocumentationConfig { .title("Swagger Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "apiteam@swagger.io")) diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java index 2aba2deb8e..dcc94c9582 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java @@ -27,7 +27,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "")) diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java index a18a521a0b..bdf5a026ce 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java @@ -27,7 +27,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "")) diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java index 77dca61d0e..ab1e85b3b8 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java @@ -27,7 +27,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "")) diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java index a18a521a0b..bdf5a026ce 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java @@ -27,7 +27,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "")) diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java index 77dca61d0e..ab1e85b3b8 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java @@ -27,7 +27,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "")) diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 464a6a7052..f6f5c60294 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -5,7 +5,7 @@ info: " \' license: name: Apache-2.0 - url: http://www.apache.org/licenses/LICENSE-2.0.html + url: https://www.apache.org/licenses/LICENSE-2.0.html title: OpenAPI Petstore version: 1.0.0 servers: diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java index 0a9d8095dd..b9883262f5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java @@ -28,7 +28,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "")) diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java index b018fb7272..91a77eb416 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java @@ -27,7 +27,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "")) diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java index 77dca61d0e..ab1e85b3b8 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/configuration/OpenAPIDocumentationConfig.java @@ -27,7 +27,7 @@ public class OpenAPIDocumentationConfig { .title("OpenAPI Petstore") .description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\") .license("Apache-2.0") - .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") + .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html") .termsOfServiceUrl("") .version("1.0.0") .contact(new Contact("","", "")) diff --git a/samples/yaml/api-docs.yml b/samples/yaml/api-docs.yml index d381f27253..615dc784bc 100644 --- a/samples/yaml/api-docs.yml +++ b/samples/yaml/api-docs.yml @@ -34,4 +34,4 @@ info: termsOfServiceUrl: "http://swagger.io/terms/" contact: "apiteam@swagger.io" license: Apache 2.0 - licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0.html" \ No newline at end of file + licenseUrl: "https://www.apache.org/licenses/LICENSE-2.0.html" \ No newline at end of file From c0ba498ddc22cbff2d51ddb5212bcac5c3e87969 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 19 Jan 2020 13:38:35 +0800 Subject: [PATCH 73/82] Add a link to a youtube video on Pulp and OpenAPI Generator (#5038) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ba41616067..72a9973d44 100644 --- a/README.md +++ b/README.md @@ -720,6 +720,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-12-04 - [Angular+NestJS+OpenAPI(Swagger)でマイクロサービスを視野に入れた環境を考える](https://qiita.com/teracy55/items/0327c7a170ec772970c6) by [てらしー](https://twitter.com/teracy55) - 2019-12-17 - [OpenAPI Generator で OAuth2 アクセストークン発行のコードまで生成してみる](https://www.techscore.com/blog/2019/12/17/openapi-generator-oauth2-accesstoken/) by [TECHSCORE](https://www.techscore.com/blog/) - 2019-12-23 - [Use Ada for Your Web Development](https://www.electronicdesign.com/technologies/embedded-revolution/article/21119177/use-ada-for-your-web-development) by [Stephane Carrez](https://github.com/stcarrez) +- 2019-01-17 - [OpenAPI demo for Pulp 3.0 GA](https://www.youtube.com/watch?v=mFBP-M0ZPfw&t=178s) by [Pulp](https://www.youtube.com/channel/UCI43Ffs4VPDv7awXvvBJfRQ) at [Youtube](https://www.youtube.com/) ## [6 - About Us](#table-of-contents) From 6a34706a9b79856d3a7d1a0d464a261c5e2963a9 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 19 Jan 2020 13:39:26 +0800 Subject: [PATCH 74/82] add multipleOf to various codegen classes (#5021) --- .../openapitools/codegen/CodegenModel.java | 18 +++++++++++++-- .../codegen/CodegenParameter.java | 10 +++++++++ .../openapitools/codegen/CodegenProperty.java | 2 +- .../openapitools/codegen/CodegenResponse.java | 16 +++++++++++++- .../IJsonSchemaValidationProperties.java | 22 +++++++++++++++---- 5 files changed, 60 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java index eda6b1d69f..37a1230f98 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java @@ -81,6 +81,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { private String minimum; private String maximum; private String pattern; + private Number multipleOf; public String getAdditionalPropertiesType() { return additionalPropertiesType; @@ -414,6 +415,16 @@ public class CodegenModel implements IJsonSchemaValidationProperties { this.maxProperties = maxProperties; } + @Override + public Number getMultipleOf() { + return multipleOf; + } + + @Override + public void setMultipleOf(Number multipleOf) { + this.multipleOf = multipleOf; + } + public List getReadOnlyVars() { return readOnlyVars; } @@ -569,7 +580,9 @@ public class CodegenModel implements IJsonSchemaValidationProperties { Objects.equals(getMinLength(), that.getMinLength()) && Objects.equals(getMinimum(), that.getMinimum()) && Objects.equals(getMaximum(), that.getMaximum()) && - Objects.equals(getPattern(), that.getPattern()); + Objects.equals(getPattern(), that.getPattern()) && + Objects.equals(getMultipleOf(), that.getMultipleOf()); + } @Override @@ -585,7 +598,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { hasChildren, isMapModel, hasOnlyReadOnly, getExternalDocumentation(), getVendorExtensions(), getAdditionalPropertiesType(), getMaxProperties(), getMinProperties(), getUniqueItems(), getMaxItems(), getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(), - getMaximum(), getPattern()); + getMaximum(), getPattern(), getMultipleOf()); } @Override @@ -662,6 +675,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { sb.append(", minimum='").append(minimum).append('\''); sb.append(", maximum='").append(maximum).append('\''); sb.append(", pattern='").append(pattern).append('\''); + sb.append(", multipleOf='").append(multipleOf).append('\''); sb.append('}'); return sb.toString(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index 955ae16023..270f4f2b5e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -456,5 +456,15 @@ public class CodegenParameter implements IJsonSchemaValidationProperties { this.maxProperties = maxProperties; } + @Override + public Number getMultipleOf() { + return multipleOf; + } + + @Override + public void setMultipleOf(Number multipleOf) { + this.multipleOf = multipleOf; + } + } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index 91e4948b0b..da32ae09c5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -708,6 +708,6 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti isWriteOnly, isNullable, isSelfReference, isCircularReference, _enum, allowableValues, items, mostInnerItems, vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase, nameInSnakeCase, enumName, maxItems, minItems, isXmlAttribute, xmlPrefix, xmlName, xmlNamespace, - isXmlWrapped); + isXmlWrapped, multipleOf); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java index 66be8b8c63..29429c073b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java @@ -66,6 +66,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { private String minimum; private String maximum; public String pattern; + public Number multipleOf; @Override public int hashCode() { @@ -127,7 +128,9 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { Objects.equals(exclusiveMaximum, that.exclusiveMaximum) && Objects.equals(getMinimum(), that.getMinimum()) && Objects.equals(getMaximum(), that.getMaximum()) && - Objects.equals(getPattern(), that.getPattern()); + Objects.equals(getPattern(), that.getPattern()) && + Objects.equals(getMultipleOf(), that.getMultipleOf()); + } @Override @@ -250,6 +253,16 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { this.maxProperties = maxProperties; } + @Override + public Number getMultipleOf() { + return multipleOf; + } + + @Override + public void setMultipleOf(Number multipleOf) { + this.multipleOf = multipleOf; + } + @Override public String toString() { final StringBuilder sb = new StringBuilder("CodegenResponse{"); @@ -299,6 +312,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties { sb.append(", minimum='").append(minimum).append('\''); sb.append(", maximum='").append(maximum).append('\''); sb.append(", pattern='").append(pattern).append('\''); + sb.append(", multipleOf='").append(multipleOf).append('\''); sb.append('}'); return sb.toString(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java index 8a4f9cea99..c86fbf7c7a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java @@ -1,41 +1,55 @@ package org.openapitools.codegen; -import java.math.BigDecimal; - public interface IJsonSchemaValidationProperties { String getPattern(); + void setPattern(String pattern); String getMaximum(); + void setMaximum(String maximum); String getMinimum(); + void setMinimum(String minimum); boolean getExclusiveMaximum(); + void setExclusiveMaximum(boolean exclusiveMaximum); - + boolean getExclusiveMinimum(); + void setExclusiveMinimum(boolean exclusiveMinimum); Integer getMinLength(); + void setMinLength(Integer minLength); - + Integer getMaxLength(); + void setMaxLength(Integer maxLength); Integer getMinItems(); + void setMinItems(Integer minItems); Integer getMaxItems(); + void setMaxItems(Integer maxItems); boolean getUniqueItems(); + void setUniqueItems(boolean uniqueItems); Integer getMinProperties(); + void setMinProperties(Integer minProperties); Integer getMaxProperties(); + void setMaxProperties(Integer maxProperties); + + Number getMultipleOf(); + + void setMultipleOf(Number multipleOf); } From fff759b79c2f6b8ee5b768dbb8c278d003e3c7e5 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 19 Jan 2020 15:25:20 +0800 Subject: [PATCH 75/82] [Python] fix numeric enum in python flask, aiohttp (#5019) * minor code format fix * fix numeric enum in python flask and aiohttp * add python-server-all.sh to ensure-up-to-date --- bin/utils/ensure-up-to-date | 1 + .../languages/PythonClientCodegen.java | 9 +-- .../resources/python-aiohttp/model.mustache | 3 +- .../resources/python-flask/model.mustache | 9 ++- .../openapi_server/models/order.py | 2 +- .../openapi_server/models/pet.py | 2 +- .../openapi_server/openapi/openapi.yaml | 62 +++++++++---------- .../openapi_server/openapi/openapi.yaml | 62 +++++++++---------- .../openapi_server/openapi/openapi.yaml | 62 +++++++++---------- 9 files changed, 109 insertions(+), 103 deletions(-) diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 023ef246ad..397b6975a1 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -39,6 +39,7 @@ declare -a samples=( "${root}/bin/mysql-schema-petstore.sh" "${root}/bin/nim-client-petstore.sh" "${root}/bin/python-petstore-all.sh" +"${root}/bin/python-server-all.sh" "${root}/bin/openapi3/python-petstore.sh" "${root}/bin/php-petstore.sh" "${root}/bin/php-silex-petstore-server.sh" diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 52a29fe3dc..fd90aabdd0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -276,7 +276,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig // If the package name consists of dots(openapi.client), then we need to create the directory structure like openapi/client with __init__ files. String[] packageNameSplits = packageName.split("\\."); String currentPackagePath = ""; - for (int i = 0; i < packageNameSplits.length-1; i++) { + for (int i = 0; i < packageNameSplits.length - 1; i++) { if (i > 0) { currentPackagePath = currentPackagePath + File.separatorChar; } @@ -566,7 +566,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig name = name.replaceAll("-", "_"); // e.g. PhoneNumberApi.py => phone_number_api.py - return underscore(name+ "_" + apiNameSuffix); + return underscore(name + "_" + apiNameSuffix); } @Override @@ -584,7 +584,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig if (name.length() == 0) { return "default_api"; } - return underscore(name+ "_" + apiNameSuffix); + return underscore(name + "_" + apiNameSuffix); } @Override @@ -649,6 +649,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig /** * Return the default value of the property + * * @param p OpenAPI property object * @return string presentation of the default value of the property */ @@ -678,7 +679,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig if (Pattern.compile("\r\n|\r|\n").matcher((String) p.getDefault()).find()) return "'''" + p.getDefault() + "'''"; else - return "'" + ((String) p.getDefault()).replaceAll("'","\'") + "'"; + return "'" + ((String) p.getDefault()).replaceAll("'", "\'") + "'"; } } else if (ModelUtils.isArraySchema(p)) { if (p.getDefault() != null) { diff --git a/modules/openapi-generator/src/main/resources/python-aiohttp/model.mustache b/modules/openapi-generator/src/main/resources/python-aiohttp/model.mustache index 9ab013ea9e..63b9b7361c 100644 --- a/modules/openapi-generator/src/main/resources/python-aiohttp/model.mustache +++ b/modules/openapi-generator/src/main/resources/python-aiohttp/model.mustache @@ -89,8 +89,8 @@ class {{classname}}(Model): :type {{name}}: {{dataType}} """ {{#isEnum}} - allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] {{#isContainer}} + allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501 {{#isListContainer}} if not set({{{name}}}).issubset(set(allowed_values)): raise ValueError( @@ -109,6 +109,7 @@ class {{classname}}(Model): {{/isMapContainer}} {{/isContainer}} {{^isContainer}} + allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#isString}}"{{/isString}}{{{this}}}{{#isString}}"{{/isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501 if {{{name}}} not in allowed_values: raise ValueError( "Invalid value for `{{{name}}}` ({0}), must be one of {1}" diff --git a/modules/openapi-generator/src/main/resources/python-flask/model.mustache b/modules/openapi-generator/src/main/resources/python-flask/model.mustache index 6b6743d5e6..0b2fd37cbc 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/model.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/model.mustache @@ -25,7 +25,8 @@ class {{classname}}(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. - """{{#allowableValues}} + """ +{{#allowableValues}} """ allowed enum values @@ -33,7 +34,8 @@ class {{classname}}(Model): {{#enumVars}} {{name}} = {{{value}}}{{^-last}} {{/-last}} -{{/enumVars}}{{/allowableValues}} +{{/enumVars}} +{{/allowableValues}} def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501 """{{classname}} - a model defined in OpenAPI @@ -96,8 +98,8 @@ class {{classname}}(Model): :type {{name}}: {{dataType}} """ {{#isEnum}} - allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501 {{#isContainer}} + allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501 {{#isListContainer}} if not set({{{name}}}).issubset(set(allowed_values)): raise ValueError( @@ -116,6 +118,7 @@ class {{classname}}(Model): {{/isMapContainer}} {{/isContainer}} {{^isContainer}} + allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#isString}}"{{/isString}}{{{this}}}{{#isString}}"{{/isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501 if {{{name}}} not in allowed_values: raise ValueError( "Invalid value for `{{{name}}}` ({0}), must be one of {1}" diff --git a/samples/server/petstore/python-aiohttp/openapi_server/models/order.py b/samples/server/petstore/python-aiohttp/openapi_server/models/order.py index 71504aba20..88df4eb7e8 100644 --- a/samples/server/petstore/python-aiohttp/openapi_server/models/order.py +++ b/samples/server/petstore/python-aiohttp/openapi_server/models/order.py @@ -162,7 +162,7 @@ class Order(Model): :param status: The status of this Order. :type status: str """ - allowed_values = ["placed", "approved", "delivered"] + allowed_values = ["placed", "approved", "delivered"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" diff --git a/samples/server/petstore/python-aiohttp/openapi_server/models/pet.py b/samples/server/petstore/python-aiohttp/openapi_server/models/pet.py index 4931fe6fc9..d3e68e105e 100644 --- a/samples/server/petstore/python-aiohttp/openapi_server/models/pet.py +++ b/samples/server/petstore/python-aiohttp/openapi_server/models/pet.py @@ -189,7 +189,7 @@ class Pet(Model): :param status: The status of this Pet. :type status: str """ - allowed_values = ["available", "pending", "sold"] + allowed_values = ["available", "pending", "sold"] # noqa: E501 if status not in allowed_values: raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" diff --git a/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml index d5215aa956..030b84f740 100644 --- a/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml @@ -32,7 +32,7 @@ paths: required: true x-body-name: body responses: - 405: + "405": content: {} description: Invalid input security: @@ -58,13 +58,13 @@ paths: required: true x-body-name: body responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -97,7 +97,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -110,7 +110,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -139,7 +139,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -152,7 +152,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -179,7 +179,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Invalid pet value security: @@ -202,7 +202,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -211,10 +211,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -246,7 +246,7 @@ paths: type: string x-body-name: body responses: - 405: + "405": content: {} description: Invalid input security: @@ -283,7 +283,7 @@ paths: type: string x-body-name: body responses: - 200: + "200": content: application/json: schema: @@ -303,7 +303,7 @@ paths: description: Returns a map of status codes to quantities operationId: get_inventory responses: - 200: + "200": content: application/json: schema: @@ -330,7 +330,7 @@ paths: required: true x-body-name: body responses: - 200: + "200": content: application/xml: schema: @@ -339,7 +339,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -360,10 +360,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -385,7 +385,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -394,10 +394,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -486,7 +486,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -506,7 +506,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -536,10 +536,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -556,7 +556,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -565,10 +565,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -594,10 +594,10 @@ paths: required: true x-body-name: body responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user diff --git a/samples/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml index 7d6c576e67..69c15a8f11 100644 --- a/samples/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml @@ -31,7 +31,7 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 405: + "405": content: {} description: Invalid input security: @@ -56,13 +56,13 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -95,7 +95,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -108,7 +108,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -137,7 +137,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -150,7 +150,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -177,7 +177,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Invalid pet value security: @@ -200,7 +200,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -209,10 +209,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -243,7 +243,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -278,7 +278,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -297,7 +297,7 @@ paths: description: Returns a map of status codes to quantities operationId: get_inventory responses: - 200: + "200": content: application/json: schema: @@ -323,7 +323,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -332,7 +332,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -353,10 +353,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -378,7 +378,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -387,10 +387,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -476,7 +476,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -496,7 +496,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -526,10 +526,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -546,7 +546,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -555,10 +555,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -583,10 +583,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user diff --git a/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml index 7d6c576e67..69c15a8f11 100644 --- a/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml @@ -31,7 +31,7 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 405: + "405": content: {} description: Invalid input security: @@ -56,13 +56,13 @@ paths: description: Pet object that needs to be added to the store required: true responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found - 405: + "405": content: {} description: Validation exception security: @@ -95,7 +95,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -108,7 +108,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid status value security: @@ -137,7 +137,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -150,7 +150,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": content: {} description: Invalid tag value security: @@ -177,7 +177,7 @@ paths: format: int64 type: integer responses: - 400: + "400": content: {} description: Invalid pet value security: @@ -200,7 +200,7 @@ paths: format: int64 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -209,10 +209,10 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Pet not found security: @@ -243,7 +243,7 @@ paths: description: Updated status of the pet type: string responses: - 405: + "405": content: {} description: Invalid input security: @@ -278,7 +278,7 @@ paths: format: binary type: string responses: - 200: + "200": content: application/json: schema: @@ -297,7 +297,7 @@ paths: description: Returns a map of status codes to quantities operationId: get_inventory responses: - 200: + "200": content: application/json: schema: @@ -323,7 +323,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -332,7 +332,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid Order summary: Place an order for a pet @@ -353,10 +353,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Delete purchase order by ID @@ -378,7 +378,7 @@ paths: minimum: 1 type: integer responses: - 200: + "200": content: application/xml: schema: @@ -387,10 +387,10 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": content: {} description: Invalid ID supplied - 404: + "404": content: {} description: Order not found summary: Find purchase order by ID @@ -476,7 +476,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -496,7 +496,7 @@ paths: schema: format: date-time type: string - 400: + "400": content: {} description: Invalid username/password supplied summary: Logs user into the system @@ -526,10 +526,10 @@ paths: schema: type: string responses: - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Delete user @@ -546,7 +546,7 @@ paths: schema: type: string responses: - 200: + "200": content: application/xml: schema: @@ -555,10 +555,10 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": content: {} description: Invalid username supplied - 404: + "404": content: {} description: User not found summary: Get user by user name @@ -583,10 +583,10 @@ paths: description: Updated user object required: true responses: - 400: + "400": content: {} description: Invalid user supplied - 404: + "404": content: {} description: User not found summary: Updated user From 23131c1a63a8e30971c578a7a112cc52aacb7f5c Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sun, 19 Jan 2020 10:42:25 -0500 Subject: [PATCH 76/82] Use HTTPS Maven URL in Kotlin meta generator (#5043) This continues on work in #5033 and #5034 which convert all http usage to https to unblock CircleCI builds. In #5034, mavenCentral() DSL was updated to explicitly target the https maven repo because Gradle didn't force TLS 1.2 until v4.8.1 and many of our examples use earlier versions of Gradle. The Kotlin meta generator was missed because it is a .kts build file rather than build.gradle, and the mustache filename doesn't have kts in it; the file was updated as if it was build.gradle (groovy syntax). --- .../src/main/resources/codegen/kotlin/build_gradle.mustache | 2 +- samples/meta-codegen-kotlin/lib/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache b/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache index 7eb5405326..2a61f06ce2 100644 --- a/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/kotlin/build_gradle.mustache @@ -11,7 +11,7 @@ version = "1.0-SNAPSHOT" repositories { mavenLocal() - maven { url = "https://repo1.maven.org/maven2" } + maven { url = uri("https://repo1.maven.org/maven2") } } dependencies { diff --git a/samples/meta-codegen-kotlin/lib/build.gradle.kts b/samples/meta-codegen-kotlin/lib/build.gradle.kts index d3368ff515..180c7beca8 100644 --- a/samples/meta-codegen-kotlin/lib/build.gradle.kts +++ b/samples/meta-codegen-kotlin/lib/build.gradle.kts @@ -11,7 +11,7 @@ version = "1.0-SNAPSHOT" repositories { mavenLocal() - mavenCentral() + maven { url = uri("https://repo1.maven.org/maven2") } } dependencies { From d61dcc17e0ba371dad170aea831c36aa9f74b42f Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Sun, 19 Jan 2020 11:57:38 -0800 Subject: [PATCH 77/82] [gradle] consistent use of maven url in gradle files (#5045) * wrap maven url with uri function * consistent use of maven url in gradle files --- docs/plugins.md | 4 ++-- modules/openapi-generator-gradle-plugin/README.adoc | 2 +- modules/openapi-generator-gradle-plugin/build.gradle | 4 ++-- .../samples/local-spec/build.gradle | 2 +- .../src/main/resources/Groovy/build.gradle.mustache | 4 ++-- .../src/main/resources/Java/build.gradle.mustache | 4 ++-- .../resources/Java/libraries/feign/build.gradle.mustache | 2 +- .../libraries/google-api-client/build.gradle.mustache | 2 +- .../Java/libraries/jersey2/build.gradle.mustache | 2 +- .../resources/Java/libraries/native/build.gradle.mustache | 4 ++-- .../Java/libraries/okhttp-gson/build.gradle.mustache | 2 +- .../Java/libraries/rest-assured/build.gradle.mustache | 2 +- .../Java/libraries/resteasy/build.gradle.mustache | 2 +- .../Java/libraries/resttemplate/build.gradle.mustache | 2 +- .../Java/libraries/retrofit/build.gradle.mustache | 2 +- .../Java/libraries/retrofit2/build.gradle.mustache | 2 +- .../resources/Java/libraries/vertx/build.gradle.mustache | 2 +- .../main/resources/JavaJaxRS/resteasy/eap/gradle.mustache | 2 +- .../src/main/resources/JavaJaxRS/resteasy/gradle.mustache | 2 +- .../src/main/resources/android/build.mustache | 2 +- .../resources/android/libraries/volley/build.mustache | 2 +- .../main/resources/kotlin-client/build.gradle.mustache | 4 ++-- .../kotlin-server/libraries/ktor/build.gradle.mustache | 8 ++++---- .../src/main/resources/scala-gatling/build.gradle | 2 +- .../main/resources/scala-httpclient/build.gradle.mustache | 2 +- samples/client/petstore/groovy/build.gradle | 4 ++-- samples/client/petstore/java/feign/build.gradle | 2 +- samples/client/petstore/java/feign10x/build.gradle | 2 +- .../client/petstore/java/google-api-client/build.gradle | 2 +- samples/client/petstore/java/jersey1/build.gradle | 4 ++-- samples/client/petstore/java/jersey2-java8/build.gradle | 2 +- samples/client/petstore/java/jersey2/build.gradle | 2 +- samples/client/petstore/java/native/build.gradle | 4 ++-- .../java/okhttp-gson-parcelableModel/build.gradle | 2 +- samples/client/petstore/java/okhttp-gson/build.gradle | 2 +- samples/client/petstore/java/rest-assured/build.gradle | 2 +- samples/client/petstore/java/resteasy/build.gradle | 2 +- .../petstore/java/resttemplate-withXml/build.gradle | 2 +- samples/client/petstore/java/resttemplate/build.gradle | 2 +- samples/client/petstore/java/retrofit/build.gradle | 2 +- .../client/petstore/java/retrofit2-play24/build.gradle | 2 +- .../client/petstore/java/retrofit2-play25/build.gradle | 2 +- .../client/petstore/java/retrofit2-play26/build.gradle | 2 +- samples/client/petstore/java/retrofit2/build.gradle | 2 +- samples/client/petstore/java/retrofit2rx/build.gradle | 2 +- samples/client/petstore/java/retrofit2rx2/build.gradle | 2 +- samples/client/petstore/java/vertx/build.gradle | 2 +- samples/client/petstore/java/webclient/build.gradle | 4 ++-- samples/client/petstore/kotlin-gson/build.gradle | 4 ++-- .../client/petstore/kotlin-json-request-date/build.gradle | 4 ++-- samples/client/petstore/kotlin-moshi-codegen/build.gradle | 4 ++-- samples/client/petstore/kotlin-nonpublic/build.gradle | 4 ++-- samples/client/petstore/kotlin-nullable/build.gradle | 4 ++-- samples/client/petstore/kotlin-okhttp3/build.gradle | 4 ++-- samples/client/petstore/kotlin-retrofit2/build.gradle | 4 ++-- samples/client/petstore/kotlin-string/build.gradle | 4 ++-- samples/client/petstore/kotlin-threetenbp/build.gradle | 4 ++-- samples/client/petstore/kotlin/build.gradle | 4 ++-- .../server/petstore/jaxrs-resteasy/eap-java8/build.gradle | 2 +- .../server/petstore/jaxrs-resteasy/eap-joda/build.gradle | 2 +- samples/server/petstore/jaxrs-resteasy/eap/build.gradle | 2 +- samples/server/petstore/kotlin-server/ktor/build.gradle | 8 ++++---- 62 files changed, 88 insertions(+), 88 deletions(-) diff --git a/docs/plugins.md b/docs/plugins.md index 213c839992..2b46257e39 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -51,7 +51,7 @@ To include in your project, add the following to `build.gradle`: buildscript { repositories { mavenLocal() - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.openapitools:openapi-generator-gradle-plugin:3.3.4" @@ -96,4 +96,4 @@ openApiGenerate { dateLibrary: "java8" ] } -``` \ No newline at end of file +``` diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 88ef8a1f5e..0f97dfb551 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -56,7 +56,7 @@ Using https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_appl buildscript { repositories { mavenLocal() - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } // or, via Gradle Plugin Portal: // url "https://plugins.gradle.org/m2/" } diff --git a/modules/openapi-generator-gradle-plugin/build.gradle b/modules/openapi-generator-gradle-plugin/build.gradle index 8dd9dfa068..d6886b2175 100644 --- a/modules/openapi-generator-gradle-plugin/build.gradle +++ b/modules/openapi-generator-gradle-plugin/build.gradle @@ -2,7 +2,7 @@ buildscript { ext.kotlin_version = '1.3.20' repositories { mavenLocal() - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } maven { url "https://plugins.gradle.org/m2/" } @@ -46,7 +46,7 @@ targetCompatibility = 1.8 repositories { jcenter() - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } mavenLocal() maven { url "https://oss.sonatype.org/content/repositories/releases/" diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle index 6241891c60..70d810a83c 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle @@ -1,7 +1,7 @@ buildscript { repositories { mavenLocal() - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } maven { url "https://plugins.gradle.org/m2/" } diff --git a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache index 969998fd67..915c6ab04b 100644 --- a/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Groovy/build.gradle.mustache @@ -14,7 +14,7 @@ wrapper { buildscript { repositories { maven { url "https://repo1.maven.org/maven2" } - maven { url 'https://repo.jfrog.org/artifactory/gradle-plugins' } + maven { url = 'https://repo.jfrog.org/artifactory/gradle-plugins' } } dependencies { classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.16') @@ -22,7 +22,7 @@ buildscript { } repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } mavenLocal() } diff --git a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache index abfb8653be..69707eadc1 100644 --- a/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -16,7 +16,7 @@ buildscript { } repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache index cd78d9e03d..69170a0317 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache index e190e36cda..0089f90de7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache index 5a162a7d71..30aa47428c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache index a92d040f62..cea6681a95 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache @@ -6,13 +6,13 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } } repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache index 67f7a7cda4..304b00a445 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/build.gradle.mustache @@ -9,7 +9,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache index 0caef5e4aa..b04e53f1e9 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/rest-assured/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache index 5f716aad84..59a0970f35 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index 610d25d147..33d09ae830 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache index 7431d90eba..fab2f0d9fe 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache index 813886e4b5..ea96f09416 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/build.gradle.mustache @@ -6,7 +6,7 @@ version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache index e135bc2212..53bc7b9a8e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/vertx/build.gradle.mustache @@ -5,7 +5,7 @@ group = '{{groupId}}' version = '{{artifactVersion}}' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache index 98e22a8af1..b1f08021b4 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap/gradle.mustache @@ -4,7 +4,7 @@ project.version = "{{artifactVersion}}" project.group = "{{groupId}}" repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache index 924376cb70..6427c11001 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/gradle.mustache @@ -4,7 +4,7 @@ project.version = "{{artifactVersion}}" project.group = "{{groupId}}" repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { diff --git a/modules/openapi-generator/src/main/resources/android/build.mustache b/modules/openapi-generator/src/main/resources/android/build.mustache index ea6766fa05..c26f9b8967 100644 --- a/modules/openapi-generator/src/main/resources/android/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/build.mustache @@ -5,7 +5,7 @@ project.version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache b/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache index f608fe18f7..7c6cb04c85 100644 --- a/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache +++ b/modules/openapi-generator/src/main/resources/android/libraries/volley/build.mustache @@ -5,7 +5,7 @@ project.version = '{{artifactVersion}}' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache index 2e809addf4..765ba75fbe 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache @@ -13,7 +13,7 @@ buildscript { {{/jvm-retrofit2}} repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -26,7 +26,7 @@ apply plugin: 'kotlin-kapt' {{/moshiCodeGen}} repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache index 4f97738c3d..08c317ea66 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache @@ -12,9 +12,9 @@ buildscript { ext.shadow_version = '2.0.3' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } maven { - url "https://plugins.gradle.org/m2/" + url = "https://plugins.gradle.org/m2/" } } dependencies { @@ -50,8 +50,8 @@ shadowJar { } repositories { - maven { url = "https://repo1.maven.org/maven2" } - maven { url "https://dl.bintray.com/kotlin/ktor" } + maven { url "https://repo1.maven.org/maven2" } + maven { url "https://dl.bintray.com/kotlin/ktor" } maven { url "https://dl.bintray.com/kotlin/kotlinx" } } diff --git a/modules/openapi-generator/src/main/resources/scala-gatling/build.gradle b/modules/openapi-generator/src/main/resources/scala-gatling/build.gradle index d4862902bc..a9a3eb68da 100644 --- a/modules/openapi-generator/src/main/resources/scala-gatling/build.gradle +++ b/modules/openapi-generator/src/main/resources/scala-gatling/build.gradle @@ -3,7 +3,7 @@ plugins { } repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { diff --git a/modules/openapi-generator/src/main/resources/scala-httpclient/build.gradle.mustache b/modules/openapi-generator/src/main/resources/scala-httpclient/build.gradle.mustache index 32e77db623..f65046daa6 100644 --- a/modules/openapi-generator/src/main/resources/scala-httpclient/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/scala-httpclient/build.gradle.mustache @@ -109,7 +109,7 @@ ext { repositories { mavenLocal() - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { diff --git a/samples/client/petstore/groovy/build.gradle b/samples/client/petstore/groovy/build.gradle index 9698f14c2a..a97fc77b81 100644 --- a/samples/client/petstore/groovy/build.gradle +++ b/samples/client/petstore/groovy/build.gradle @@ -14,7 +14,7 @@ wrapper { buildscript { repositories { maven { url "https://repo1.maven.org/maven2" } - maven { url 'https://repo.jfrog.org/artifactory/gradle-plugins' } + maven { url = 'https://repo.jfrog.org/artifactory/gradle-plugins' } } dependencies { classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.16') @@ -22,7 +22,7 @@ buildscript { } repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } mavenLocal() } diff --git a/samples/client/petstore/java/feign/build.gradle b/samples/client/petstore/java/feign/build.gradle index fe911616a9..0429acb2f2 100644 --- a/samples/client/petstore/java/feign/build.gradle +++ b/samples/client/petstore/java/feign/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/feign10x/build.gradle b/samples/client/petstore/java/feign10x/build.gradle index 2947fa9fca..e859b17d6f 100644 --- a/samples/client/petstore/java/feign10x/build.gradle +++ b/samples/client/petstore/java/feign10x/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/google-api-client/build.gradle b/samples/client/petstore/java/google-api-client/build.gradle index d708ed3687..520cf4df27 100644 --- a/samples/client/petstore/java/google-api-client/build.gradle +++ b/samples/client/petstore/java/google-api-client/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/jersey1/build.gradle b/samples/client/petstore/java/jersey1/build.gradle index f443c5f9b0..e2d9463cf3 100644 --- a/samples/client/petstore/java/jersey1/build.gradle +++ b/samples/client/petstore/java/jersey1/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -16,7 +16,7 @@ buildscript { } repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } diff --git a/samples/client/petstore/java/jersey2-java8/build.gradle b/samples/client/petstore/java/jersey2-java8/build.gradle index dce5fd6f9f..75ba6b7c88 100644 --- a/samples/client/petstore/java/jersey2-java8/build.gradle +++ b/samples/client/petstore/java/jersey2-java8/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/jersey2/build.gradle b/samples/client/petstore/java/jersey2/build.gradle index 7d37027e24..1f7b540959 100644 --- a/samples/client/petstore/java/jersey2/build.gradle +++ b/samples/client/petstore/java/jersey2/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/native/build.gradle b/samples/client/petstore/java/native/build.gradle index 3eb0149b87..a790b04b52 100644 --- a/samples/client/petstore/java/native/build.gradle +++ b/samples/client/petstore/java/native/build.gradle @@ -6,13 +6,13 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } } repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle index 372a3e0169..39f391d1ca 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/build.gradle @@ -7,7 +7,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/okhttp-gson/build.gradle b/samples/client/petstore/java/okhttp-gson/build.gradle index 1228e8e474..86d58b6003 100644 --- a/samples/client/petstore/java/okhttp-gson/build.gradle +++ b/samples/client/petstore/java/okhttp-gson/build.gradle @@ -7,7 +7,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/rest-assured/build.gradle b/samples/client/petstore/java/rest-assured/build.gradle index 926a6da124..67c6d784de 100644 --- a/samples/client/petstore/java/rest-assured/build.gradle +++ b/samples/client/petstore/java/rest-assured/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/resteasy/build.gradle b/samples/client/petstore/java/resteasy/build.gradle index 8458f28709..1155ae1cd2 100644 --- a/samples/client/petstore/java/resteasy/build.gradle +++ b/samples/client/petstore/java/resteasy/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle index 948c75cd2d..ca80535884 100644 --- a/samples/client/petstore/java/resttemplate-withXml/build.gradle +++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/resttemplate/build.gradle b/samples/client/petstore/java/resttemplate/build.gradle index 3c4f513555..02d5b8477f 100644 --- a/samples/client/petstore/java/resttemplate/build.gradle +++ b/samples/client/petstore/java/resttemplate/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/retrofit/build.gradle b/samples/client/petstore/java/retrofit/build.gradle index 8adb1c97e4..606905649a 100644 --- a/samples/client/petstore/java/retrofit/build.gradle +++ b/samples/client/petstore/java/retrofit/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/retrofit2-play24/build.gradle b/samples/client/petstore/java/retrofit2-play24/build.gradle index 0154e4ac5a..c40aba2faa 100644 --- a/samples/client/petstore/java/retrofit2-play24/build.gradle +++ b/samples/client/petstore/java/retrofit2-play24/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/retrofit2-play25/build.gradle b/samples/client/petstore/java/retrofit2-play25/build.gradle index 5ab96734c2..9bb38877b6 100644 --- a/samples/client/petstore/java/retrofit2-play25/build.gradle +++ b/samples/client/petstore/java/retrofit2-play25/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/retrofit2-play26/build.gradle b/samples/client/petstore/java/retrofit2-play26/build.gradle index 150b921dc0..c090365159 100644 --- a/samples/client/petstore/java/retrofit2-play26/build.gradle +++ b/samples/client/petstore/java/retrofit2-play26/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/retrofit2/build.gradle b/samples/client/petstore/java/retrofit2/build.gradle index 8d6f396a7d..3b1a970bd1 100644 --- a/samples/client/petstore/java/retrofit2/build.gradle +++ b/samples/client/petstore/java/retrofit2/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/retrofit2rx/build.gradle b/samples/client/petstore/java/retrofit2rx/build.gradle index ec0b933d54..5b8f85066e 100644 --- a/samples/client/petstore/java/retrofit2rx/build.gradle +++ b/samples/client/petstore/java/retrofit2rx/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/retrofit2rx2/build.gradle b/samples/client/petstore/java/retrofit2rx2/build.gradle index ece899b42a..dbb70bc027 100644 --- a/samples/client/petstore/java/retrofit2rx2/build.gradle +++ b/samples/client/petstore/java/retrofit2rx2/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { diff --git a/samples/client/petstore/java/vertx/build.gradle b/samples/client/petstore/java/vertx/build.gradle index f0f0aa166a..d62c637c24 100644 --- a/samples/client/petstore/java/vertx/build.gradle +++ b/samples/client/petstore/java/vertx/build.gradle @@ -5,7 +5,7 @@ group = 'org.openapitools' version = '1.0.0' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } diff --git a/samples/client/petstore/java/webclient/build.gradle b/samples/client/petstore/java/webclient/build.gradle index 2b086c3761..ef4781d092 100644 --- a/samples/client/petstore/java/webclient/build.gradle +++ b/samples/client/petstore/java/webclient/build.gradle @@ -6,7 +6,7 @@ version = '1.0.0' buildscript { repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } dependencies { @@ -16,7 +16,7 @@ buildscript { } repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } jcenter() } diff --git a/samples/client/petstore/kotlin-gson/build.gradle b/samples/client/petstore/kotlin-gson/build.gradle index 95954baaf8..b47c939824 100644 --- a/samples/client/petstore/kotlin-gson/build.gradle +++ b/samples/client/petstore/kotlin-gson/build.gradle @@ -10,7 +10,7 @@ buildscript { ext.kotlin_version = '1.3.61' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -20,7 +20,7 @@ buildscript { apply plugin: 'kotlin' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/samples/client/petstore/kotlin-json-request-date/build.gradle b/samples/client/petstore/kotlin-json-request-date/build.gradle index f5b086056f..56be0bd0dd 100644 --- a/samples/client/petstore/kotlin-json-request-date/build.gradle +++ b/samples/client/petstore/kotlin-json-request-date/build.gradle @@ -10,7 +10,7 @@ buildscript { ext.kotlin_version = '1.3.61' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -20,7 +20,7 @@ buildscript { apply plugin: 'kotlin' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/samples/client/petstore/kotlin-moshi-codegen/build.gradle b/samples/client/petstore/kotlin-moshi-codegen/build.gradle index f887698882..3790ead279 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/build.gradle +++ b/samples/client/petstore/kotlin-moshi-codegen/build.gradle @@ -10,7 +10,7 @@ buildscript { ext.kotlin_version = '1.3.61' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -21,7 +21,7 @@ apply plugin: 'kotlin' apply plugin: 'kotlin-kapt' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/samples/client/petstore/kotlin-nonpublic/build.gradle b/samples/client/petstore/kotlin-nonpublic/build.gradle index f5b086056f..56be0bd0dd 100644 --- a/samples/client/petstore/kotlin-nonpublic/build.gradle +++ b/samples/client/petstore/kotlin-nonpublic/build.gradle @@ -10,7 +10,7 @@ buildscript { ext.kotlin_version = '1.3.61' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -20,7 +20,7 @@ buildscript { apply plugin: 'kotlin' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/samples/client/petstore/kotlin-nullable/build.gradle b/samples/client/petstore/kotlin-nullable/build.gradle index f5b086056f..56be0bd0dd 100644 --- a/samples/client/petstore/kotlin-nullable/build.gradle +++ b/samples/client/petstore/kotlin-nullable/build.gradle @@ -10,7 +10,7 @@ buildscript { ext.kotlin_version = '1.3.61' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -20,7 +20,7 @@ buildscript { apply plugin: 'kotlin' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/samples/client/petstore/kotlin-okhttp3/build.gradle b/samples/client/petstore/kotlin-okhttp3/build.gradle index 555fa1a75a..662c2a62ce 100644 --- a/samples/client/petstore/kotlin-okhttp3/build.gradle +++ b/samples/client/petstore/kotlin-okhttp3/build.gradle @@ -10,7 +10,7 @@ buildscript { ext.kotlin_version = '1.3.61' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -20,7 +20,7 @@ buildscript { apply plugin: 'kotlin' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/samples/client/petstore/kotlin-retrofit2/build.gradle b/samples/client/petstore/kotlin-retrofit2/build.gradle index a333a51cb0..392d9a352e 100644 --- a/samples/client/petstore/kotlin-retrofit2/build.gradle +++ b/samples/client/petstore/kotlin-retrofit2/build.gradle @@ -11,7 +11,7 @@ buildscript { ext.retrofitVersion = '2.6.2' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -21,7 +21,7 @@ buildscript { apply plugin: 'kotlin' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/samples/client/petstore/kotlin-string/build.gradle b/samples/client/petstore/kotlin-string/build.gradle index f5b086056f..56be0bd0dd 100644 --- a/samples/client/petstore/kotlin-string/build.gradle +++ b/samples/client/petstore/kotlin-string/build.gradle @@ -10,7 +10,7 @@ buildscript { ext.kotlin_version = '1.3.61' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -20,7 +20,7 @@ buildscript { apply plugin: 'kotlin' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/samples/client/petstore/kotlin-threetenbp/build.gradle b/samples/client/petstore/kotlin-threetenbp/build.gradle index cf6de4c037..886101b0fb 100644 --- a/samples/client/petstore/kotlin-threetenbp/build.gradle +++ b/samples/client/petstore/kotlin-threetenbp/build.gradle @@ -10,7 +10,7 @@ buildscript { ext.kotlin_version = '1.3.61' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -20,7 +20,7 @@ buildscript { apply plugin: 'kotlin' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/samples/client/petstore/kotlin/build.gradle b/samples/client/petstore/kotlin/build.gradle index f5b086056f..56be0bd0dd 100644 --- a/samples/client/petstore/kotlin/build.gradle +++ b/samples/client/petstore/kotlin/build.gradle @@ -10,7 +10,7 @@ buildscript { ext.kotlin_version = '1.3.61' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -20,7 +20,7 @@ buildscript { apply plugin: 'kotlin' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } test { diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle index bc16c9424f..6498d44c2e 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/build.gradle @@ -4,7 +4,7 @@ project.version = "1.0.0" project.group = "org.openapitools" repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle index 1a4dcb70ce..8e189f8148 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/build.gradle @@ -4,7 +4,7 @@ project.version = "1.0.0" project.group = "org.openapitools" repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { diff --git a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle index 1a4dcb70ce..8e189f8148 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/build.gradle +++ b/samples/server/petstore/jaxrs-resteasy/eap/build.gradle @@ -4,7 +4,7 @@ project.version = "1.0.0" project.group = "org.openapitools" repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } } dependencies { diff --git a/samples/server/petstore/kotlin-server/ktor/build.gradle b/samples/server/petstore/kotlin-server/ktor/build.gradle index f595575e6f..25536d4e53 100644 --- a/samples/server/petstore/kotlin-server/ktor/build.gradle +++ b/samples/server/petstore/kotlin-server/ktor/build.gradle @@ -12,9 +12,9 @@ buildscript { ext.shadow_version = '2.0.3' repositories { - maven { url = "https://repo1.maven.org/maven2" } + maven { url "https://repo1.maven.org/maven2" } maven { - url "https://plugins.gradle.org/m2/" + url = "https://plugins.gradle.org/m2/" } } dependencies { @@ -50,8 +50,8 @@ shadowJar { } repositories { - maven { url = "https://repo1.maven.org/maven2" } - maven { url "https://dl.bintray.com/kotlin/ktor" } + maven { url "https://repo1.maven.org/maven2" } + maven { url "https://dl.bintray.com/kotlin/ktor" } maven { url "https://dl.bintray.com/kotlin/kotlinx" } } From bbe88ba635b5227591b4cfda8b882715a6919a11 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sun, 19 Jan 2020 18:02:28 -0500 Subject: [PATCH 78/82] Add docs/installation.md and docsite index to version update script (#5037) --- README.md | 4 ++-- bin/utils/release/release_version_update_docs.sh | 2 ++ docs/installation.md | 14 ++++++++------ website/pages/en/index.js | 5 +++-- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 72a9973d44..2804326fba 100644 --- a/README.md +++ b/README.md @@ -395,10 +395,10 @@ openapi-generator version ``` -Or install a particular OpenAPI Generator version (e.g. v4.1.2): +Or install a particular OpenAPI Generator version (e.g. v4.2.2): ```sh -npm install @openapitools/openapi-generator-cli@cli-4.1.2 -g +npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g ``` Or install it as dev-dependency: diff --git a/bin/utils/release/release_version_update_docs.sh b/bin/utils/release/release_version_update_docs.sh index 9a47f86bbf..cfd66070e9 100755 --- a/bin/utils/release/release_version_update_docs.sh +++ b/bin/utils/release/release_version_update_docs.sh @@ -105,6 +105,8 @@ declare -a xml_files=( "${root}/modules/openapi-generator-maven-plugin/README.md" "${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md" "${root}/README.md" + "${root}/docs/installation.md" + "${root}/website/pages/en/index.js" ) declare -a commented_files=( diff --git a/docs/installation.md b/docs/installation.md index 16cc1005f0..60105c9a9b 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -20,11 +20,11 @@ npm install @openapitools/openapi-generator-cli -g ``` To install a specific version of the tool, pass the version during installation: - + ```bash -npm install @openapitools/openapi-generator-cli@cli-3.3.4 -g +npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g ``` - + To install the tool as a dev dependency in your current project: ```bash @@ -77,21 +77,23 @@ docker run --rm \ > **Platform(s)**: Linux, macOS, Windows + If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar` For **Mac/Linux** users: ```bash -wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar -O openapi-generator-cli.jar +wget https//repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar ``` + After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage. diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 9111b5efcd..698cec5381 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -179,17 +179,18 @@ class Index extends React.Component { const tryNpmContents = stripMargin` | The [NPM package wrapper](https://github.com/openapitools/openapi-generator-cli) is cross-platform wrapper around the .jar artifact. | **Install** globally, exposing the CLI on the command line: - | + | | \`\`\`bash | # install the latest version of "openapi-generator-cli" | npm install @openapitools/openapi-generator-cli -g | | # install a specific version of "openapi-generator-cli" - | npm install @openapitools/openapi-generator-cli@cli-3.0.0 -g + | npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g | | # Or install it as dev-dependency in your node.js projects | npm install @openapitools/openapi-generator-cli -D | \`\`\` + | | | Then, **generate** a ruby client from a valid [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) doc: | \`\`\`bash From 644f720db8d1c6accdbfc9de4641c142baa0e2f6 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sun, 19 Jan 2020 20:19:11 -0500 Subject: [PATCH 79/82] [docs] Sorted doc outputs and clean up duplicated CliOptions (#5046) * [config-help] Sort all outputs * Remove old/stale generator docs (these have been renamed previously) * Sort config doc outputs, making it easier to find relevant info * Fixes cliOptions duplicates Erlang client/proper improperly set the version option as packageName (causing duplicate for packageName). The java and swift option removals are because the options are added in parent classes, resulting in duplication of the options. * Add --github-nested-index for generating docs/generators/README.md * :memo: Regenerate generator docs --- docs/generators/README.md | 235 ++++---- docs/generators/ada-server.md | 148 ++--- docs/generators/ada.md | 148 ++--- docs/generators/android.md | 178 +++--- docs/generators/apache2.md | 26 +- docs/generators/apex.md | 282 ++++----- docs/generators/asciidoc.md | 26 +- docs/generators/aspnetcore.md | 300 +++++----- docs/generators/avro-schema.md | 26 +- docs/generators/bash.md | 68 +-- docs/generators/c.md | 100 ++-- docs/generators/clojure.md | 34 +- docs/generators/cpp-pistache-server.md | 10 +- docs/generators/cpp-qt5-client.md | 188 +++--- docs/generators/cpp-qt5-qhttpengine-server.md | 188 +++--- docs/generators/cpp-restbed-server.md | 182 +++--- docs/generators/cpp-restsdk.md | 184 +++--- docs/generators/cpp-tizen.md | 186 +++--- docs/generators/csharp-dotnet2.md | 242 ++++---- docs/generators/csharp-nancyfx.md | 88 +-- docs/generators/csharp-netcore.md | 272 ++++----- docs/generators/csharp-refactor.md | 29 - docs/generators/csharp.md | 276 ++++----- docs/generators/cwiki.md | 22 +- docs/generators/dart-dio.md | 154 ++--- docs/generators/dart-jaguar.md | 152 ++--- docs/generators/dart.md | 148 ++--- docs/generators/dynamic-html.md | 12 +- docs/generators/eiffel.md | 142 ++--- docs/generators/elixir.md | 46 +- docs/generators/elm.md | 28 +- docs/generators/erlang-client.md | 70 +-- docs/generators/erlang-proper.md | 70 +-- docs/generators/erlang-server.md | 70 +-- docs/generators/flash.md | 56 +- docs/generators/fsharp-functions.md | 278 ++++----- docs/generators/fsharp-giraffe-server.md | 290 +++++----- docs/generators/fsharp-giraffe.md | 25 - docs/generators/go-experimental.md | 100 ++-- docs/generators/go-gin-server.md | 90 +-- docs/generators/go-server.md | 94 +-- docs/generators/go.md | 100 ++-- .../graphql-nodejs-express-server.md | 48 +- docs/generators/graphql-schema.md | 48 +- docs/generators/graphql-server.md | 12 - docs/generators/groovy.md | 210 +++---- docs/generators/grpc-schema.md | 9 - docs/generators/haskell-http-client.md | 112 ++-- docs/generators/haskell.md | 74 +-- docs/generators/html.md | 22 +- docs/generators/html2.md | 30 +- docs/generators/java-inflector.md | 208 +++---- docs/generators/java-msf4j.md | 214 +++---- docs/generators/java-pkmst.md | 220 +++---- docs/generators/java-play-framework.md | 218 +++---- docs/generators/java-undertow-server.md | 208 +++---- docs/generators/java-vertx-web.md | 208 +++---- docs/generators/java-vertx.md | 212 +++---- docs/generators/java.md | 230 ++++---- docs/generators/javascript-closure-angular.md | 96 ++-- docs/generators/javascript-flowtyped.md | 174 +++--- docs/generators/javascript.md | 174 +++--- docs/generators/jaxrs-cxf-cdi.md | 223 ++++--- docs/generators/jaxrs-cxf-client.md | 210 +++---- docs/generators/jaxrs-cxf-extended.md | 252 ++++---- docs/generators/jaxrs-cxf.md | 242 ++++---- docs/generators/jaxrs-jersey.md | 216 +++---- docs/generators/jaxrs-resteasy-eap.md | 215 ++++--- docs/generators/jaxrs-resteasy.md | 214 +++---- docs/generators/jaxrs-spec.md | 222 +++---- docs/generators/jmeter.md | 26 +- docs/generators/kotlin-server.md | 100 ++-- docs/generators/kotlin-spring.md | 124 ++-- docs/generators/kotlin-vertx.md | 88 +-- docs/generators/kotlin.md | 98 ++-- docs/generators/lua.md | 48 +- docs/generators/markdown.md | 26 +- docs/generators/mysql-schema.md | 542 +++++++++--------- docs/generators/nim.md | 170 +++--- docs/generators/nodejs-express-server.md | 82 +-- docs/generators/nodejs-server-deprecated.md | 86 +-- docs/generators/nodejs-server.md | 16 - docs/generators/objc.md | 128 ++--- docs/generators/ocaml-client.md | 13 - docs/generators/ocaml.md | 138 ++--- docs/generators/openapi-yaml.md | 28 +- docs/generators/openapi.md | 26 +- docs/generators/perl.md | 76 +-- docs/generators/php-laravel.md | 164 +++--- docs/generators/php-lumen.md | 164 +++--- docs/generators/php-silex.md | 134 ++--- docs/generators/php-slim-deprecated.md | 144 ++--- docs/generators/php-slim.md | 18 - docs/generators/php-slim4.md | 144 ++--- docs/generators/php-symfony.md | 146 ++--- docs/generators/php-ze-ph.md | 164 +++--- docs/generators/php.md | 144 ++--- docs/generators/powershell.md | 108 ++-- docs/generators/protobuf-schema.md | 26 +- docs/generators/python-aiohttp.md | 100 ++-- docs/generators/python-blueplanet.md | 100 ++-- docs/generators/python-experimental.md | 98 ++-- docs/generators/python-flask.md | 100 ++-- docs/generators/python.md | 94 +-- docs/generators/r.md | 40 +- docs/generators/ruby-on-rails.md | 96 ++-- docs/generators/ruby-sinatra.md | 96 ++-- docs/generators/ruby.md | 122 ++-- docs/generators/rust-server.md | 102 ++-- docs/generators/rust.md | 128 ++--- docs/generators/scala-akka.md | 114 ++-- docs/generators/scala-finch.md | 150 ++--- docs/generators/scala-gatling.md | 128 ++--- .../generators/scala-httpclient-deprecated.md | 130 ++--- docs/generators/scala-httpclient.md | 17 - docs/generators/scala-lagom-server.md | 130 ++--- docs/generators/scala-play-framework.md | 22 - docs/generators/scala-play-server.md | 128 ++--- docs/generators/scalatra.md | 136 ++--- docs/generators/scalaz.md | 130 ++--- docs/generators/spring.md | 246 ++++---- docs/generators/swift2-deprecated.md | 220 +++---- docs/generators/swift3-deprecated.md | 204 +++---- docs/generators/swift4.md | 323 ++++++----- docs/generators/swift5.md | 323 ++++++----- docs/generators/typescript-angular.md | 182 +++--- docs/generators/typescript-angularjs.md | 150 ++--- docs/generators/typescript-aurelia.md | 152 ++--- docs/generators/typescript-axios.md | 156 ++--- docs/generators/typescript-fetch.md | 214 +++---- docs/generators/typescript-inversify.md | 164 +++--- docs/generators/typescript-jquery.md | 162 +++--- docs/generators/typescript-node.md | 164 +++--- docs/generators/typescript-redux-query.md | 208 +++---- docs/generators/typescript-rxjs.md | 194 +++---- .../openapitools/codegen/cmd/ConfigHelp.java | 77 ++- .../codegen/cmd/ListGenerators.java | 10 +- .../languages/ErlangClientCodegen.java | 2 +- .../languages/ErlangProperCodegen.java | 2 +- .../JavaJAXRSCXFCDIServerCodegen.java | 2 - .../JavaResteasyEapServerCodegen.java | 1 - .../codegen/languages/Swift4Codegen.java | 2 - .../languages/Swift5ClientCodegen.java | 2 - 143 files changed, 9131 insertions(+), 9245 deletions(-) delete mode 100644 docs/generators/csharp-refactor.md delete mode 100644 docs/generators/fsharp-giraffe.md delete mode 100644 docs/generators/graphql-server.md delete mode 100644 docs/generators/grpc-schema.md delete mode 100644 docs/generators/nodejs-server.md delete mode 100644 docs/generators/ocaml-client.md delete mode 100644 docs/generators/php-slim.md delete mode 100644 docs/generators/scala-httpclient.md delete mode 100644 docs/generators/scala-play-framework.md diff --git a/docs/generators/README.md b/docs/generators/README.md index 070ef96c15..cd9e5f551c 100644 --- a/docs/generators/README.md +++ b/docs/generators/README.md @@ -1,123 +1,138 @@ + The following generators are available: -* CLIENT generators: - - [ada](ada.md) - - [android](android.md) - - [apex](apex.md) - - [bash](bash.md) - - [c](c.md) - - [clojure](clojure.md) - - [cpp-qt5-client](cpp-qt5-client.md) - - [cpp-restsdk](cpp-restsdk.md) - - [cpp-tizen](cpp-tizen.md) - - [csharp](csharp.md) - - [csharp-dotnet2](csharp-dotnet2.md) - - [csharp-refactor](csharp-refactor.md) - - [dart](dart.md) - - [dart-dio](dart-dio.md) - - [dart-jaguar](dart-jaguar.md) - - [eiffel](eiffel.md) - - [elixir](elixir.md) - - [elm](elm.md) - - [erlang-client](erlang-client.md) - - [erlang-proper](erlang-proper.md) - - [flash](flash.md) - - [go](go.md) - - [groovy](groovy.md) - - [haskell-http-client](haskell-http-client.md) - - [java](java.md) - - [javascript](javascript.md) - - [javascript-closure-angular](javascript-closure-angular.md) - - [javascript-flowtyped](javascript-flowtyped.md) - - [jaxrs-cxf-client](jaxrs-cxf-client.md) - - [jmeter](jmeter.md) - - [kotlin](kotlin.md) - - [lua](lua.md) - - [objc](objc.md) - - [perl](perl.md) - - [php](php.md) - - [powershell](powershell.md) - - [python](python.md) - - [r](r.md) - - [ruby](ruby.md) - - [rust](rust.md) - - [scala-akka](scala-akka.md) - - [scala-gatling](scala-gatling.md) - - [scala-httpclient](scala-httpclient.md) - - [scalaz](scalaz.md) - - [swift2-deprecated](swift2-deprecated.md) - - [swift3-deprecated](swift3-deprecated.md) - - [swift4](swift4.md) - - [typescript-angular](typescript-angular.md) - - [typescript-angularjs](typescript-angularjs.md) - - [typescript-aurelia](typescript-aurelia.md) - - [typescript-axios](typescript-axios.md) - - [typescript-fetch](typescript-fetch.md) - - [typescript-inversify](typescript-inversify.md) - - [typescript-jquery](typescript-jquery.md) - - [typescript-node](typescript-node.md) - - [typescript-rxjs](typescript-rxjs.md) +## CLIENT generators +* [ada](ada.md) +* [android](android.md) +* [apex](apex.md) +* [bash](bash.md) +* [c](c.md) +* [clojure](clojure.md) +* [cpp-qt5-client](cpp-qt5-client.md) +* [cpp-restsdk](cpp-restsdk.md) +* [cpp-tizen](cpp-tizen.md) +* [csharp](csharp.md) +* [csharp-netcore](csharp-netcore.md) +* [dart](dart.md) +* [dart-dio](dart-dio.md) +* [dart-jaguar](dart-jaguar.md) +* [eiffel](eiffel.md) +* [elixir](elixir.md) +* [elm](elm.md) +* [erlang-client](erlang-client.md) +* [erlang-proper](erlang-proper.md) +* [flash](flash.md) +* [go](go.md) +* [go-experimental (experimental)](go-experimental.md) +* [groovy](groovy.md) +* [haskell-http-client](haskell-http-client.md) +* [java](java.md) +* [javascript](javascript.md) +* [javascript-closure-angular](javascript-closure-angular.md) +* [javascript-flowtyped](javascript-flowtyped.md) +* [jaxrs-cxf-client](jaxrs-cxf-client.md) +* [jmeter](jmeter.md) +* [kotlin](kotlin.md) +* [lua](lua.md) +* [nim (beta)](nim.md) +* [objc](objc.md) +* [ocaml](ocaml.md) +* [perl](perl.md) +* [php](php.md) +* [powershell](powershell.md) +* [python](python.md) +* [python-experimental (experimental)](python-experimental.md) +* [r](r.md) +* [ruby](ruby.md) +* [rust](rust.md) +* [scala-akka](scala-akka.md) +* [scala-gatling](scala-gatling.md) +* [scalaz](scalaz.md) +* [swift4](swift4.md) +* [swift5 (beta)](swift5.md) +* [typescript-angular](typescript-angular.md) +* [typescript-angularjs](typescript-angularjs.md) +* [typescript-aurelia](typescript-aurelia.md) +* [typescript-axios](typescript-axios.md) +* [typescript-fetch](typescript-fetch.md) +* [typescript-inversify](typescript-inversify.md) +* [typescript-jquery](typescript-jquery.md) +* [typescript-node](typescript-node.md) +* [typescript-redux-query](typescript-redux-query.md) +* [typescript-rxjs](typescript-rxjs.md) -* SERVER generators: - - [ada-server](ada-server.md) - - [aspnetcore](aspnetcore.md) - - [cpp-pistache-server](cpp-pistache-server.md) - - [cpp-qt5-qhttpengine-server](cpp-qt5-qhttpengine-server.md) - - [cpp-restbed-server](cpp-restbed-server.md) - - [csharp-nancyfx](csharp-nancyfx.md) - - [erlang-server](erlang-server.md) - - [go-gin-server](go-gin-server.md) - - [go-server](go-server.md) - - [graphql-server](graphql-server.md) - - [haskell](haskell.md) - - [java-inflector](java-inflector.md) - - [java-msf4j](java-msf4j.md) - - [java-pkmst](java-pkmst.md) - - [java-play-framework](java-play-framework.md) - - [java-undertow-server](java-undertow-server.md) - - [java-vertx](java-vertx.md) - - [jaxrs-cxf](jaxrs-cxf.md) - - [jaxrs-cxf-cdi](jaxrs-cxf-cdi.md) - - [jaxrs-jersey](jaxrs-jersey.md) - - [jaxrs-resteasy](jaxrs-resteasy.md) - - [jaxrs-resteasy-eap](jaxrs-resteasy-eap.md) - - [jaxrs-spec](jaxrs-spec.md) - - [kotlin-server](kotlin-server.md) - - [kotlin-spring](kotlin-spring.md) - - [nodejs-server](nodejs-server.md) - - [php-laravel](php-laravel.md) - - [php-lumen](php-lumen.md) - - [php-silex](php-silex.md) - - [php-slim](php-slim.md) - - [php-symfony](php-symfony.md) - - [php-ze-ph](php-ze-ph.md) - - [python-flask](python-flask.md) - - [ruby-on-rails](ruby-on-rails.md) - - [ruby-sinatra](ruby-sinatra.md) - - [rust-server](rust-server.md) - - [scala-finch](scala-finch.md) - - [scala-lagom-server](scala-lagom-server.md) - - [scalatra](scalatra.md) - - [spring](spring.md) +## SERVER generators +* [ada-server](ada-server.md) +* [aspnetcore](aspnetcore.md) +* [cpp-pistache-server](cpp-pistache-server.md) +* [cpp-qt5-qhttpengine-server](cpp-qt5-qhttpengine-server.md) +* [cpp-restbed-server](cpp-restbed-server.md) +* [csharp-nancyfx](csharp-nancyfx.md) +* [erlang-server](erlang-server.md) +* [fsharp-functions (beta)](fsharp-functions.md) +* [fsharp-giraffe-server (beta)](fsharp-giraffe-server.md) +* [go-gin-server](go-gin-server.md) +* [go-server](go-server.md) +* [graphql-nodejs-express-server](graphql-nodejs-express-server.md) +* [haskell](haskell.md) +* [java-inflector](java-inflector.md) +* [java-msf4j](java-msf4j.md) +* [java-pkmst](java-pkmst.md) +* [java-play-framework](java-play-framework.md) +* [java-undertow-server](java-undertow-server.md) +* [java-vertx](java-vertx.md) +* [java-vertx-web (beta)](java-vertx-web.md) +* [jaxrs-cxf](jaxrs-cxf.md) +* [jaxrs-cxf-cdi](jaxrs-cxf-cdi.md) +* [jaxrs-cxf-extended](jaxrs-cxf-extended.md) +* [jaxrs-jersey](jaxrs-jersey.md) +* [jaxrs-resteasy](jaxrs-resteasy.md) +* [jaxrs-resteasy-eap](jaxrs-resteasy-eap.md) +* [jaxrs-spec](jaxrs-spec.md) +* [kotlin-server](kotlin-server.md) +* [kotlin-spring](kotlin-spring.md) +* [kotlin-vertx (beta)](kotlin-vertx.md) +* [nodejs-express-server (beta)](nodejs-express-server.md) +* [php-laravel](php-laravel.md) +* [php-lumen](php-lumen.md) +* [php-silex](php-silex.md) +* [php-slim4](php-slim4.md) +* [php-symfony](php-symfony.md) +* [php-ze-ph](php-ze-ph.md) +* [python-aiohttp](python-aiohttp.md) +* [python-blueplanet](python-blueplanet.md) +* [python-flask](python-flask.md) +* [ruby-on-rails](ruby-on-rails.md) +* [ruby-sinatra](ruby-sinatra.md) +* [rust-server](rust-server.md) +* [scala-finch](scala-finch.md) +* [scala-lagom-server](scala-lagom-server.md) +* [scala-play-server](scala-play-server.md) +* [scalatra](scalatra.md) +* [spring](spring.md) -* DOCUMENTATION generators: - - [cwiki](cwiki.md) - - [dynamic-html](dynamic-html.md) - - [html](html.md) - - [html2](html2.md) - - [openapi](openapi.md) - - [openapi-yaml](openapi-yaml.md) +## DOCUMENTATION generators +* [asciidoc](asciidoc.md) +* [cwiki](cwiki.md) +* [dynamic-html](dynamic-html.md) +* [html](html.md) +* [html2](html2.md) +* [markdown (beta)](markdown.md) +* [openapi](openapi.md) +* [openapi-yaml](openapi-yaml.md) -* SCHEMA generators: - - [mysql-schema](mysql-schema.md) +## SCHEMA generators +* [avro-schema (beta)](avro-schema.md) +* [mysql-schema](mysql-schema.md) -* CONFIG generators: - - [apache2](apache2.md) - - [graphql-schema](graphql-schema.md) +## CONFIG generators +* [apache2](apache2.md) +* [graphql-schema](graphql-schema.md) +* [protobuf-schema (beta)](protobuf-schema.md) diff --git a/docs/generators/ada-server.md b/docs/generators/ada-server.md index 174e3fca5f..61f5b1c53e 100644 --- a/docs/generators/ada-server.md +++ b/docs/generators/ada-server.md @@ -5,12 +5,12 @@ sidebar_label: ada-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|GNAT project name| |defaultProject| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -26,88 +26,88 @@ sidebar_label: ada-server ## LANGUAGE PRIMITIVES -
                                                            • Integer
                                                            • -
                                                            • boolean
                                                            • +
                                                              • Boolean
                                                              • Character
                                                              • +
                                                              • Integer
                                                              • +
                                                              • boolean
                                                              • double
                                                              • -
                                                              • integer
                                                              • -
                                                              • Boolean
                                                              • float
                                                              • +
                                                              • integer
                                                              • long
                                                              ## RESERVED WORDS -
                                                              • exception
                                                              • -
                                                              • synchronized
                                                              • -
                                                              • constant
                                                              • -
                                                              • mod
                                                              • -
                                                              • select
                                                              • -
                                                              • declare
                                                              • -
                                                              • separate
                                                              • -
                                                              • use
                                                              • -
                                                              • do
                                                              • -
                                                              • elsif
                                                              • -
                                                              • body
                                                              • -
                                                              • type
                                                              • -
                                                              • while
                                                              • -
                                                              • when
                                                              • -
                                                              • aliased
                                                              • -
                                                              • protected
                                                              • -
                                                              • tagged
                                                              • -
                                                              • else
                                                              • -
                                                              • loop
                                                              • -
                                                              • function
                                                              • -
                                                              • record
                                                              • -
                                                              • raise
                                                              • -
                                                              • rem
                                                              • -
                                                              • if
                                                              • -
                                                              • case
                                                              • -
                                                              • others
                                                              • -
                                                              • all
                                                              • -
                                                              • new
                                                              • -
                                                              • package
                                                              • -
                                                              • in
                                                              • -
                                                              • is
                                                              • -
                                                              • then
                                                              • -
                                                              • pragma
                                                              • -
                                                              • accept
                                                              • -
                                                              • entry
                                                              • -
                                                              • exit
                                                              • -
                                                              • at
                                                              • -
                                                              • delay
                                                              • -
                                                              • task
                                                              • -
                                                              • null
                                                              • -
                                                              • abort
                                                              • -
                                                              • overriding
                                                              • -
                                                              • terminate
                                                              • -
                                                              • begin
                                                              • -
                                                              • some
                                                              • -
                                                              • private
                                                              • -
                                                              • access
                                                              • -
                                                              • for
                                                              • -
                                                              • range
                                                              • -
                                                              • interface
                                                              • -
                                                              • out
                                                              • -
                                                              • not
                                                              • -
                                                              • goto
                                                              • -
                                                              • array
                                                              • -
                                                              • subtype
                                                              • -
                                                              • and
                                                              • -
                                                              • of
                                                              • -
                                                              • end
                                                              • -
                                                              • xor
                                                              • -
                                                              • or
                                                              • -
                                                              • limited
                                                              • +
                                                                • abort
                                                                • +
                                                                • abs
                                                                • abstract
                                                                • -
                                                                • procedure
                                                                • -
                                                                • reverse
                                                                • +
                                                                • accept
                                                                • +
                                                                • access
                                                                • +
                                                                • aliased
                                                                • +
                                                                • all
                                                                • +
                                                                • and
                                                                • +
                                                                • array
                                                                • +
                                                                • at
                                                                • +
                                                                • begin
                                                                • +
                                                                • body
                                                                • +
                                                                • case
                                                                • +
                                                                • constant
                                                                • +
                                                                • declare
                                                                • +
                                                                • delay
                                                                • +
                                                                • digits
                                                                • +
                                                                • do
                                                                • +
                                                                • else
                                                                • +
                                                                • elsif
                                                                • +
                                                                • end
                                                                • +
                                                                • entry
                                                                • +
                                                                • exception
                                                                • +
                                                                • exit
                                                                • +
                                                                • for
                                                                • +
                                                                • function
                                                                • generic
                                                                • +
                                                                • goto
                                                                • +
                                                                • if
                                                                • +
                                                                • in
                                                                • +
                                                                • interface
                                                                • +
                                                                • is
                                                                • +
                                                                • limited
                                                                • +
                                                                • loop
                                                                • +
                                                                • mod
                                                                • +
                                                                • new
                                                                • +
                                                                • not
                                                                • +
                                                                • null
                                                                • +
                                                                • of
                                                                • +
                                                                • or
                                                                • +
                                                                • others
                                                                • +
                                                                • out
                                                                • +
                                                                • overriding
                                                                • +
                                                                • package
                                                                • +
                                                                • pragma
                                                                • +
                                                                • private
                                                                • +
                                                                • procedure
                                                                • +
                                                                • protected
                                                                • +
                                                                • raise
                                                                • +
                                                                • range
                                                                • +
                                                                • record
                                                                • +
                                                                • rem
                                                                • renames
                                                                • requeue
                                                                • -
                                                                • with
                                                                • -
                                                                • abs
                                                                • -
                                                                • digits
                                                                • -
                                                                • until
                                                                • return
                                                                • +
                                                                • reverse
                                                                • +
                                                                • select
                                                                • +
                                                                • separate
                                                                • +
                                                                • some
                                                                • +
                                                                • subtype
                                                                • +
                                                                • synchronized
                                                                • +
                                                                • tagged
                                                                • +
                                                                • task
                                                                • +
                                                                • terminate
                                                                • +
                                                                • then
                                                                • +
                                                                • type
                                                                • +
                                                                • until
                                                                • +
                                                                • use
                                                                • +
                                                                • when
                                                                • +
                                                                • while
                                                                • +
                                                                • with
                                                                • +
                                                                • xor
                                                                diff --git a/docs/generators/ada.md b/docs/generators/ada.md index 4e11f7b5aa..60d6a74739 100644 --- a/docs/generators/ada.md +++ b/docs/generators/ada.md @@ -5,12 +5,12 @@ sidebar_label: ada | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|GNAT project name| |defaultProject| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -26,88 +26,88 @@ sidebar_label: ada ## LANGUAGE PRIMITIVES -
                                                                • Integer
                                                                • -
                                                                • boolean
                                                                • +
                                                                  • Boolean
                                                                  • Character
                                                                  • +
                                                                  • Integer
                                                                  • +
                                                                  • boolean
                                                                  • double
                                                                  • -
                                                                  • integer
                                                                  • -
                                                                  • Boolean
                                                                  • float
                                                                  • +
                                                                  • integer
                                                                  • long
                                                                  ## RESERVED WORDS -
                                                                  • exception
                                                                  • -
                                                                  • synchronized
                                                                  • -
                                                                  • constant
                                                                  • -
                                                                  • mod
                                                                  • -
                                                                  • select
                                                                  • -
                                                                  • declare
                                                                  • -
                                                                  • separate
                                                                  • -
                                                                  • use
                                                                  • -
                                                                  • do
                                                                  • -
                                                                  • elsif
                                                                  • -
                                                                  • body
                                                                  • -
                                                                  • type
                                                                  • -
                                                                  • while
                                                                  • -
                                                                  • when
                                                                  • -
                                                                  • aliased
                                                                  • -
                                                                  • protected
                                                                  • -
                                                                  • tagged
                                                                  • -
                                                                  • else
                                                                  • -
                                                                  • loop
                                                                  • -
                                                                  • function
                                                                  • -
                                                                  • record
                                                                  • -
                                                                  • raise
                                                                  • -
                                                                  • rem
                                                                  • -
                                                                  • if
                                                                  • -
                                                                  • case
                                                                  • -
                                                                  • others
                                                                  • -
                                                                  • all
                                                                  • -
                                                                  • new
                                                                  • -
                                                                  • package
                                                                  • -
                                                                  • in
                                                                  • -
                                                                  • is
                                                                  • -
                                                                  • then
                                                                  • -
                                                                  • pragma
                                                                  • -
                                                                  • accept
                                                                  • -
                                                                  • entry
                                                                  • -
                                                                  • exit
                                                                  • -
                                                                  • at
                                                                  • -
                                                                  • delay
                                                                  • -
                                                                  • task
                                                                  • -
                                                                  • null
                                                                  • -
                                                                  • abort
                                                                  • -
                                                                  • overriding
                                                                  • -
                                                                  • terminate
                                                                  • -
                                                                  • begin
                                                                  • -
                                                                  • some
                                                                  • -
                                                                  • private
                                                                  • -
                                                                  • access
                                                                  • -
                                                                  • for
                                                                  • -
                                                                  • range
                                                                  • -
                                                                  • interface
                                                                  • -
                                                                  • out
                                                                  • -
                                                                  • not
                                                                  • -
                                                                  • goto
                                                                  • -
                                                                  • array
                                                                  • -
                                                                  • subtype
                                                                  • -
                                                                  • and
                                                                  • -
                                                                  • of
                                                                  • -
                                                                  • end
                                                                  • -
                                                                  • xor
                                                                  • -
                                                                  • or
                                                                  • -
                                                                  • limited
                                                                  • +
                                                                    • abort
                                                                    • +
                                                                    • abs
                                                                    • abstract
                                                                    • -
                                                                    • procedure
                                                                    • -
                                                                    • reverse
                                                                    • +
                                                                    • accept
                                                                    • +
                                                                    • access
                                                                    • +
                                                                    • aliased
                                                                    • +
                                                                    • all
                                                                    • +
                                                                    • and
                                                                    • +
                                                                    • array
                                                                    • +
                                                                    • at
                                                                    • +
                                                                    • begin
                                                                    • +
                                                                    • body
                                                                    • +
                                                                    • case
                                                                    • +
                                                                    • constant
                                                                    • +
                                                                    • declare
                                                                    • +
                                                                    • delay
                                                                    • +
                                                                    • digits
                                                                    • +
                                                                    • do
                                                                    • +
                                                                    • else
                                                                    • +
                                                                    • elsif
                                                                    • +
                                                                    • end
                                                                    • +
                                                                    • entry
                                                                    • +
                                                                    • exception
                                                                    • +
                                                                    • exit
                                                                    • +
                                                                    • for
                                                                    • +
                                                                    • function
                                                                    • generic
                                                                    • +
                                                                    • goto
                                                                    • +
                                                                    • if
                                                                    • +
                                                                    • in
                                                                    • +
                                                                    • interface
                                                                    • +
                                                                    • is
                                                                    • +
                                                                    • limited
                                                                    • +
                                                                    • loop
                                                                    • +
                                                                    • mod
                                                                    • +
                                                                    • new
                                                                    • +
                                                                    • not
                                                                    • +
                                                                    • null
                                                                    • +
                                                                    • of
                                                                    • +
                                                                    • or
                                                                    • +
                                                                    • others
                                                                    • +
                                                                    • out
                                                                    • +
                                                                    • overriding
                                                                    • +
                                                                    • package
                                                                    • +
                                                                    • pragma
                                                                    • +
                                                                    • private
                                                                    • +
                                                                    • procedure
                                                                    • +
                                                                    • protected
                                                                    • +
                                                                    • raise
                                                                    • +
                                                                    • range
                                                                    • +
                                                                    • record
                                                                    • +
                                                                    • rem
                                                                    • renames
                                                                    • requeue
                                                                    • -
                                                                    • with
                                                                    • -
                                                                    • abs
                                                                    • -
                                                                    • digits
                                                                    • -
                                                                    • until
                                                                    • return
                                                                    • +
                                                                    • reverse
                                                                    • +
                                                                    • select
                                                                    • +
                                                                    • separate
                                                                    • +
                                                                    • some
                                                                    • +
                                                                    • subtype
                                                                    • +
                                                                    • synchronized
                                                                    • +
                                                                    • tagged
                                                                    • +
                                                                    • task
                                                                    • +
                                                                    • terminate
                                                                    • +
                                                                    • then
                                                                    • +
                                                                    • type
                                                                    • +
                                                                    • until
                                                                    • +
                                                                    • use
                                                                    • +
                                                                    • when
                                                                    • +
                                                                    • while
                                                                    • +
                                                                    • with
                                                                    • +
                                                                    • xor
                                                                    diff --git a/docs/generators/android.md b/docs/generators/android.md index 5af5bd0269..8bcc419aa7 100644 --- a/docs/generators/android.md +++ b/docs/generators/android.md @@ -5,45 +5,45 @@ sidebar_label: android | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| -|apiPackage|package for generated api classes| |null| -|invokerPackage|root package for generated code| |null| -|groupId|groupId for use in the generated build.gradle and pom.xml| |null| -|artifactId|artifactId for use in the generated build.gradle and pom.xml| |null| -|artifactVersion|artifact version for use in the generated build.gradle and pom.xml| |null| -|sourceFolder|source folder for generated code| |null| -|useAndroidMavenGradlePlugin|A flag to toggle android-maven gradle plugin.| |true| +|androidBuildToolsVersion|buildToolsVersion version for use in the generated build.gradle| |null| |androidGradleVersion|gradleVersion version for use in the generated build.gradle| |null| |androidSdkVersion|compileSdkVersion version for use in the generated build.gradle| |null| -|androidBuildToolsVersion|buildToolsVersion version for use in the generated build.gradle| |null| -|serializableModel|boolean - toggle "implements Serializable" for generated models| |false| +|apiPackage|package for generated api classes| |null| +|artifactId|artifactId for use in the generated build.gradle and pom.xml| |null| +|artifactVersion|artifact version for use in the generated build.gradle and pom.xml| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId for use in the generated build.gradle and pom.xml| |null| +|invokerPackage|root package for generated code| |null| |library|library template (sub-template) to use|
                                                                    **volley**
                                                                    HTTP client: Volley 1.0.19 (default)
                                                                    **httpclient**
                                                                    HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be depecreated in the next major release.
                                                                    |null| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|serializableModel|boolean - toggle "implements Serializable" for generated models| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| +|useAndroidMavenGradlePlugin|A flag to toggle android-maven gradle plugin.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -56,81 +56,81 @@ sidebar_label: android ## LANGUAGE PRIMITIVES -
                                                                    • Integer
                                                                    • -
                                                                    • byte[]
                                                                    • +
                                                                      • Boolean
                                                                      • +
                                                                      • Double
                                                                      • Float
                                                                      • -
                                                                      • boolean
                                                                      • +
                                                                      • Integer
                                                                      • Long
                                                                      • Object
                                                                      • String
                                                                      • -
                                                                      • Boolean
                                                                      • -
                                                                      • Double
                                                                      • +
                                                                      • boolean
                                                                      • +
                                                                      • byte[]
                                                                      ## RESERVED WORDS -
                                                                      • synchronized
                                                                      • -
                                                                      • basepath
                                                                      • -
                                                                      • do
                                                                      • -
                                                                      • float
                                                                      • -
                                                                      • while
                                                                      • -
                                                                      • localvarpath
                                                                      • -
                                                                      • protected
                                                                      • -
                                                                      • continue
                                                                      • -
                                                                      • else
                                                                      • -
                                                                      • localvarqueryparams
                                                                      • -
                                                                      • catch
                                                                      • -
                                                                      • if
                                                                      • -
                                                                      • case
                                                                      • -
                                                                      • new
                                                                      • -
                                                                      • package
                                                                      • -
                                                                      • static
                                                                      • -
                                                                      • void
                                                                      • -
                                                                      • double
                                                                      • -
                                                                      • byte
                                                                      • -
                                                                      • finally
                                                                      • -
                                                                      • this
                                                                      • -
                                                                      • strictfp
                                                                      • -
                                                                      • throws
                                                                      • -
                                                                      • enum
                                                                      • -
                                                                      • extends
                                                                      • -
                                                                      • null
                                                                      • -
                                                                      • transient
                                                                      • -
                                                                      • final
                                                                      • -
                                                                      • try
                                                                      • -
                                                                      • localvarbuilder
                                                                      • -
                                                                      • object
                                                                      • -
                                                                      • localvarcontenttypes
                                                                      • -
                                                                      • implements
                                                                      • -
                                                                      • private
                                                                      • -
                                                                      • import
                                                                      • -
                                                                      • const
                                                                      • -
                                                                      • for
                                                                      • -
                                                                      • interface
                                                                      • -
                                                                      • long
                                                                      • -
                                                                      • switch
                                                                      • -
                                                                      • default
                                                                      • -
                                                                      • goto
                                                                      • -
                                                                      • public
                                                                      • -
                                                                      • localvarheaderparams
                                                                      • -
                                                                      • native
                                                                      • -
                                                                      • localvarcontenttype
                                                                      • +
                                                                        • abstract
                                                                        • apiinvoker
                                                                        • assert
                                                                        • -
                                                                        • class
                                                                        • -
                                                                        • localvarformparams
                                                                        • -
                                                                        • break
                                                                        • -
                                                                        • localvarresponse
                                                                        • -
                                                                        • volatile
                                                                        • -
                                                                        • abstract
                                                                        • -
                                                                        • int
                                                                        • -
                                                                        • instanceof
                                                                        • -
                                                                        • super
                                                                        • -
                                                                        • boolean
                                                                        • -
                                                                        • throw
                                                                        • -
                                                                        • localvarpostbody
                                                                        • -
                                                                        • char
                                                                        • -
                                                                        • short
                                                                        • authnames
                                                                        • +
                                                                        • basepath
                                                                        • +
                                                                        • boolean
                                                                        • +
                                                                        • break
                                                                        • +
                                                                        • byte
                                                                        • +
                                                                        • case
                                                                        • +
                                                                        • catch
                                                                        • +
                                                                        • char
                                                                        • +
                                                                        • class
                                                                        • +
                                                                        • const
                                                                        • +
                                                                        • continue
                                                                        • +
                                                                        • default
                                                                        • +
                                                                        • do
                                                                        • +
                                                                        • double
                                                                        • +
                                                                        • else
                                                                        • +
                                                                        • enum
                                                                        • +
                                                                        • extends
                                                                        • +
                                                                        • final
                                                                        • +
                                                                        • finally
                                                                        • +
                                                                        • float
                                                                        • +
                                                                        • for
                                                                        • +
                                                                        • goto
                                                                        • +
                                                                        • if
                                                                        • +
                                                                        • implements
                                                                        • +
                                                                        • import
                                                                        • +
                                                                        • instanceof
                                                                        • +
                                                                        • int
                                                                        • +
                                                                        • interface
                                                                        • +
                                                                        • localvarbuilder
                                                                        • +
                                                                        • localvarcontenttype
                                                                        • +
                                                                        • localvarcontenttypes
                                                                        • +
                                                                        • localvarformparams
                                                                        • +
                                                                        • localvarheaderparams
                                                                        • +
                                                                        • localvarpath
                                                                        • +
                                                                        • localvarpostbody
                                                                        • +
                                                                        • localvarqueryparams
                                                                        • +
                                                                        • localvarresponse
                                                                        • +
                                                                        • long
                                                                        • +
                                                                        • native
                                                                        • +
                                                                        • new
                                                                        • +
                                                                        • null
                                                                        • +
                                                                        • object
                                                                        • +
                                                                        • package
                                                                        • +
                                                                        • private
                                                                        • +
                                                                        • protected
                                                                        • +
                                                                        • public
                                                                        • return
                                                                        • +
                                                                        • short
                                                                        • +
                                                                        • static
                                                                        • +
                                                                        • strictfp
                                                                        • +
                                                                        • super
                                                                        • +
                                                                        • switch
                                                                        • +
                                                                        • synchronized
                                                                        • +
                                                                        • this
                                                                        • +
                                                                        • throw
                                                                        • +
                                                                        • throws
                                                                        • +
                                                                        • transient
                                                                        • +
                                                                        • try
                                                                        • +
                                                                        • void
                                                                        • +
                                                                        • volatile
                                                                        • +
                                                                        • while
                                                                        diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index 1c431f4e36..80dbcb60ff 100644 --- a/docs/generators/apache2.md +++ b/docs/generators/apache2.md @@ -5,33 +5,33 @@ sidebar_label: apache2 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |userInfoPath|Path to the user and group files| |null| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES diff --git a/docs/generators/apex.md b/docs/generators/apex.md index 414f2b1188..d80fb0f3fe 100644 --- a/docs/generators/apex.md +++ b/docs/generators/apex.md @@ -5,15 +5,15 @@ sidebar_label: apex | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|classPrefix|Prefix for generated classes. Set this to avoid overwriting existing classes in your org.| |null| |apiVersion|The Metadata API version number to use for components in this package.| |null| |buildMethod|The build method for this package.| |null| +|classPrefix|Prefix for generated classes. Set this to avoid overwriting existing classes in your org.| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |namedCredential|The named credential name for the HTTP callouts| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -32,155 +32,155 @@ sidebar_label: apex ## LANGUAGE PRIMITIVES
                                                                        • Blob
                                                                        • -
                                                                        • Time
                                                                        • -
                                                                        • String
                                                                        • -
                                                                        • Double
                                                                        • +
                                                                        • Boolean
                                                                        • Date
                                                                        • -
                                                                        • Integer
                                                                        • +
                                                                        • Datetime
                                                                        • Decimal
                                                                        • +
                                                                        • Double
                                                                        • +
                                                                        • ID
                                                                        • +
                                                                        • Integer
                                                                        • Long
                                                                        • Object
                                                                        • -
                                                                        • ID
                                                                        • -
                                                                        • Boolean
                                                                        • -
                                                                        • Datetime
                                                                        • +
                                                                        • String
                                                                        • +
                                                                        • Time
                                                                        ## RESERVED WORDS -
                                                                        • exception
                                                                        • -
                                                                        • select
                                                                        • -
                                                                        • commit
                                                                        • -
                                                                        • type
                                                                        • -
                                                                        • when
                                                                        • -
                                                                        • cast
                                                                        • -
                                                                        • number
                                                                        • -
                                                                        • protected
                                                                        • -
                                                                        • else
                                                                        • -
                                                                        • merge
                                                                        • -
                                                                        • next_90_days
                                                                        • -
                                                                        • catch
                                                                        • -
                                                                        • join
                                                                        • -
                                                                        • if
                                                                        • -
                                                                        • case
                                                                        • -
                                                                        • using
                                                                        • -
                                                                        • having
                                                                        • -
                                                                        • last_month
                                                                        • -
                                                                        • in
                                                                        • -
                                                                        • byte
                                                                        • -
                                                                        • outer
                                                                        • -
                                                                        • tomorrow
                                                                        • -
                                                                        • upsert
                                                                        • -
                                                                        • then
                                                                        • -
                                                                        • enum
                                                                        • -
                                                                        • exit
                                                                        • -
                                                                        • as
                                                                        • -
                                                                        • system
                                                                        • -
                                                                        • bulk
                                                                        • -
                                                                        • begin
                                                                        • -
                                                                        • object
                                                                        • -
                                                                        • global
                                                                        • -
                                                                        • long
                                                                        • -
                                                                        • next_week
                                                                        • -
                                                                        • into
                                                                        • -
                                                                        • default
                                                                        • -
                                                                        • search
                                                                        • -
                                                                        • goto
                                                                        • -
                                                                        • by
                                                                        • -
                                                                        • currency
                                                                        • -
                                                                        • where
                                                                        • -
                                                                        • override
                                                                        • -
                                                                        • map
                                                                        • -
                                                                        • rollback
                                                                        • -
                                                                        • stat
                                                                        • -
                                                                        • set
                                                                        • -
                                                                        • break
                                                                        • -
                                                                        • last_90_days
                                                                        • -
                                                                        • abstract
                                                                        • -
                                                                        • trigger
                                                                        • -
                                                                        • this_week
                                                                        • -
                                                                        • asc
                                                                        • -
                                                                        • testmethod
                                                                        • -
                                                                        • throw
                                                                        • -
                                                                        • future
                                                                        • -
                                                                        • returning
                                                                        • -
                                                                        • char
                                                                        • -
                                                                        • webservice
                                                                        • -
                                                                        • return
                                                                        • -
                                                                        • transaction
                                                                        • -
                                                                        • date
                                                                        • -
                                                                        • synchronized
                                                                        • -
                                                                        • tolabel
                                                                        • -
                                                                        • nulls
                                                                        • -
                                                                        • next_month
                                                                        • -
                                                                        • autonomous
                                                                        • -
                                                                        • do
                                                                        • -
                                                                        • float
                                                                        • -
                                                                        • while
                                                                        • -
                                                                        • datetime
                                                                        • -
                                                                        • continue
                                                                        • -
                                                                        • loop
                                                                        • -
                                                                        • limit
                                                                        • -
                                                                        • from
                                                                        • -
                                                                        • export
                                                                        • -
                                                                        • group
                                                                        • -
                                                                        • new
                                                                        • -
                                                                        • package
                                                                        • -
                                                                        • static
                                                                        • -
                                                                        • like
                                                                        • -
                                                                        • finally
                                                                        • -
                                                                        • this
                                                                        • -
                                                                        • sort
                                                                        • -
                                                                        • list
                                                                        • -
                                                                        • inner
                                                                        • -
                                                                        • pragma
                                                                        • -
                                                                        • blob
                                                                        • -
                                                                        • this_month
                                                                        • -
                                                                        • convertcurrency
                                                                        • -
                                                                        • extends
                                                                        • -
                                                                        • null
                                                                        • -
                                                                        • hint
                                                                        • +
                                                                          • abstract
                                                                          • activate
                                                                          • -
                                                                          • final
                                                                          • -
                                                                          • true
                                                                          • -
                                                                          • retrieve
                                                                          • -
                                                                          • undelete
                                                                          • -
                                                                          • try
                                                                          • -
                                                                          • decimal
                                                                          • -
                                                                          • collect
                                                                          • -
                                                                          • next_n_days
                                                                          • -
                                                                          • desc
                                                                          • -
                                                                          • implements
                                                                          • -
                                                                          • private
                                                                          • -
                                                                          • virtual
                                                                          • -
                                                                          • const
                                                                          • -
                                                                          • import
                                                                          • -
                                                                          • for
                                                                          • -
                                                                          • insert
                                                                          • -
                                                                          • update
                                                                          • -
                                                                          • interface
                                                                          • -
                                                                          • delete
                                                                          • -
                                                                          • switch
                                                                          • -
                                                                          • yesterday
                                                                          • -
                                                                          • not
                                                                          • -
                                                                          • public
                                                                          • -
                                                                          • array
                                                                          • -
                                                                          • parallel
                                                                          • -
                                                                          • savepoint
                                                                          • and
                                                                          • -
                                                                          • of
                                                                          • -
                                                                          • today
                                                                          • -
                                                                          • end
                                                                          • +
                                                                          • any
                                                                          • +
                                                                          • array
                                                                          • +
                                                                          • as
                                                                          • +
                                                                          • asc
                                                                          • +
                                                                          • autonomous
                                                                          • +
                                                                          • begin
                                                                          • +
                                                                          • bigdecimal
                                                                          • +
                                                                          • blob
                                                                          • +
                                                                          • break
                                                                          • +
                                                                          • bulk
                                                                          • +
                                                                          • by
                                                                          • +
                                                                          • byte
                                                                          • +
                                                                          • case
                                                                          • +
                                                                          • cast
                                                                          • +
                                                                          • catch
                                                                          • +
                                                                          • char
                                                                          • class
                                                                          • +
                                                                          • collect
                                                                          • +
                                                                          • commit
                                                                          • +
                                                                          • const
                                                                          • +
                                                                          • continue
                                                                          • +
                                                                          • convertcurrency
                                                                          • +
                                                                          • currency
                                                                          • +
                                                                          • date
                                                                          • +
                                                                          • datetime
                                                                          • +
                                                                          • decimal
                                                                          • +
                                                                          • default
                                                                          • +
                                                                          • delete
                                                                          • +
                                                                          • desc
                                                                          • +
                                                                          • do
                                                                          • +
                                                                          • else
                                                                          • +
                                                                          • end
                                                                          • +
                                                                          • enum
                                                                          • +
                                                                          • exception
                                                                          • +
                                                                          • exit
                                                                          • +
                                                                          • export
                                                                          • +
                                                                          • extends
                                                                          • +
                                                                          • false
                                                                          • +
                                                                          • final
                                                                          • +
                                                                          • finally
                                                                          • +
                                                                          • float
                                                                          • +
                                                                          • for
                                                                          • +
                                                                          • from
                                                                          • +
                                                                          • future
                                                                          • +
                                                                          • global
                                                                          • +
                                                                          • goto
                                                                          • +
                                                                          • group
                                                                          • +
                                                                          • having
                                                                          • +
                                                                          • hint
                                                                          • +
                                                                          • if
                                                                          • +
                                                                          • implements
                                                                          • +
                                                                          • import
                                                                          • +
                                                                          • in
                                                                          • +
                                                                          • inner
                                                                          • +
                                                                          • insert
                                                                          • +
                                                                          • instanceof
                                                                          • +
                                                                          • int
                                                                          • +
                                                                          • interface
                                                                          • +
                                                                          • into
                                                                          • +
                                                                          • join
                                                                          • +
                                                                          • last_90_days
                                                                          • +
                                                                          • last_month
                                                                          • +
                                                                          • last_n_days
                                                                          • +
                                                                          • last_week
                                                                          • +
                                                                          • like
                                                                          • +
                                                                          • limit
                                                                          • +
                                                                          • list
                                                                          • +
                                                                          • long
                                                                          • +
                                                                          • loop
                                                                          • +
                                                                          • map
                                                                          • +
                                                                          • merge
                                                                          • +
                                                                          • new
                                                                          • +
                                                                          • next_90_days
                                                                          • +
                                                                          • next_month
                                                                          • +
                                                                          • next_n_days
                                                                          • +
                                                                          • next_week
                                                                          • +
                                                                          • not
                                                                          • +
                                                                          • null
                                                                          • +
                                                                          • nulls
                                                                          • +
                                                                          • number
                                                                          • +
                                                                          • object
                                                                          • +
                                                                          • of
                                                                          • on
                                                                          • or
                                                                          • -
                                                                          • bigdecimal
                                                                          • -
                                                                          • false
                                                                          • -
                                                                          • any
                                                                          • -
                                                                          • int
                                                                          • -
                                                                          • instanceof
                                                                          • -
                                                                          • super
                                                                          • -
                                                                          • last_n_days
                                                                          • +
                                                                          • outer
                                                                          • +
                                                                          • override
                                                                          • +
                                                                          • package
                                                                          • +
                                                                          • parallel
                                                                          • +
                                                                          • pragma
                                                                          • +
                                                                          • private
                                                                          • +
                                                                          • protected
                                                                          • +
                                                                          • public
                                                                          • +
                                                                          • retrieve
                                                                          • +
                                                                          • return
                                                                          • +
                                                                          • returning
                                                                          • +
                                                                          • rollback
                                                                          • +
                                                                          • savepoint
                                                                          • +
                                                                          • search
                                                                          • +
                                                                          • select
                                                                          • +
                                                                          • set
                                                                          • short
                                                                          • +
                                                                          • sort
                                                                          • +
                                                                          • stat
                                                                          • +
                                                                          • static
                                                                          • +
                                                                          • super
                                                                          • +
                                                                          • switch
                                                                          • +
                                                                          • synchronized
                                                                          • +
                                                                          • system
                                                                          • +
                                                                          • testmethod
                                                                          • +
                                                                          • then
                                                                          • +
                                                                          • this
                                                                          • +
                                                                          • this_month
                                                                          • +
                                                                          • this_week
                                                                          • +
                                                                          • throw
                                                                          • time
                                                                          • -
                                                                          • last_week
                                                                          • +
                                                                          • today
                                                                          • +
                                                                          • tolabel
                                                                          • +
                                                                          • tomorrow
                                                                          • +
                                                                          • transaction
                                                                          • +
                                                                          • trigger
                                                                          • +
                                                                          • true
                                                                          • +
                                                                          • try
                                                                          • +
                                                                          • type
                                                                          • +
                                                                          • undelete
                                                                          • +
                                                                          • update
                                                                          • +
                                                                          • upsert
                                                                          • +
                                                                          • using
                                                                          • +
                                                                          • virtual
                                                                          • +
                                                                          • webservice
                                                                          • +
                                                                          • when
                                                                          • +
                                                                          • where
                                                                          • +
                                                                          • while
                                                                          • +
                                                                          • yesterday
                                                                          diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md index fc7a99c182..9243aaface 100644 --- a/docs/generators/asciidoc.md +++ b/docs/generators/asciidoc.md @@ -5,24 +5,24 @@ sidebar_label: asciidoc | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|appName|short name of the application| |null| |appDescription|description of the application| |null| -|infoUrl|a URL where users can get more information about the application| |null| -|infoEmail|an email address to contact for inquiries about the application| |null| -|licenseInfo|a short description of the license| |null| -|licenseUrl|a URL pointing to the full license| |null| -|invokerPackage|root package for generated code| |null| -|groupId|groupId in generated pom.xml| |null| +|appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| -|snippetDir|path with includable markup snippets (e.g. test output generated by restdoc, default: .)| |.| -|specDir|path with includable markup spec files (e.g. handwritten additional docs, default: ..)| |..| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId in generated pom.xml| |null| |headerAttributes|generation of asciidoc header meta data attributes (set to false to suppress, default: true)| |true| +|infoEmail|an email address to contact for inquiries about the application| |null| +|infoUrl|a URL where users can get more information about the application| |null| +|invokerPackage|root package for generated code| |null| +|licenseInfo|a short description of the license| |null| +|licenseUrl|a URL pointing to the full license| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snippetDir|path with includable markup snippets (e.g. test output generated by restdoc, default: .)| |.| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|specDir|path with includable markup spec files (e.g. handwritten additional docs, default: ..)| |..| ## IMPORT MAPPING diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index 25d5b2ad5c..eda0e8a9f2 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -5,37 +5,37 @@ sidebar_label: aspnetcore | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|licenseUrl|The URL of the license| |http://localhost| -|licenseName|The name of the license| |NoLicense| -|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| -|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| -|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| -|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| -|packageVersion|C# package version.| |1.0.0| -|packageGuid|The GUID that will be associated with the C# project| |null| -|sourceFolder|source folder for generated code| |src| -|compatibilityVersion|ASP.Net Core CompatibilityVersion| |Version_2_2| |aspnetCoreVersion|ASP.NET Core version: 3.0 (preview4 only), 2.2, 2.1, 2.0 (deprecated)| |2.2| -|swashbuckleVersion|Swashbucke version: 3.0.0, 4.0.0| |3.0.0| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |true| -|isLibrary|Is the build a library| |false| -|useFrameworkReference|Use frameworkReference for ASP.NET Core 3.0+ and PackageReference ASP.NET Core 2.2 or earlier.| |false| -|useNewtonsoft|Uses the Newtonsoft JSON library.| |true| -|newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0-preview5-19227-01| -|useDefaultRouting|Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.| |true| +|buildTarget|Target to build an application or library| |program| +|classModifier|Class Modifier can be empty, abstract| || +|compatibilityVersion|ASP.Net Core CompatibilityVersion| |Version_2_2| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumValueSuffix|Suffix that will be appended to all enum values.| |Enum| -|classModifier|Class Modifier can be empty, abstract| || -|operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual| -|buildTarget|Target to build an application or library| |program| |generateBody|Generates method body.| |true| -|operationIsAsync|Set methods to async or sync (default).| |false| -|operationResultTask|Set methods result to Task<>.| |false| +|isLibrary|Is the build a library| |false| +|licenseName|The name of the license| |NoLicense| +|licenseUrl|The URL of the license| |http://localhost| |modelClassModifier|Model Class Modifier can be nothing or partial| |partial| +|newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0-preview5-19227-01| +|operationIsAsync|Set methods to async or sync (default).| |false| +|operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual| +|operationResultTask|Set methods result to Task<>.| |false| +|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| +|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| +|packageGuid|The GUID that will be associated with the C# project| |null| +|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| +|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| +|packageVersion|C# package version.| |1.0.0| +|returnICollection|Return ICollection<T> instead of the concrete type.| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|swashbuckleVersion|Swashbucke version: 3.0.0, 4.0.0| |3.0.0| +|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| +|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| +|useDefaultRouting|Use default routing for the ASP.NET Core version. For 3.0 turn off default because it is not yet supported.| |true| +|useFrameworkReference|Use frameworkReference for ASP.NET Core 3.0+ and PackageReference ASP.NET Core 2.2 or earlier.| |false| +|useNewtonsoft|Uses the Newtonsoft JSON library.| |true| +|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |true| ## IMPORT MAPPING @@ -54,138 +54,138 @@ sidebar_label: aspnetcore ## LANGUAGE PRIMITIVES -
                                                                          • int?
                                                                          • -
                                                                          • Dictionary
                                                                          • -
                                                                          • string
                                                                          • -
                                                                          • bool
                                                                          • -
                                                                          • DateTimeOffset?
                                                                          • -
                                                                          • String
                                                                          • -
                                                                          • Guid
                                                                          • -
                                                                          • System.IO.Stream
                                                                          • -
                                                                          • bool?
                                                                          • -
                                                                          • float
                                                                          • -
                                                                          • long
                                                                          • -
                                                                          • DateTime
                                                                          • -
                                                                          • Int32
                                                                          • -
                                                                          • float?
                                                                          • -
                                                                          • DateTime?
                                                                          • -
                                                                          • List
                                                                          • -
                                                                          • Boolean
                                                                          • -
                                                                          • long?
                                                                          • -
                                                                          • double
                                                                          • -
                                                                          • Guid?
                                                                          • -
                                                                          • DateTimeOffset
                                                                          • -
                                                                          • Double
                                                                          • -
                                                                          • int
                                                                          • -
                                                                          • byte[]
                                                                          • -
                                                                          • Float
                                                                          • -
                                                                          • Int64
                                                                          • -
                                                                          • double?
                                                                          • -
                                                                          • ICollection
                                                                          • +
                                                                            • Boolean
                                                                            • Collection
                                                                            • +
                                                                            • DateTime
                                                                            • +
                                                                            • DateTime?
                                                                            • +
                                                                            • DateTimeOffset
                                                                            • +
                                                                            • DateTimeOffset?
                                                                            • +
                                                                            • Dictionary
                                                                            • +
                                                                            • Double
                                                                            • +
                                                                            • Float
                                                                            • +
                                                                            • Guid
                                                                            • +
                                                                            • Guid?
                                                                            • +
                                                                            • ICollection
                                                                            • +
                                                                            • Int32
                                                                            • +
                                                                            • Int64
                                                                            • +
                                                                            • List
                                                                            • Object
                                                                            • -
                                                                            • decimal?
                                                                            • +
                                                                            • String
                                                                            • +
                                                                            • System.IO.Stream
                                                                            • +
                                                                            • bool
                                                                            • +
                                                                            • bool?
                                                                            • +
                                                                            • byte[]
                                                                            • decimal
                                                                            • +
                                                                            • decimal?
                                                                            • +
                                                                            • double
                                                                            • +
                                                                            • double?
                                                                            • +
                                                                            • float
                                                                            • +
                                                                            • float?
                                                                            • +
                                                                            • int
                                                                            • +
                                                                            • int?
                                                                            • +
                                                                            • long
                                                                            • +
                                                                            • long?
                                                                            • +
                                                                            • string
                                                                            ## RESERVED WORDS -
                                                                            • struct
                                                                            • -
                                                                            • ushort
                                                                            • -
                                                                            • localVarQueryParams
                                                                            • -
                                                                            • protected
                                                                            • -
                                                                            • readonly
                                                                            • -
                                                                            • else
                                                                            • -
                                                                            • lock
                                                                            • -
                                                                            • localVarPathParams
                                                                            • -
                                                                            • catch
                                                                            • -
                                                                            • if
                                                                            • -
                                                                            • case
                                                                            • -
                                                                            • localVarHttpHeaderAccepts
                                                                            • -
                                                                            • using
                                                                            • -
                                                                            • localVarPostBody
                                                                            • -
                                                                            • in
                                                                            • -
                                                                            • byte
                                                                            • -
                                                                            • double
                                                                            • -
                                                                            • var
                                                                            • -
                                                                            • is
                                                                            • -
                                                                            • params
                                                                            • -
                                                                            • enum
                                                                            • -
                                                                            • explicit
                                                                            • -
                                                                            • as
                                                                            • -
                                                                            • object
                                                                            • -
                                                                            • implicit
                                                                            • -
                                                                            • internal
                                                                            • -
                                                                            • localVarHttpHeaderAccept
                                                                            • -
                                                                            • unsafe
                                                                            • -
                                                                            • long
                                                                            • -
                                                                            • out
                                                                            • -
                                                                            • delegate
                                                                            • -
                                                                            • default
                                                                            • -
                                                                            • goto
                                                                            • -
                                                                            • localVarHttpContentTypes
                                                                            • -
                                                                            • localVarHttpContentType
                                                                            • -
                                                                            • yield
                                                                            • -
                                                                            • override
                                                                            • -
                                                                            • event
                                                                            • -
                                                                            • typeof
                                                                            • -
                                                                            • break
                                                                            • +
                                                                              • Client
                                                                              • abstract
                                                                              • -
                                                                              • uint
                                                                              • -
                                                                              • throw
                                                                              • -
                                                                              • char
                                                                              • -
                                                                              • sbyte
                                                                              • -
                                                                              • localVarFileParams
                                                                              • -
                                                                              • return
                                                                              • -
                                                                              • extern
                                                                              • -
                                                                              • do
                                                                              • -
                                                                              • float
                                                                              • -
                                                                              • while
                                                                              • -
                                                                              • operator
                                                                              • -
                                                                              • ref
                                                                              • -
                                                                              • continue
                                                                              • -
                                                                              • checked
                                                                              • -
                                                                              • dynamic
                                                                              • -
                                                                              • Client
                                                                              • -
                                                                              • new
                                                                              • -
                                                                              • static
                                                                              • -
                                                                              • void
                                                                              • -
                                                                              • sizeof
                                                                              • -
                                                                              • localVarResponse
                                                                              • -
                                                                              • sealed
                                                                              • -
                                                                              • finally
                                                                              • -
                                                                              • this
                                                                              • -
                                                                              • unchecked
                                                                              • -
                                                                              • null
                                                                              • -
                                                                              • localVarPath
                                                                              • -
                                                                              • true
                                                                              • -
                                                                              • fixed
                                                                              • -
                                                                              • try
                                                                              • -
                                                                              • decimal
                                                                              • -
                                                                              • private
                                                                              • -
                                                                              • virtual
                                                                              • -
                                                                              • bool
                                                                              • -
                                                                              • const
                                                                              • -
                                                                              • string
                                                                              • -
                                                                              • for
                                                                              • -
                                                                              • interface
                                                                              • -
                                                                              • switch
                                                                              • -
                                                                              • foreach
                                                                              • -
                                                                              • ulong
                                                                              • -
                                                                              • public
                                                                              • -
                                                                              • localVarStatusCode
                                                                              • -
                                                                              • stackalloc
                                                                              • -
                                                                              • parameter
                                                                              • -
                                                                              • await
                                                                              • -
                                                                              • client
                                                                              • -
                                                                              • class
                                                                              • -
                                                                              • localVarFormParams
                                                                              • -
                                                                              • false
                                                                              • -
                                                                              • volatile
                                                                              • -
                                                                              • int
                                                                              • +
                                                                              • as
                                                                              • async
                                                                              • -
                                                                              • localVarHeaderParams
                                                                              • -
                                                                              • namespace
                                                                              • -
                                                                              • short
                                                                              • +
                                                                              • await
                                                                              • base
                                                                              • +
                                                                              • bool
                                                                              • +
                                                                              • break
                                                                              • +
                                                                              • byte
                                                                              • +
                                                                              • case
                                                                              • +
                                                                              • catch
                                                                              • +
                                                                              • char
                                                                              • +
                                                                              • checked
                                                                              • +
                                                                              • class
                                                                              • +
                                                                              • client
                                                                              • +
                                                                              • const
                                                                              • +
                                                                              • continue
                                                                              • +
                                                                              • decimal
                                                                              • +
                                                                              • default
                                                                              • +
                                                                              • delegate
                                                                              • +
                                                                              • do
                                                                              • +
                                                                              • double
                                                                              • +
                                                                              • dynamic
                                                                              • +
                                                                              • else
                                                                              • +
                                                                              • enum
                                                                              • +
                                                                              • event
                                                                              • +
                                                                              • explicit
                                                                              • +
                                                                              • extern
                                                                              • +
                                                                              • false
                                                                              • +
                                                                              • finally
                                                                              • +
                                                                              • fixed
                                                                              • +
                                                                              • float
                                                                              • +
                                                                              • for
                                                                              • +
                                                                              • foreach
                                                                              • +
                                                                              • goto
                                                                              • +
                                                                              • if
                                                                              • +
                                                                              • implicit
                                                                              • +
                                                                              • in
                                                                              • +
                                                                              • int
                                                                              • +
                                                                              • interface
                                                                              • +
                                                                              • internal
                                                                              • +
                                                                              • is
                                                                              • +
                                                                              • localVarFileParams
                                                                              • +
                                                                              • localVarFormParams
                                                                              • +
                                                                              • localVarHeaderParams
                                                                              • +
                                                                              • localVarHttpContentType
                                                                              • +
                                                                              • localVarHttpContentTypes
                                                                              • +
                                                                              • localVarHttpHeaderAccept
                                                                              • +
                                                                              • localVarHttpHeaderAccepts
                                                                              • +
                                                                              • localVarPath
                                                                              • +
                                                                              • localVarPathParams
                                                                              • +
                                                                              • localVarPostBody
                                                                              • +
                                                                              • localVarQueryParams
                                                                              • +
                                                                              • localVarResponse
                                                                              • +
                                                                              • localVarStatusCode
                                                                              • +
                                                                              • lock
                                                                              • +
                                                                              • long
                                                                              • +
                                                                              • namespace
                                                                              • +
                                                                              • new
                                                                              • +
                                                                              • null
                                                                              • +
                                                                              • object
                                                                              • +
                                                                              • operator
                                                                              • +
                                                                              • out
                                                                              • +
                                                                              • override
                                                                              • +
                                                                              • parameter
                                                                              • +
                                                                              • params
                                                                              • +
                                                                              • private
                                                                              • +
                                                                              • protected
                                                                              • +
                                                                              • public
                                                                              • +
                                                                              • readonly
                                                                              • +
                                                                              • ref
                                                                              • +
                                                                              • return
                                                                              • +
                                                                              • sbyte
                                                                              • +
                                                                              • sealed
                                                                              • +
                                                                              • short
                                                                              • +
                                                                              • sizeof
                                                                              • +
                                                                              • stackalloc
                                                                              • +
                                                                              • static
                                                                              • +
                                                                              • string
                                                                              • +
                                                                              • struct
                                                                              • +
                                                                              • switch
                                                                              • +
                                                                              • this
                                                                              • +
                                                                              • throw
                                                                              • +
                                                                              • true
                                                                              • +
                                                                              • try
                                                                              • +
                                                                              • typeof
                                                                              • +
                                                                              • uint
                                                                              • +
                                                                              • ulong
                                                                              • +
                                                                              • unchecked
                                                                              • +
                                                                              • unsafe
                                                                              • +
                                                                              • ushort
                                                                              • +
                                                                              • using
                                                                              • +
                                                                              • var
                                                                              • +
                                                                              • virtual
                                                                              • +
                                                                              • void
                                                                              • +
                                                                              • volatile
                                                                              • +
                                                                              • while
                                                                              • +
                                                                              • yield
                                                                              diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md index 480f11bd1b..45256f4895 100644 --- a/docs/generators/avro-schema.md +++ b/docs/generators/avro-schema.md @@ -5,12 +5,12 @@ sidebar_label: avro-schema | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |packageName|package for generated classes (where supported)| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -29,20 +29,20 @@ sidebar_label: avro-schema ## LANGUAGE PRIMITIVES -
                                                                              • date
                                                                              • -
                                                                              • string
                                                                              • +
                                                                                • BigDecimal
                                                                                • +
                                                                                • DateTime
                                                                                • +
                                                                                • UUID
                                                                                • +
                                                                                • boolean
                                                                                • +
                                                                                • bytes
                                                                                • +
                                                                                • date
                                                                                • double
                                                                                • -
                                                                                • integer
                                                                                • float
                                                                                • int
                                                                                • +
                                                                                • integer
                                                                                • long
                                                                                • -
                                                                                • BigDecimal
                                                                                • -
                                                                                • DateTime
                                                                                • -
                                                                                • number
                                                                                • -
                                                                                • boolean
                                                                                • null
                                                                                • -
                                                                                • bytes
                                                                                • -
                                                                                • UUID
                                                                                • +
                                                                                • number
                                                                                • +
                                                                                • string
                                                                                ## RESERVED WORDS diff --git a/docs/generators/bash.md b/docs/generators/bash.md index daee782196..c56cbd4047 100644 --- a/docs/generators/bash.md +++ b/docs/generators/bash.md @@ -5,40 +5,40 @@ sidebar_label: bash | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|apiKeyAuthEnvironmentVariable|Name of environment variable where API key can be defined (e.g. PETSTORE_APIKEY='kjhasdGASDa5asdASD')| |false| +|basicAuthEnvironmentVariable|Name of environment variable where username and password can be defined (e.g. PETSTORE_CREDS='username:password')| |null| |curlOptions|Default cURL options| |null| -|processMarkdown|Convert all Markdown Markup into terminal formatting| |false| -|scriptName|The name of the script that will be generated (e.g. petstore-cli)| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateBashCompletion|Whether to generate the Bash completion script| |false| |generateZshCompletion|Whether to generate the Zsh completion script| |false| |hostEnvironmentVariable|Name of environment variable where host can be defined (e.g. PETSTORE_HOST='http://api.openapitools.org:8080')| |null| -|basicAuthEnvironmentVariable|Name of environment variable where username and password can be defined (e.g. PETSTORE_CREDS='username:password')| |null| -|apiKeyAuthEnvironmentVariable|Name of environment variable where API key can be defined (e.g. PETSTORE_APIKEY='kjhasdGASDa5asdASD')| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|processMarkdown|Convert all Markdown Markup into terminal formatting| |false| +|scriptName|The name of the script that will be generated (e.g. petstore-cli)| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -49,31 +49,31 @@ sidebar_label: bash ## LANGUAGE PRIMITIVES -
                                                                                • boolean
                                                                                • -
                                                                                • string
                                                                                • -
                                                                                • array
                                                                                • +
                                                                                  • array
                                                                                  • binary
                                                                                  • -
                                                                                  • integer
                                                                                  • +
                                                                                  • boolean
                                                                                  • float
                                                                                  • +
                                                                                  • integer
                                                                                  • map
                                                                                  • +
                                                                                  • string
                                                                                  ## RESERVED WORDS -
                                                                                  • fi
                                                                                  • -
                                                                                  • select
                                                                                  • -
                                                                                  • in
                                                                                  • -
                                                                                  • for
                                                                                  • +
                                                                                    • case
                                                                                    • do
                                                                                    • -
                                                                                    • elif
                                                                                    • -
                                                                                    • then
                                                                                    • -
                                                                                    • while
                                                                                    • done
                                                                                    • +
                                                                                    • elif
                                                                                    • else
                                                                                    • -
                                                                                    • function
                                                                                    • -
                                                                                    • until
                                                                                    • -
                                                                                    • time
                                                                                    • -
                                                                                    • if
                                                                                    • -
                                                                                    • case
                                                                                    • esac
                                                                                    • +
                                                                                    • fi
                                                                                    • +
                                                                                    • for
                                                                                    • +
                                                                                    • function
                                                                                    • +
                                                                                    • if
                                                                                    • +
                                                                                    • in
                                                                                    • +
                                                                                    • select
                                                                                    • +
                                                                                    • then
                                                                                    • +
                                                                                    • time
                                                                                    • +
                                                                                    • until
                                                                                    • +
                                                                                    • while
                                                                                    diff --git a/docs/generators/c.md b/docs/generators/c.md index 41c7e123c5..400db5b79a 100644 --- a/docs/generators/c.md +++ b/docs/generators/c.md @@ -5,12 +5,12 @@ sidebar_label: c | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -26,63 +26,63 @@ sidebar_label: c ## LANGUAGE PRIMITIVES -
                                                                                    • binary_t*
                                                                                    • -
                                                                                    • double
                                                                                    • +
                                                                                      • Object
                                                                                      • +
                                                                                      • binary_t*
                                                                                      • char
                                                                                      • -
                                                                                      • short
                                                                                      • -
                                                                                      • Object
                                                                                      • +
                                                                                      • double
                                                                                      • float
                                                                                      • -
                                                                                      • list
                                                                                      • int
                                                                                      • -
                                                                                      • long
                                                                                      • +
                                                                                      • list
                                                                                      • list_t*
                                                                                      • +
                                                                                      • long
                                                                                      • +
                                                                                      • short
                                                                                      ## RESERVED WORDS -
                                                                                      • struct
                                                                                      • -
                                                                                      • auto
                                                                                      • -
                                                                                      • const
                                                                                      • -
                                                                                      • _static_assert
                                                                                      • -
                                                                                      • _atomic
                                                                                      • -
                                                                                      • _complex
                                                                                      • -
                                                                                      • for
                                                                                      • -
                                                                                      • extern
                                                                                      • -
                                                                                      • do
                                                                                      • -
                                                                                      • float
                                                                                      • -
                                                                                      • restrict
                                                                                      • -
                                                                                      • while
                                                                                      • -
                                                                                      • long
                                                                                      • -
                                                                                      • remove
                                                                                      • -
                                                                                      • switch
                                                                                      • -
                                                                                      • _generic
                                                                                      • -
                                                                                      • default
                                                                                      • +
                                                                                        • _alignas
                                                                                        • _alignof
                                                                                        • -
                                                                                        • goto
                                                                                        • -
                                                                                        • continue
                                                                                        • -
                                                                                        • else
                                                                                        • -
                                                                                        • _noreturn
                                                                                        • -
                                                                                        • if
                                                                                        • -
                                                                                        • case
                                                                                        • +
                                                                                        • _atomic
                                                                                        • _bool
                                                                                        • -
                                                                                        • static
                                                                                        • -
                                                                                        • void
                                                                                        • -
                                                                                        • break
                                                                                        • -
                                                                                        • sizeof
                                                                                        • -
                                                                                        • double
                                                                                        • -
                                                                                        • signed
                                                                                        • -
                                                                                        • volatile
                                                                                        • -
                                                                                        • union
                                                                                        • -
                                                                                        • _thread_local
                                                                                        • -
                                                                                        • typedef
                                                                                        • -
                                                                                        • enum
                                                                                        • -
                                                                                        • int
                                                                                        • -
                                                                                        • inline
                                                                                        • -
                                                                                        • _alignas
                                                                                        • +
                                                                                        • _complex
                                                                                        • +
                                                                                        • _generic
                                                                                        • _imaginary
                                                                                        • +
                                                                                        • _noreturn
                                                                                        • +
                                                                                        • _static_assert
                                                                                        • +
                                                                                        • _thread_local
                                                                                        • +
                                                                                        • auto
                                                                                        • +
                                                                                        • break
                                                                                        • +
                                                                                        • case
                                                                                        • char
                                                                                        • -
                                                                                        • short
                                                                                        • -
                                                                                        • unsigned
                                                                                        • -
                                                                                        • return
                                                                                        • +
                                                                                        • const
                                                                                        • +
                                                                                        • continue
                                                                                        • +
                                                                                        • default
                                                                                        • +
                                                                                        • do
                                                                                        • +
                                                                                        • double
                                                                                        • +
                                                                                        • else
                                                                                        • +
                                                                                        • enum
                                                                                        • +
                                                                                        • extern
                                                                                        • +
                                                                                        • float
                                                                                        • +
                                                                                        • for
                                                                                        • +
                                                                                        • goto
                                                                                        • +
                                                                                        • if
                                                                                        • +
                                                                                        • inline
                                                                                        • +
                                                                                        • int
                                                                                        • +
                                                                                        • long
                                                                                        • register
                                                                                        • +
                                                                                        • remove
                                                                                        • +
                                                                                        • restrict
                                                                                        • +
                                                                                        • return
                                                                                        • +
                                                                                        • short
                                                                                        • +
                                                                                        • signed
                                                                                        • +
                                                                                        • sizeof
                                                                                        • +
                                                                                        • static
                                                                                        • +
                                                                                        • struct
                                                                                        • +
                                                                                        • switch
                                                                                        • +
                                                                                        • typedef
                                                                                        • +
                                                                                        • union
                                                                                        • +
                                                                                        • unsigned
                                                                                        • +
                                                                                        • void
                                                                                        • +
                                                                                        • volatile
                                                                                        • +
                                                                                        • while
                                                                                        diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md index 3c0d64a47d..ce49769404 100644 --- a/docs/generators/clojure.md +++ b/docs/generators/clojure.md @@ -5,39 +5,39 @@ sidebar_label: clojure | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|baseNamespace|the base/top namespace (Default: generated from projectName)| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|projectName|name of the project (Default: generated from info.title or "openapi-clj-client")| |null| |projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null| -|projectVersion|version of the project (Default: using info.version or "1.0.0")| |null| -|projectUrl|URL of the project (Default: using info.contact.url or not included in project.clj)| |null| |projectLicenseName|name of the license the project uses (Default: using info.license.name or not included in project.clj)| |null| |projectLicenseUrl|URL of the license the project uses (Default: using info.license.url or not included in project.clj)| |null| -|baseNamespace|the base/top namespace (Default: generated from projectName)| |null| +|projectName|name of the project (Default: generated from info.title or "openapi-clj-client")| |null| +|projectUrl|URL of the project (Default: using info.contact.url or not included in project.clj)| |null| +|projectVersion|version of the project (Default: using info.version or "1.0.0")| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES diff --git a/docs/generators/cpp-pistache-server.md b/docs/generators/cpp-pistache-server.md index f74eafd5b2..fde4459144 100644 --- a/docs/generators/cpp-pistache-server.md +++ b/docs/generators/cpp-pistache-server.md @@ -13,10 +13,10 @@ sidebar_label: cpp-pistache-server | Type/Alias | Imports | | ---------- | ------- | -|std::vector|#include <vector>| +|Object|#include "Object.h"| |std::map|#include <map>| |std::string|#include <string>| -|Object|#include "Object.h"| +|std::vector|#include <vector>| ## INSTANTIATION TYPES @@ -28,13 +28,13 @@ sidebar_label: cpp-pistache-server ## LANGUAGE PRIMITIVES
                                                                                        • bool
                                                                                        • -
                                                                                        • double
                                                                                        • char
                                                                                        • +
                                                                                        • double
                                                                                        • float
                                                                                        • -
                                                                                        • int64_t
                                                                                        • int
                                                                                        • -
                                                                                        • long
                                                                                        • int32_t
                                                                                        • +
                                                                                        • int64_t
                                                                                        • +
                                                                                        • long
                                                                                        ## RESERVED WORDS diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md index 31f3f31b77..5a5ec0f789 100644 --- a/docs/generators/cpp-qt5-client.md +++ b/docs/generators/cpp-qt5-client.md @@ -5,14 +5,14 @@ sidebar_label: cpp-qt5-client | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| |optionalProjectFile|Generate client.pri.| |true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -29,104 +29,104 @@ sidebar_label: cpp-qt5-client ## LANGUAGE PRIMITIVES -
                                                                                        • QDateTime
                                                                                        • -
                                                                                        • QString
                                                                                        • -
                                                                                        • qint64
                                                                                        • -
                                                                                        • qint32
                                                                                        • -
                                                                                        • bool
                                                                                        • -
                                                                                        • QByteArray
                                                                                        • -
                                                                                        • double
                                                                                        • +
                                                                                          • QByteArray
                                                                                          • QDate
                                                                                          • +
                                                                                          • QDateTime
                                                                                          • +
                                                                                          • QString
                                                                                          • +
                                                                                          • bool
                                                                                          • +
                                                                                          • double
                                                                                          • float
                                                                                          • +
                                                                                          • qint32
                                                                                          • +
                                                                                          • qint64
                                                                                          ## RESERVED WORDS -
                                                                                          • struct
                                                                                          • -
                                                                                          • auto
                                                                                          • -
                                                                                          • xor_eq
                                                                                          • -
                                                                                          • const_cast
                                                                                          • -
                                                                                          • decltype
                                                                                          • -
                                                                                          • alignas
                                                                                          • -
                                                                                          • extern
                                                                                          • -
                                                                                          • do
                                                                                          • -
                                                                                          • float
                                                                                          • -
                                                                                          • while
                                                                                          • -
                                                                                          • constexpr
                                                                                          • -
                                                                                          • operator
                                                                                          • -
                                                                                          • bitand
                                                                                          • -
                                                                                          • protected
                                                                                          • -
                                                                                          • continue
                                                                                          • -
                                                                                          • else
                                                                                          • -
                                                                                          • friend
                                                                                          • -
                                                                                          • mutable
                                                                                          • -
                                                                                          • compl
                                                                                          • -
                                                                                          • typeid
                                                                                          • -
                                                                                          • catch
                                                                                          • -
                                                                                          • export
                                                                                          • -
                                                                                          • if
                                                                                          • -
                                                                                          • case
                                                                                          • -
                                                                                          • dynamic_cast
                                                                                          • -
                                                                                          • not_eq
                                                                                          • -
                                                                                          • new
                                                                                          • -
                                                                                          • using
                                                                                          • -
                                                                                          • static
                                                                                          • -
                                                                                          • void
                                                                                          • -
                                                                                          • sizeof
                                                                                          • -
                                                                                          • bitor
                                                                                          • -
                                                                                          • double
                                                                                          • -
                                                                                          • this
                                                                                          • -
                                                                                          • signed
                                                                                          • -
                                                                                          • noexcept
                                                                                          • -
                                                                                          • typedef
                                                                                          • -
                                                                                          • enum
                                                                                          • -
                                                                                          • char16_t
                                                                                          • -
                                                                                          • explicit
                                                                                          • -
                                                                                          • static_cast
                                                                                          • -
                                                                                          • true
                                                                                          • -
                                                                                          • try
                                                                                          • -
                                                                                          • reinterpret_cast
                                                                                          • -
                                                                                          • nullptr
                                                                                          • -
                                                                                          • requires
                                                                                          • -
                                                                                          • template
                                                                                          • -
                                                                                          • private
                                                                                          • -
                                                                                          • virtual
                                                                                          • -
                                                                                          • bool
                                                                                          • -
                                                                                          • const
                                                                                          • -
                                                                                          • concept
                                                                                          • -
                                                                                          • static_assert
                                                                                          • -
                                                                                          • for
                                                                                          • -
                                                                                          • delete
                                                                                          • -
                                                                                          • long
                                                                                          • -
                                                                                          • switch
                                                                                          • -
                                                                                          • default
                                                                                          • -
                                                                                          • not
                                                                                          • -
                                                                                          • goto
                                                                                          • -
                                                                                          • public
                                                                                          • +
                                                                                            • alignas
                                                                                            • +
                                                                                            • alignof
                                                                                            • and
                                                                                            • and_eq
                                                                                            • -
                                                                                            • linux
                                                                                            • -
                                                                                            • or_eq
                                                                                            • -
                                                                                            • xor
                                                                                            • -
                                                                                            • class
                                                                                            • -
                                                                                            • wchar_t
                                                                                            • -
                                                                                            • alignof
                                                                                            • -
                                                                                            • or
                                                                                            • -
                                                                                            • break
                                                                                            • -
                                                                                            • false
                                                                                            • -
                                                                                            • thread_local
                                                                                            • -
                                                                                            • char32_t
                                                                                            • -
                                                                                            • volatile
                                                                                            • -
                                                                                            • union
                                                                                            • -
                                                                                            • int
                                                                                            • -
                                                                                            • inline
                                                                                            • -
                                                                                            • throw
                                                                                            • -
                                                                                            • char
                                                                                            • -
                                                                                            • namespace
                                                                                            • -
                                                                                            • short
                                                                                            • -
                                                                                            • unsigned
                                                                                            • asm
                                                                                            • -
                                                                                            • return
                                                                                            • -
                                                                                            • typename
                                                                                            • +
                                                                                            • auto
                                                                                            • +
                                                                                            • bitand
                                                                                            • +
                                                                                            • bitor
                                                                                            • +
                                                                                            • bool
                                                                                            • +
                                                                                            • break
                                                                                            • +
                                                                                            • case
                                                                                            • +
                                                                                            • catch
                                                                                            • +
                                                                                            • char
                                                                                            • +
                                                                                            • char16_t
                                                                                            • +
                                                                                            • char32_t
                                                                                            • +
                                                                                            • class
                                                                                            • +
                                                                                            • compl
                                                                                            • +
                                                                                            • concept
                                                                                            • +
                                                                                            • const
                                                                                            • +
                                                                                            • const_cast
                                                                                            • +
                                                                                            • constexpr
                                                                                            • +
                                                                                            • continue
                                                                                            • +
                                                                                            • decltype
                                                                                            • +
                                                                                            • default
                                                                                            • +
                                                                                            • delete
                                                                                            • +
                                                                                            • do
                                                                                            • +
                                                                                            • double
                                                                                            • +
                                                                                            • dynamic_cast
                                                                                            • +
                                                                                            • else
                                                                                            • +
                                                                                            • enum
                                                                                            • +
                                                                                            • explicit
                                                                                            • +
                                                                                            • export
                                                                                            • +
                                                                                            • extern
                                                                                            • +
                                                                                            • false
                                                                                            • +
                                                                                            • float
                                                                                            • +
                                                                                            • for
                                                                                            • +
                                                                                            • friend
                                                                                            • +
                                                                                            • goto
                                                                                            • +
                                                                                            • if
                                                                                            • +
                                                                                            • inline
                                                                                            • +
                                                                                            • int
                                                                                            • +
                                                                                            • linux
                                                                                            • +
                                                                                            • long
                                                                                            • +
                                                                                            • mutable
                                                                                            • +
                                                                                            • namespace
                                                                                            • +
                                                                                            • new
                                                                                            • +
                                                                                            • noexcept
                                                                                            • +
                                                                                            • not
                                                                                            • +
                                                                                            • not_eq
                                                                                            • +
                                                                                            • nullptr
                                                                                            • +
                                                                                            • operator
                                                                                            • +
                                                                                            • or
                                                                                            • +
                                                                                            • or_eq
                                                                                            • +
                                                                                            • private
                                                                                            • +
                                                                                            • protected
                                                                                            • +
                                                                                            • public
                                                                                            • register
                                                                                            • +
                                                                                            • reinterpret_cast
                                                                                            • +
                                                                                            • requires
                                                                                            • +
                                                                                            • return
                                                                                            • +
                                                                                            • short
                                                                                            • +
                                                                                            • signed
                                                                                            • +
                                                                                            • sizeof
                                                                                            • +
                                                                                            • static
                                                                                            • +
                                                                                            • static_assert
                                                                                            • +
                                                                                            • static_cast
                                                                                            • +
                                                                                            • struct
                                                                                            • +
                                                                                            • switch
                                                                                            • +
                                                                                            • template
                                                                                            • +
                                                                                            • this
                                                                                            • +
                                                                                            • thread_local
                                                                                            • +
                                                                                            • throw
                                                                                            • +
                                                                                            • true
                                                                                            • +
                                                                                            • try
                                                                                            • +
                                                                                            • typedef
                                                                                            • +
                                                                                            • typeid
                                                                                            • +
                                                                                            • typename
                                                                                            • +
                                                                                            • union
                                                                                            • +
                                                                                            • unsigned
                                                                                            • +
                                                                                            • using
                                                                                            • +
                                                                                            • virtual
                                                                                            • +
                                                                                            • void
                                                                                            • +
                                                                                            • volatile
                                                                                            • +
                                                                                            • wchar_t
                                                                                            • +
                                                                                            • while
                                                                                            • +
                                                                                            • xor
                                                                                            • +
                                                                                            • xor_eq
                                                                                            diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md index b2fd9b3538..fd32082fad 100644 --- a/docs/generators/cpp-qt5-qhttpengine-server.md +++ b/docs/generators/cpp-qt5-qhttpengine-server.md @@ -5,13 +5,13 @@ sidebar_label: cpp-qt5-qhttpengine-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelNamePrefix|Prefix that will be prepended to all model names.| |OAI| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -28,104 +28,104 @@ sidebar_label: cpp-qt5-qhttpengine-server ## LANGUAGE PRIMITIVES -
                                                                                            • QDateTime
                                                                                            • -
                                                                                            • QString
                                                                                            • -
                                                                                            • qint64
                                                                                            • -
                                                                                            • qint32
                                                                                            • -
                                                                                            • bool
                                                                                            • -
                                                                                            • QByteArray
                                                                                            • -
                                                                                            • double
                                                                                            • +
                                                                                              • QByteArray
                                                                                              • QDate
                                                                                              • +
                                                                                              • QDateTime
                                                                                              • +
                                                                                              • QString
                                                                                              • +
                                                                                              • bool
                                                                                              • +
                                                                                              • double
                                                                                              • float
                                                                                              • +
                                                                                              • qint32
                                                                                              • +
                                                                                              • qint64
                                                                                              ## RESERVED WORDS -
                                                                                              • struct
                                                                                              • -
                                                                                              • auto
                                                                                              • -
                                                                                              • xor_eq
                                                                                              • -
                                                                                              • const_cast
                                                                                              • -
                                                                                              • decltype
                                                                                              • -
                                                                                              • alignas
                                                                                              • -
                                                                                              • extern
                                                                                              • -
                                                                                              • do
                                                                                              • -
                                                                                              • float
                                                                                              • -
                                                                                              • while
                                                                                              • -
                                                                                              • constexpr
                                                                                              • -
                                                                                              • operator
                                                                                              • -
                                                                                              • bitand
                                                                                              • -
                                                                                              • protected
                                                                                              • -
                                                                                              • continue
                                                                                              • -
                                                                                              • else
                                                                                              • -
                                                                                              • friend
                                                                                              • -
                                                                                              • mutable
                                                                                              • -
                                                                                              • compl
                                                                                              • -
                                                                                              • typeid
                                                                                              • -
                                                                                              • catch
                                                                                              • -
                                                                                              • export
                                                                                              • -
                                                                                              • if
                                                                                              • -
                                                                                              • case
                                                                                              • -
                                                                                              • dynamic_cast
                                                                                              • -
                                                                                              • not_eq
                                                                                              • -
                                                                                              • new
                                                                                              • -
                                                                                              • using
                                                                                              • -
                                                                                              • static
                                                                                              • -
                                                                                              • void
                                                                                              • -
                                                                                              • sizeof
                                                                                              • -
                                                                                              • bitor
                                                                                              • -
                                                                                              • double
                                                                                              • -
                                                                                              • this
                                                                                              • -
                                                                                              • signed
                                                                                              • -
                                                                                              • noexcept
                                                                                              • -
                                                                                              • typedef
                                                                                              • -
                                                                                              • enum
                                                                                              • -
                                                                                              • char16_t
                                                                                              • -
                                                                                              • explicit
                                                                                              • -
                                                                                              • static_cast
                                                                                              • -
                                                                                              • true
                                                                                              • -
                                                                                              • try
                                                                                              • -
                                                                                              • reinterpret_cast
                                                                                              • -
                                                                                              • nullptr
                                                                                              • -
                                                                                              • requires
                                                                                              • -
                                                                                              • template
                                                                                              • -
                                                                                              • private
                                                                                              • -
                                                                                              • virtual
                                                                                              • -
                                                                                              • bool
                                                                                              • -
                                                                                              • const
                                                                                              • -
                                                                                              • concept
                                                                                              • -
                                                                                              • static_assert
                                                                                              • -
                                                                                              • for
                                                                                              • -
                                                                                              • delete
                                                                                              • -
                                                                                              • long
                                                                                              • -
                                                                                              • switch
                                                                                              • -
                                                                                              • default
                                                                                              • -
                                                                                              • not
                                                                                              • -
                                                                                              • goto
                                                                                              • -
                                                                                              • public
                                                                                              • +
                                                                                                • alignas
                                                                                                • +
                                                                                                • alignof
                                                                                                • and
                                                                                                • and_eq
                                                                                                • -
                                                                                                • linux
                                                                                                • -
                                                                                                • or_eq
                                                                                                • -
                                                                                                • xor
                                                                                                • -
                                                                                                • class
                                                                                                • -
                                                                                                • wchar_t
                                                                                                • -
                                                                                                • alignof
                                                                                                • -
                                                                                                • or
                                                                                                • -
                                                                                                • break
                                                                                                • -
                                                                                                • false
                                                                                                • -
                                                                                                • thread_local
                                                                                                • -
                                                                                                • char32_t
                                                                                                • -
                                                                                                • volatile
                                                                                                • -
                                                                                                • union
                                                                                                • -
                                                                                                • int
                                                                                                • -
                                                                                                • inline
                                                                                                • -
                                                                                                • throw
                                                                                                • -
                                                                                                • char
                                                                                                • -
                                                                                                • namespace
                                                                                                • -
                                                                                                • short
                                                                                                • -
                                                                                                • unsigned
                                                                                                • asm
                                                                                                • -
                                                                                                • return
                                                                                                • -
                                                                                                • typename
                                                                                                • +
                                                                                                • auto
                                                                                                • +
                                                                                                • bitand
                                                                                                • +
                                                                                                • bitor
                                                                                                • +
                                                                                                • bool
                                                                                                • +
                                                                                                • break
                                                                                                • +
                                                                                                • case
                                                                                                • +
                                                                                                • catch
                                                                                                • +
                                                                                                • char
                                                                                                • +
                                                                                                • char16_t
                                                                                                • +
                                                                                                • char32_t
                                                                                                • +
                                                                                                • class
                                                                                                • +
                                                                                                • compl
                                                                                                • +
                                                                                                • concept
                                                                                                • +
                                                                                                • const
                                                                                                • +
                                                                                                • const_cast
                                                                                                • +
                                                                                                • constexpr
                                                                                                • +
                                                                                                • continue
                                                                                                • +
                                                                                                • decltype
                                                                                                • +
                                                                                                • default
                                                                                                • +
                                                                                                • delete
                                                                                                • +
                                                                                                • do
                                                                                                • +
                                                                                                • double
                                                                                                • +
                                                                                                • dynamic_cast
                                                                                                • +
                                                                                                • else
                                                                                                • +
                                                                                                • enum
                                                                                                • +
                                                                                                • explicit
                                                                                                • +
                                                                                                • export
                                                                                                • +
                                                                                                • extern
                                                                                                • +
                                                                                                • false
                                                                                                • +
                                                                                                • float
                                                                                                • +
                                                                                                • for
                                                                                                • +
                                                                                                • friend
                                                                                                • +
                                                                                                • goto
                                                                                                • +
                                                                                                • if
                                                                                                • +
                                                                                                • inline
                                                                                                • +
                                                                                                • int
                                                                                                • +
                                                                                                • linux
                                                                                                • +
                                                                                                • long
                                                                                                • +
                                                                                                • mutable
                                                                                                • +
                                                                                                • namespace
                                                                                                • +
                                                                                                • new
                                                                                                • +
                                                                                                • noexcept
                                                                                                • +
                                                                                                • not
                                                                                                • +
                                                                                                • not_eq
                                                                                                • +
                                                                                                • nullptr
                                                                                                • +
                                                                                                • operator
                                                                                                • +
                                                                                                • or
                                                                                                • +
                                                                                                • or_eq
                                                                                                • +
                                                                                                • private
                                                                                                • +
                                                                                                • protected
                                                                                                • +
                                                                                                • public
                                                                                                • register
                                                                                                • +
                                                                                                • reinterpret_cast
                                                                                                • +
                                                                                                • requires
                                                                                                • +
                                                                                                • return
                                                                                                • +
                                                                                                • short
                                                                                                • +
                                                                                                • signed
                                                                                                • +
                                                                                                • sizeof
                                                                                                • +
                                                                                                • static
                                                                                                • +
                                                                                                • static_assert
                                                                                                • +
                                                                                                • static_cast
                                                                                                • +
                                                                                                • struct
                                                                                                • +
                                                                                                • switch
                                                                                                • +
                                                                                                • template
                                                                                                • +
                                                                                                • this
                                                                                                • +
                                                                                                • thread_local
                                                                                                • +
                                                                                                • throw
                                                                                                • +
                                                                                                • true
                                                                                                • +
                                                                                                • try
                                                                                                • +
                                                                                                • typedef
                                                                                                • +
                                                                                                • typeid
                                                                                                • +
                                                                                                • typename
                                                                                                • +
                                                                                                • union
                                                                                                • +
                                                                                                • unsigned
                                                                                                • +
                                                                                                • using
                                                                                                • +
                                                                                                • virtual
                                                                                                • +
                                                                                                • void
                                                                                                • +
                                                                                                • volatile
                                                                                                • +
                                                                                                • wchar_t
                                                                                                • +
                                                                                                • while
                                                                                                • +
                                                                                                • xor
                                                                                                • +
                                                                                                • xor_eq
                                                                                                diff --git a/docs/generators/cpp-restbed-server.md b/docs/generators/cpp-restbed-server.md index cab905d9b5..4c59be6e67 100644 --- a/docs/generators/cpp-restbed-server.md +++ b/docs/generators/cpp-restbed-server.md @@ -5,21 +5,21 @@ sidebar_label: cpp-restbed-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|modelPackage|C++ namespace for models (convention: name.space.model).| |org.openapitools.server.model| |apiPackage|C++ namespace for apis (convention: name.space.api).| |org.openapitools.server.api| -|packageVersion|C++ package version.| |1.0.0| |declspec|C++ preprocessor to place before the class name for handling dllexport/dllimport.| || |defaultInclude|The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" | || +|modelPackage|C++ namespace for models (convention: name.space.model).| |org.openapitools.server.model| +|packageVersion|C++ package version.| |1.0.0| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|std::vector|#include <vector>| -|std::map|#include <map>| -|std::string|#include <string>| |Object|#include "Object.h"| |restbed::Bytes|#include <corvusoft/restbed/byte.hpp>| +|std::map|#include <map>| +|std::string|#include <string>| +|std::vector|#include <vector>| ## INSTANTIATION TYPES @@ -31,102 +31,102 @@ sidebar_label: cpp-restbed-server ## LANGUAGE PRIMITIVES
                                                                                                • bool
                                                                                                • -
                                                                                                • double
                                                                                                • char
                                                                                                • +
                                                                                                • double
                                                                                                • float
                                                                                                • -
                                                                                                • int64_t
                                                                                                • int
                                                                                                • -
                                                                                                • long
                                                                                                • int32_t
                                                                                                • +
                                                                                                • int64_t
                                                                                                • +
                                                                                                • long
                                                                                                ## RESERVED WORDS -
                                                                                                • struct
                                                                                                • -
                                                                                                • auto
                                                                                                • -
                                                                                                • xor_eq
                                                                                                • -
                                                                                                • const_cast
                                                                                                • -
                                                                                                • decltype
                                                                                                • -
                                                                                                • alignas
                                                                                                • -
                                                                                                • extern
                                                                                                • -
                                                                                                • do
                                                                                                • -
                                                                                                • float
                                                                                                • -
                                                                                                • while
                                                                                                • -
                                                                                                • constexpr
                                                                                                • -
                                                                                                • operator
                                                                                                • -
                                                                                                • bitand
                                                                                                • -
                                                                                                • protected
                                                                                                • -
                                                                                                • continue
                                                                                                • -
                                                                                                • else
                                                                                                • -
                                                                                                • friend
                                                                                                • -
                                                                                                • mutable
                                                                                                • -
                                                                                                • compl
                                                                                                • -
                                                                                                • typeid
                                                                                                • -
                                                                                                • catch
                                                                                                • -
                                                                                                • export
                                                                                                • -
                                                                                                • if
                                                                                                • -
                                                                                                • case
                                                                                                • -
                                                                                                • dynamic_cast
                                                                                                • -
                                                                                                • not_eq
                                                                                                • -
                                                                                                • new
                                                                                                • -
                                                                                                • using
                                                                                                • -
                                                                                                • static
                                                                                                • -
                                                                                                • void
                                                                                                • -
                                                                                                • sizeof
                                                                                                • -
                                                                                                • bitor
                                                                                                • -
                                                                                                • double
                                                                                                • -
                                                                                                • this
                                                                                                • -
                                                                                                • signed
                                                                                                • -
                                                                                                • noexcept
                                                                                                • -
                                                                                                • typedef
                                                                                                • -
                                                                                                • enum
                                                                                                • -
                                                                                                • char16_t
                                                                                                • -
                                                                                                • explicit
                                                                                                • -
                                                                                                • static_cast
                                                                                                • -
                                                                                                • true
                                                                                                • -
                                                                                                • try
                                                                                                • -
                                                                                                • reinterpret_cast
                                                                                                • -
                                                                                                • nullptr
                                                                                                • -
                                                                                                • requires
                                                                                                • -
                                                                                                • template
                                                                                                • -
                                                                                                • private
                                                                                                • -
                                                                                                • virtual
                                                                                                • -
                                                                                                • bool
                                                                                                • -
                                                                                                • const
                                                                                                • -
                                                                                                • concept
                                                                                                • -
                                                                                                • static_assert
                                                                                                • -
                                                                                                • for
                                                                                                • -
                                                                                                • delete
                                                                                                • -
                                                                                                • long
                                                                                                • -
                                                                                                • switch
                                                                                                • -
                                                                                                • default
                                                                                                • -
                                                                                                • not
                                                                                                • -
                                                                                                • goto
                                                                                                • -
                                                                                                • public
                                                                                                • +
                                                                                                  • alignas
                                                                                                  • +
                                                                                                  • alignof
                                                                                                  • and
                                                                                                  • and_eq
                                                                                                  • -
                                                                                                  • linux
                                                                                                  • -
                                                                                                  • or_eq
                                                                                                  • -
                                                                                                  • xor
                                                                                                  • -
                                                                                                  • class
                                                                                                  • -
                                                                                                  • wchar_t
                                                                                                  • -
                                                                                                  • alignof
                                                                                                  • -
                                                                                                  • or
                                                                                                  • -
                                                                                                  • break
                                                                                                  • -
                                                                                                  • false
                                                                                                  • -
                                                                                                  • thread_local
                                                                                                  • -
                                                                                                  • char32_t
                                                                                                  • -
                                                                                                  • volatile
                                                                                                  • -
                                                                                                  • union
                                                                                                  • -
                                                                                                  • int
                                                                                                  • -
                                                                                                  • inline
                                                                                                  • -
                                                                                                  • throw
                                                                                                  • -
                                                                                                  • char
                                                                                                  • -
                                                                                                  • namespace
                                                                                                  • -
                                                                                                  • short
                                                                                                  • -
                                                                                                  • unsigned
                                                                                                  • asm
                                                                                                  • -
                                                                                                  • return
                                                                                                  • -
                                                                                                  • typename
                                                                                                  • +
                                                                                                  • auto
                                                                                                  • +
                                                                                                  • bitand
                                                                                                  • +
                                                                                                  • bitor
                                                                                                  • +
                                                                                                  • bool
                                                                                                  • +
                                                                                                  • break
                                                                                                  • +
                                                                                                  • case
                                                                                                  • +
                                                                                                  • catch
                                                                                                  • +
                                                                                                  • char
                                                                                                  • +
                                                                                                  • char16_t
                                                                                                  • +
                                                                                                  • char32_t
                                                                                                  • +
                                                                                                  • class
                                                                                                  • +
                                                                                                  • compl
                                                                                                  • +
                                                                                                  • concept
                                                                                                  • +
                                                                                                  • const
                                                                                                  • +
                                                                                                  • const_cast
                                                                                                  • +
                                                                                                  • constexpr
                                                                                                  • +
                                                                                                  • continue
                                                                                                  • +
                                                                                                  • decltype
                                                                                                  • +
                                                                                                  • default
                                                                                                  • +
                                                                                                  • delete
                                                                                                  • +
                                                                                                  • do
                                                                                                  • +
                                                                                                  • double
                                                                                                  • +
                                                                                                  • dynamic_cast
                                                                                                  • +
                                                                                                  • else
                                                                                                  • +
                                                                                                  • enum
                                                                                                  • +
                                                                                                  • explicit
                                                                                                  • +
                                                                                                  • export
                                                                                                  • +
                                                                                                  • extern
                                                                                                  • +
                                                                                                  • false
                                                                                                  • +
                                                                                                  • float
                                                                                                  • +
                                                                                                  • for
                                                                                                  • +
                                                                                                  • friend
                                                                                                  • +
                                                                                                  • goto
                                                                                                  • +
                                                                                                  • if
                                                                                                  • +
                                                                                                  • inline
                                                                                                  • +
                                                                                                  • int
                                                                                                  • +
                                                                                                  • linux
                                                                                                  • +
                                                                                                  • long
                                                                                                  • +
                                                                                                  • mutable
                                                                                                  • +
                                                                                                  • namespace
                                                                                                  • +
                                                                                                  • new
                                                                                                  • +
                                                                                                  • noexcept
                                                                                                  • +
                                                                                                  • not
                                                                                                  • +
                                                                                                  • not_eq
                                                                                                  • +
                                                                                                  • nullptr
                                                                                                  • +
                                                                                                  • operator
                                                                                                  • +
                                                                                                  • or
                                                                                                  • +
                                                                                                  • or_eq
                                                                                                  • +
                                                                                                  • private
                                                                                                  • +
                                                                                                  • protected
                                                                                                  • +
                                                                                                  • public
                                                                                                  • register
                                                                                                  • +
                                                                                                  • reinterpret_cast
                                                                                                  • +
                                                                                                  • requires
                                                                                                  • +
                                                                                                  • return
                                                                                                  • +
                                                                                                  • short
                                                                                                  • +
                                                                                                  • signed
                                                                                                  • +
                                                                                                  • sizeof
                                                                                                  • +
                                                                                                  • static
                                                                                                  • +
                                                                                                  • static_assert
                                                                                                  • +
                                                                                                  • static_cast
                                                                                                  • +
                                                                                                  • struct
                                                                                                  • +
                                                                                                  • switch
                                                                                                  • +
                                                                                                  • template
                                                                                                  • +
                                                                                                  • this
                                                                                                  • +
                                                                                                  • thread_local
                                                                                                  • +
                                                                                                  • throw
                                                                                                  • +
                                                                                                  • true
                                                                                                  • +
                                                                                                  • try
                                                                                                  • +
                                                                                                  • typedef
                                                                                                  • +
                                                                                                  • typeid
                                                                                                  • +
                                                                                                  • typename
                                                                                                  • +
                                                                                                  • union
                                                                                                  • +
                                                                                                  • unsigned
                                                                                                  • +
                                                                                                  • using
                                                                                                  • +
                                                                                                  • virtual
                                                                                                  • +
                                                                                                  • void
                                                                                                  • +
                                                                                                  • volatile
                                                                                                  • +
                                                                                                  • wchar_t
                                                                                                  • +
                                                                                                  • while
                                                                                                  • +
                                                                                                  • xor
                                                                                                  • +
                                                                                                  • xor_eq
                                                                                                  diff --git a/docs/generators/cpp-restsdk.md b/docs/generators/cpp-restsdk.md index 289a67fa7e..6bf209af79 100644 --- a/docs/generators/cpp-restsdk.md +++ b/docs/generators/cpp-restsdk.md @@ -5,24 +5,24 @@ sidebar_label: cpp-restsdk | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|modelPackage|C++ namespace for models (convention: name.space.model).| |org.openapitools.client.model| |apiPackage|C++ namespace for apis (convention: name.space.api).| |org.openapitools.client.api| -|packageVersion|C++ package version.| |1.0.0| |declspec|C++ preprocessor to place before the class name for handling dllexport/dllimport.| || |defaultInclude|The default include statement that should be placed in all headers for including things like the declspec (convention: #include "Commons.h" | || |generateGMocksForApis|Generate Google Mock classes for APIs.| |null| +|modelPackage|C++ namespace for models (convention: name.space.model).| |org.openapitools.client.model| +|packageVersion|C++ package version.| |1.0.0| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|std::vector|#include <vector>| -|utility::string_t|#include <cpprest/details/basic_types.h>| +|HttpContent|#include "HttpContent.h"| +|Object|#include "Object.h"| |std::map|#include <map>| |std::string|#include <string>| +|std::vector|#include <vector>| |utility::datetime|#include <cpprest/details/basic_types.h>| -|Object|#include "Object.h"| -|HttpContent|#include "HttpContent.h"| +|utility::string_t|#include <cpprest/details/basic_types.h>| ## INSTANTIATION TYPES @@ -34,102 +34,102 @@ sidebar_label: cpp-restsdk ## LANGUAGE PRIMITIVES
                                                                                                  • bool
                                                                                                  • -
                                                                                                  • double
                                                                                                  • char
                                                                                                  • +
                                                                                                  • double
                                                                                                  • float
                                                                                                  • -
                                                                                                  • int64_t
                                                                                                  • int
                                                                                                  • -
                                                                                                  • long
                                                                                                  • int32_t
                                                                                                  • +
                                                                                                  • int64_t
                                                                                                  • +
                                                                                                  • long
                                                                                                  ## RESERVED WORDS -
                                                                                                  • struct
                                                                                                  • -
                                                                                                  • auto
                                                                                                  • -
                                                                                                  • xor_eq
                                                                                                  • -
                                                                                                  • const_cast
                                                                                                  • -
                                                                                                  • decltype
                                                                                                  • -
                                                                                                  • alignas
                                                                                                  • -
                                                                                                  • extern
                                                                                                  • -
                                                                                                  • do
                                                                                                  • -
                                                                                                  • float
                                                                                                  • -
                                                                                                  • while
                                                                                                  • -
                                                                                                  • constexpr
                                                                                                  • -
                                                                                                  • operator
                                                                                                  • -
                                                                                                  • bitand
                                                                                                  • -
                                                                                                  • protected
                                                                                                  • -
                                                                                                  • continue
                                                                                                  • -
                                                                                                  • else
                                                                                                  • -
                                                                                                  • friend
                                                                                                  • -
                                                                                                  • mutable
                                                                                                  • -
                                                                                                  • compl
                                                                                                  • -
                                                                                                  • typeid
                                                                                                  • -
                                                                                                  • catch
                                                                                                  • -
                                                                                                  • export
                                                                                                  • -
                                                                                                  • if
                                                                                                  • -
                                                                                                  • case
                                                                                                  • -
                                                                                                  • dynamic_cast
                                                                                                  • -
                                                                                                  • not_eq
                                                                                                  • -
                                                                                                  • new
                                                                                                  • -
                                                                                                  • using
                                                                                                  • -
                                                                                                  • static
                                                                                                  • -
                                                                                                  • void
                                                                                                  • -
                                                                                                  • sizeof
                                                                                                  • -
                                                                                                  • bitor
                                                                                                  • -
                                                                                                  • double
                                                                                                  • -
                                                                                                  • this
                                                                                                  • -
                                                                                                  • signed
                                                                                                  • -
                                                                                                  • noexcept
                                                                                                  • -
                                                                                                  • typedef
                                                                                                  • -
                                                                                                  • enum
                                                                                                  • -
                                                                                                  • char16_t
                                                                                                  • -
                                                                                                  • explicit
                                                                                                  • -
                                                                                                  • static_cast
                                                                                                  • -
                                                                                                  • true
                                                                                                  • -
                                                                                                  • try
                                                                                                  • -
                                                                                                  • reinterpret_cast
                                                                                                  • -
                                                                                                  • nullptr
                                                                                                  • -
                                                                                                  • requires
                                                                                                  • -
                                                                                                  • template
                                                                                                  • -
                                                                                                  • private
                                                                                                  • -
                                                                                                  • virtual
                                                                                                  • -
                                                                                                  • bool
                                                                                                  • -
                                                                                                  • const
                                                                                                  • -
                                                                                                  • concept
                                                                                                  • -
                                                                                                  • static_assert
                                                                                                  • -
                                                                                                  • for
                                                                                                  • -
                                                                                                  • delete
                                                                                                  • -
                                                                                                  • long
                                                                                                  • -
                                                                                                  • switch
                                                                                                  • -
                                                                                                  • default
                                                                                                  • -
                                                                                                  • not
                                                                                                  • -
                                                                                                  • goto
                                                                                                  • -
                                                                                                  • public
                                                                                                  • +
                                                                                                    • alignas
                                                                                                    • +
                                                                                                    • alignof
                                                                                                    • and
                                                                                                    • and_eq
                                                                                                    • -
                                                                                                    • linux
                                                                                                    • -
                                                                                                    • or_eq
                                                                                                    • -
                                                                                                    • xor
                                                                                                    • -
                                                                                                    • class
                                                                                                    • -
                                                                                                    • wchar_t
                                                                                                    • -
                                                                                                    • alignof
                                                                                                    • -
                                                                                                    • or
                                                                                                    • -
                                                                                                    • break
                                                                                                    • -
                                                                                                    • false
                                                                                                    • -
                                                                                                    • thread_local
                                                                                                    • -
                                                                                                    • char32_t
                                                                                                    • -
                                                                                                    • volatile
                                                                                                    • -
                                                                                                    • union
                                                                                                    • -
                                                                                                    • int
                                                                                                    • -
                                                                                                    • inline
                                                                                                    • -
                                                                                                    • throw
                                                                                                    • -
                                                                                                    • char
                                                                                                    • -
                                                                                                    • namespace
                                                                                                    • -
                                                                                                    • short
                                                                                                    • -
                                                                                                    • unsigned
                                                                                                    • asm
                                                                                                    • -
                                                                                                    • return
                                                                                                    • -
                                                                                                    • typename
                                                                                                    • +
                                                                                                    • auto
                                                                                                    • +
                                                                                                    • bitand
                                                                                                    • +
                                                                                                    • bitor
                                                                                                    • +
                                                                                                    • bool
                                                                                                    • +
                                                                                                    • break
                                                                                                    • +
                                                                                                    • case
                                                                                                    • +
                                                                                                    • catch
                                                                                                    • +
                                                                                                    • char
                                                                                                    • +
                                                                                                    • char16_t
                                                                                                    • +
                                                                                                    • char32_t
                                                                                                    • +
                                                                                                    • class
                                                                                                    • +
                                                                                                    • compl
                                                                                                    • +
                                                                                                    • concept
                                                                                                    • +
                                                                                                    • const
                                                                                                    • +
                                                                                                    • const_cast
                                                                                                    • +
                                                                                                    • constexpr
                                                                                                    • +
                                                                                                    • continue
                                                                                                    • +
                                                                                                    • decltype
                                                                                                    • +
                                                                                                    • default
                                                                                                    • +
                                                                                                    • delete
                                                                                                    • +
                                                                                                    • do
                                                                                                    • +
                                                                                                    • double
                                                                                                    • +
                                                                                                    • dynamic_cast
                                                                                                    • +
                                                                                                    • else
                                                                                                    • +
                                                                                                    • enum
                                                                                                    • +
                                                                                                    • explicit
                                                                                                    • +
                                                                                                    • export
                                                                                                    • +
                                                                                                    • extern
                                                                                                    • +
                                                                                                    • false
                                                                                                    • +
                                                                                                    • float
                                                                                                    • +
                                                                                                    • for
                                                                                                    • +
                                                                                                    • friend
                                                                                                    • +
                                                                                                    • goto
                                                                                                    • +
                                                                                                    • if
                                                                                                    • +
                                                                                                    • inline
                                                                                                    • +
                                                                                                    • int
                                                                                                    • +
                                                                                                    • linux
                                                                                                    • +
                                                                                                    • long
                                                                                                    • +
                                                                                                    • mutable
                                                                                                    • +
                                                                                                    • namespace
                                                                                                    • +
                                                                                                    • new
                                                                                                    • +
                                                                                                    • noexcept
                                                                                                    • +
                                                                                                    • not
                                                                                                    • +
                                                                                                    • not_eq
                                                                                                    • +
                                                                                                    • nullptr
                                                                                                    • +
                                                                                                    • operator
                                                                                                    • +
                                                                                                    • or
                                                                                                    • +
                                                                                                    • or_eq
                                                                                                    • +
                                                                                                    • private
                                                                                                    • +
                                                                                                    • protected
                                                                                                    • +
                                                                                                    • public
                                                                                                    • register
                                                                                                    • +
                                                                                                    • reinterpret_cast
                                                                                                    • +
                                                                                                    • requires
                                                                                                    • +
                                                                                                    • return
                                                                                                    • +
                                                                                                    • short
                                                                                                    • +
                                                                                                    • signed
                                                                                                    • +
                                                                                                    • sizeof
                                                                                                    • +
                                                                                                    • static
                                                                                                    • +
                                                                                                    • static_assert
                                                                                                    • +
                                                                                                    • static_cast
                                                                                                    • +
                                                                                                    • struct
                                                                                                    • +
                                                                                                    • switch
                                                                                                    • +
                                                                                                    • template
                                                                                                    • +
                                                                                                    • this
                                                                                                    • +
                                                                                                    • thread_local
                                                                                                    • +
                                                                                                    • throw
                                                                                                    • +
                                                                                                    • true
                                                                                                    • +
                                                                                                    • try
                                                                                                    • +
                                                                                                    • typedef
                                                                                                    • +
                                                                                                    • typeid
                                                                                                    • +
                                                                                                    • typename
                                                                                                    • +
                                                                                                    • union
                                                                                                    • +
                                                                                                    • unsigned
                                                                                                    • +
                                                                                                    • using
                                                                                                    • +
                                                                                                    • virtual
                                                                                                    • +
                                                                                                    • void
                                                                                                    • +
                                                                                                    • volatile
                                                                                                    • +
                                                                                                    • wchar_t
                                                                                                    • +
                                                                                                    • while
                                                                                                    • +
                                                                                                    • xor
                                                                                                    • +
                                                                                                    • xor_eq
                                                                                                    diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md index c9d3d3b80a..4cabf3db44 100644 --- a/docs/generators/cpp-tizen.md +++ b/docs/generators/cpp-tizen.md @@ -5,11 +5,11 @@ sidebar_label: cpp-tizen | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -26,105 +26,105 @@ sidebar_label: cpp-tizen ## LANGUAGE PRIMITIVES
                                                                                                    • bool
                                                                                                    • -
                                                                                                    • std::string
                                                                                                    • double
                                                                                                    • -
                                                                                                    • long long
                                                                                                    • float
                                                                                                    • int
                                                                                                    • +
                                                                                                    • long long
                                                                                                    • +
                                                                                                    • std::string
                                                                                                    ## RESERVED WORDS -
                                                                                                    • struct
                                                                                                    • -
                                                                                                    • synchronized
                                                                                                    • -
                                                                                                    • auto
                                                                                                    • -
                                                                                                    • xor_eq
                                                                                                    • -
                                                                                                    • const_cast
                                                                                                    • -
                                                                                                    • decltype
                                                                                                    • -
                                                                                                    • alignas
                                                                                                    • -
                                                                                                    • extern
                                                                                                    • -
                                                                                                    • do
                                                                                                    • -
                                                                                                    • float
                                                                                                    • -
                                                                                                    • while
                                                                                                    • -
                                                                                                    • constexpr
                                                                                                    • -
                                                                                                    • operator
                                                                                                    • -
                                                                                                    • bitand
                                                                                                    • -
                                                                                                    • protected
                                                                                                    • -
                                                                                                    • continue
                                                                                                    • -
                                                                                                    • else
                                                                                                    • -
                                                                                                    • friend
                                                                                                    • -
                                                                                                    • mutable
                                                                                                    • -
                                                                                                    • compl
                                                                                                    • -
                                                                                                    • typeid
                                                                                                    • -
                                                                                                    • catch
                                                                                                    • -
                                                                                                    • export
                                                                                                    • -
                                                                                                    • if
                                                                                                    • -
                                                                                                    • case
                                                                                                    • -
                                                                                                    • dynamic_cast
                                                                                                    • -
                                                                                                    • not_eq
                                                                                                    • -
                                                                                                    • new
                                                                                                    • -
                                                                                                    • using
                                                                                                    • -
                                                                                                    • atomic_commit
                                                                                                    • -
                                                                                                    • static
                                                                                                    • -
                                                                                                    • void
                                                                                                    • -
                                                                                                    • sizeof
                                                                                                    • -
                                                                                                    • bitor
                                                                                                    • -
                                                                                                    • double
                                                                                                    • -
                                                                                                    • module
                                                                                                    • -
                                                                                                    • this
                                                                                                    • -
                                                                                                    • signed
                                                                                                    • -
                                                                                                    • atomic_cancel
                                                                                                    • -
                                                                                                    • noexcept
                                                                                                    • -
                                                                                                    • typedef
                                                                                                    • -
                                                                                                    • enum
                                                                                                    • -
                                                                                                    • char16_t
                                                                                                    • -
                                                                                                    • explicit
                                                                                                    • -
                                                                                                    • static_cast
                                                                                                    • -
                                                                                                    • true
                                                                                                    • -
                                                                                                    • try
                                                                                                    • -
                                                                                                    • reinterpret_cast
                                                                                                    • -
                                                                                                    • nullptr
                                                                                                    • -
                                                                                                    • requires
                                                                                                    • -
                                                                                                    • template
                                                                                                    • -
                                                                                                    • private
                                                                                                    • -
                                                                                                    • virtual
                                                                                                    • -
                                                                                                    • bool
                                                                                                    • -
                                                                                                    • const
                                                                                                    • -
                                                                                                    • import
                                                                                                    • -
                                                                                                    • concept
                                                                                                    • -
                                                                                                    • static_assert
                                                                                                    • -
                                                                                                    • for
                                                                                                    • -
                                                                                                    • atomic_noexcept
                                                                                                    • -
                                                                                                    • delete
                                                                                                    • -
                                                                                                    • long
                                                                                                    • -
                                                                                                    • switch
                                                                                                    • -
                                                                                                    • default
                                                                                                    • -
                                                                                                    • not
                                                                                                    • -
                                                                                                    • goto
                                                                                                    • -
                                                                                                    • public
                                                                                                    • +
                                                                                                      • alignas
                                                                                                      • +
                                                                                                      • alignof
                                                                                                      • and
                                                                                                      • and_eq
                                                                                                      • -
                                                                                                      • or_eq
                                                                                                      • -
                                                                                                      • xor
                                                                                                      • -
                                                                                                      • class
                                                                                                      • -
                                                                                                      • wchar_t
                                                                                                      • -
                                                                                                      • alignof
                                                                                                      • -
                                                                                                      • or
                                                                                                      • -
                                                                                                      • break
                                                                                                      • -
                                                                                                      • false
                                                                                                      • -
                                                                                                      • thread_local
                                                                                                      • -
                                                                                                      • char32_t
                                                                                                      • -
                                                                                                      • volatile
                                                                                                      • -
                                                                                                      • union
                                                                                                      • -
                                                                                                      • int
                                                                                                      • -
                                                                                                      • inline
                                                                                                      • -
                                                                                                      • throw
                                                                                                      • -
                                                                                                      • char
                                                                                                      • -
                                                                                                      • namespace
                                                                                                      • -
                                                                                                      • short
                                                                                                      • -
                                                                                                      • unsigned
                                                                                                      • asm
                                                                                                      • -
                                                                                                      • return
                                                                                                      • -
                                                                                                      • typename
                                                                                                      • +
                                                                                                      • atomic_cancel
                                                                                                      • +
                                                                                                      • atomic_commit
                                                                                                      • +
                                                                                                      • atomic_noexcept
                                                                                                      • +
                                                                                                      • auto
                                                                                                      • +
                                                                                                      • bitand
                                                                                                      • +
                                                                                                      • bitor
                                                                                                      • +
                                                                                                      • bool
                                                                                                      • +
                                                                                                      • break
                                                                                                      • +
                                                                                                      • case
                                                                                                      • +
                                                                                                      • catch
                                                                                                      • +
                                                                                                      • char
                                                                                                      • +
                                                                                                      • char16_t
                                                                                                      • +
                                                                                                      • char32_t
                                                                                                      • +
                                                                                                      • class
                                                                                                      • +
                                                                                                      • compl
                                                                                                      • +
                                                                                                      • concept
                                                                                                      • +
                                                                                                      • const
                                                                                                      • +
                                                                                                      • const_cast
                                                                                                      • +
                                                                                                      • constexpr
                                                                                                      • +
                                                                                                      • continue
                                                                                                      • +
                                                                                                      • decltype
                                                                                                      • +
                                                                                                      • default
                                                                                                      • +
                                                                                                      • delete
                                                                                                      • +
                                                                                                      • do
                                                                                                      • +
                                                                                                      • double
                                                                                                      • +
                                                                                                      • dynamic_cast
                                                                                                      • +
                                                                                                      • else
                                                                                                      • +
                                                                                                      • enum
                                                                                                      • +
                                                                                                      • explicit
                                                                                                      • +
                                                                                                      • export
                                                                                                      • +
                                                                                                      • extern
                                                                                                      • +
                                                                                                      • false
                                                                                                      • +
                                                                                                      • float
                                                                                                      • +
                                                                                                      • for
                                                                                                      • +
                                                                                                      • friend
                                                                                                      • +
                                                                                                      • goto
                                                                                                      • +
                                                                                                      • if
                                                                                                      • +
                                                                                                      • import
                                                                                                      • +
                                                                                                      • inline
                                                                                                      • +
                                                                                                      • int
                                                                                                      • +
                                                                                                      • long
                                                                                                      • +
                                                                                                      • module
                                                                                                      • +
                                                                                                      • mutable
                                                                                                      • +
                                                                                                      • namespace
                                                                                                      • +
                                                                                                      • new
                                                                                                      • +
                                                                                                      • noexcept
                                                                                                      • +
                                                                                                      • not
                                                                                                      • +
                                                                                                      • not_eq
                                                                                                      • +
                                                                                                      • nullptr
                                                                                                      • +
                                                                                                      • operator
                                                                                                      • +
                                                                                                      • or
                                                                                                      • +
                                                                                                      • or_eq
                                                                                                      • +
                                                                                                      • private
                                                                                                      • +
                                                                                                      • protected
                                                                                                      • +
                                                                                                      • public
                                                                                                      • register
                                                                                                      • +
                                                                                                      • reinterpret_cast
                                                                                                      • +
                                                                                                      • requires
                                                                                                      • +
                                                                                                      • return
                                                                                                      • +
                                                                                                      • short
                                                                                                      • +
                                                                                                      • signed
                                                                                                      • +
                                                                                                      • sizeof
                                                                                                      • +
                                                                                                      • static
                                                                                                      • +
                                                                                                      • static_assert
                                                                                                      • +
                                                                                                      • static_cast
                                                                                                      • +
                                                                                                      • struct
                                                                                                      • +
                                                                                                      • switch
                                                                                                      • +
                                                                                                      • synchronized
                                                                                                      • +
                                                                                                      • template
                                                                                                      • +
                                                                                                      • this
                                                                                                      • +
                                                                                                      • thread_local
                                                                                                      • +
                                                                                                      • throw
                                                                                                      • +
                                                                                                      • true
                                                                                                      • +
                                                                                                      • try
                                                                                                      • +
                                                                                                      • typedef
                                                                                                      • +
                                                                                                      • typeid
                                                                                                      • +
                                                                                                      • typename
                                                                                                      • +
                                                                                                      • union
                                                                                                      • +
                                                                                                      • unsigned
                                                                                                      • +
                                                                                                      • using
                                                                                                      • +
                                                                                                      • virtual
                                                                                                      • +
                                                                                                      • void
                                                                                                      • +
                                                                                                      • volatile
                                                                                                      • +
                                                                                                      • wchar_t
                                                                                                      • +
                                                                                                      • while
                                                                                                      • +
                                                                                                      • xor
                                                                                                      • +
                                                                                                      • xor_eq
                                                                                                      diff --git a/docs/generators/csharp-dotnet2.md b/docs/generators/csharp-dotnet2.md index 864b3a8476..adf5841d42 100644 --- a/docs/generators/csharp-dotnet2.md +++ b/docs/generators/csharp-dotnet2.md @@ -5,9 +5,9 @@ sidebar_label: csharp-dotnet2 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|clientPackage|C# client package name (convention: Camel.Case).| |Org.OpenAPITools.Client| |packageName|C# package name (convention: Camel.Case).| |Org.OpenAPITools| |packageVersion|C# package version.| |1.0.0| -|clientPackage|C# client package name (convention: Camel.Case).| |Org.OpenAPITools.Client| ## IMPORT MAPPING @@ -26,133 +26,133 @@ sidebar_label: csharp-dotnet2 ## LANGUAGE PRIMITIVES -
                                                                                                      • int?
                                                                                                      • -
                                                                                                      • Dictionary
                                                                                                      • -
                                                                                                      • string
                                                                                                      • -
                                                                                                      • bool
                                                                                                      • -
                                                                                                      • DateTimeOffset?
                                                                                                      • -
                                                                                                      • String
                                                                                                      • -
                                                                                                      • Guid
                                                                                                      • -
                                                                                                      • System.IO.Stream
                                                                                                      • -
                                                                                                      • bool?
                                                                                                      • -
                                                                                                      • float
                                                                                                      • -
                                                                                                      • long
                                                                                                      • -
                                                                                                      • DateTime
                                                                                                      • -
                                                                                                      • Int32
                                                                                                      • -
                                                                                                      • float?
                                                                                                      • -
                                                                                                      • DateTime?
                                                                                                      • -
                                                                                                      • List
                                                                                                      • -
                                                                                                      • Boolean
                                                                                                      • -
                                                                                                      • long?
                                                                                                      • -
                                                                                                      • double
                                                                                                      • -
                                                                                                      • Guid?
                                                                                                      • -
                                                                                                      • DateTimeOffset
                                                                                                      • -
                                                                                                      • Double
                                                                                                      • -
                                                                                                      • int
                                                                                                      • -
                                                                                                      • byte[]
                                                                                                      • -
                                                                                                      • Float
                                                                                                      • -
                                                                                                      • Int64
                                                                                                      • -
                                                                                                      • double?
                                                                                                      • -
                                                                                                      • ICollection
                                                                                                      • +
                                                                                                        • Boolean
                                                                                                        • Collection
                                                                                                        • +
                                                                                                        • DateTime
                                                                                                        • +
                                                                                                        • DateTime?
                                                                                                        • +
                                                                                                        • DateTimeOffset
                                                                                                        • +
                                                                                                        • DateTimeOffset?
                                                                                                        • +
                                                                                                        • Dictionary
                                                                                                        • +
                                                                                                        • Double
                                                                                                        • +
                                                                                                        • Float
                                                                                                        • +
                                                                                                        • Guid
                                                                                                        • +
                                                                                                        • Guid?
                                                                                                        • +
                                                                                                        • ICollection
                                                                                                        • +
                                                                                                        • Int32
                                                                                                        • +
                                                                                                        • Int64
                                                                                                        • +
                                                                                                        • List
                                                                                                        • Object
                                                                                                        • -
                                                                                                        • decimal?
                                                                                                        • +
                                                                                                        • String
                                                                                                        • +
                                                                                                        • System.IO.Stream
                                                                                                        • +
                                                                                                        • bool
                                                                                                        • +
                                                                                                        • bool?
                                                                                                        • +
                                                                                                        • byte[]
                                                                                                        • decimal
                                                                                                        • +
                                                                                                        • decimal?
                                                                                                        • +
                                                                                                        • double
                                                                                                        • +
                                                                                                        • double?
                                                                                                        • +
                                                                                                        • float
                                                                                                        • +
                                                                                                        • float?
                                                                                                        • +
                                                                                                        • int
                                                                                                        • +
                                                                                                        • int?
                                                                                                        • +
                                                                                                        • long
                                                                                                        • +
                                                                                                        • long?
                                                                                                        • +
                                                                                                        • string
                                                                                                        ## RESERVED WORDS -
                                                                                                        • struct
                                                                                                        • -
                                                                                                        • extern
                                                                                                        • -
                                                                                                        • do
                                                                                                        • -
                                                                                                        • ushort
                                                                                                        • -
                                                                                                        • float
                                                                                                        • -
                                                                                                        • while
                                                                                                        • -
                                                                                                        • operator
                                                                                                        • -
                                                                                                        • localVarQueryParams
                                                                                                        • -
                                                                                                        • ref
                                                                                                        • -
                                                                                                        • protected
                                                                                                        • -
                                                                                                        • readonly
                                                                                                        • -
                                                                                                        • continue
                                                                                                        • -
                                                                                                        • else
                                                                                                        • -
                                                                                                        • checked
                                                                                                        • -
                                                                                                        • lock
                                                                                                        • -
                                                                                                        • localVarPathParams
                                                                                                        • -
                                                                                                        • catch
                                                                                                        • -
                                                                                                        • Client
                                                                                                        • -
                                                                                                        • if
                                                                                                        • -
                                                                                                        • case
                                                                                                        • -
                                                                                                        • localVarHttpHeaderAccepts
                                                                                                        • -
                                                                                                        • new
                                                                                                        • -
                                                                                                        • using
                                                                                                        • -
                                                                                                        • static
                                                                                                        • -
                                                                                                        • void
                                                                                                        • -
                                                                                                        • localVarPostBody
                                                                                                        • -
                                                                                                        • in
                                                                                                        • -
                                                                                                        • sizeof
                                                                                                        • -
                                                                                                        • localVarResponse
                                                                                                        • -
                                                                                                        • byte
                                                                                                        • -
                                                                                                        • double
                                                                                                        • -
                                                                                                        • sealed
                                                                                                        • -
                                                                                                        • finally
                                                                                                        • -
                                                                                                        • this
                                                                                                        • -
                                                                                                        • unchecked
                                                                                                        • -
                                                                                                        • is
                                                                                                        • -
                                                                                                        • params
                                                                                                        • -
                                                                                                        • enum
                                                                                                        • -
                                                                                                        • explicit
                                                                                                        • -
                                                                                                        • as
                                                                                                        • -
                                                                                                        • null
                                                                                                        • -
                                                                                                        • localVarPath
                                                                                                        • -
                                                                                                        • true
                                                                                                        • -
                                                                                                        • fixed
                                                                                                        • -
                                                                                                        • try
                                                                                                        • -
                                                                                                        • decimal
                                                                                                        • -
                                                                                                        • object
                                                                                                        • -
                                                                                                        • implicit
                                                                                                        • -
                                                                                                        • internal
                                                                                                        • -
                                                                                                        • private
                                                                                                        • -
                                                                                                        • virtual
                                                                                                        • -
                                                                                                        • bool
                                                                                                        • -
                                                                                                        • const
                                                                                                        • -
                                                                                                        • string
                                                                                                        • -
                                                                                                        • for
                                                                                                        • -
                                                                                                        • localVarHttpHeaderAccept
                                                                                                        • -
                                                                                                        • interface
                                                                                                        • -
                                                                                                        • unsafe
                                                                                                        • -
                                                                                                        • long
                                                                                                        • -
                                                                                                        • out
                                                                                                        • -
                                                                                                        • switch
                                                                                                        • -
                                                                                                        • delegate
                                                                                                        • -
                                                                                                        • foreach
                                                                                                        • -
                                                                                                        • default
                                                                                                        • -
                                                                                                        • ulong
                                                                                                        • -
                                                                                                        • goto
                                                                                                        • -
                                                                                                        • localVarHttpContentTypes
                                                                                                        • -
                                                                                                        • localVarHttpContentType
                                                                                                        • -
                                                                                                        • public
                                                                                                        • -
                                                                                                        • localVarStatusCode
                                                                                                        • -
                                                                                                        • stackalloc
                                                                                                        • -
                                                                                                        • parameter
                                                                                                        • -
                                                                                                        • client
                                                                                                        • -
                                                                                                        • override
                                                                                                        • -
                                                                                                        • event
                                                                                                        • -
                                                                                                        • class
                                                                                                        • -
                                                                                                        • typeof
                                                                                                        • -
                                                                                                        • localVarFormParams
                                                                                                        • -
                                                                                                        • break
                                                                                                        • -
                                                                                                        • false
                                                                                                        • -
                                                                                                        • volatile
                                                                                                        • +
                                                                                                          • Client
                                                                                                          • abstract
                                                                                                          • -
                                                                                                          • uint
                                                                                                          • -
                                                                                                          • int
                                                                                                          • -
                                                                                                          • localVarHeaderParams
                                                                                                          • -
                                                                                                          • throw
                                                                                                          • -
                                                                                                          • char
                                                                                                          • -
                                                                                                          • namespace
                                                                                                          • -
                                                                                                          • sbyte
                                                                                                          • -
                                                                                                          • short
                                                                                                          • -
                                                                                                          • localVarFileParams
                                                                                                          • -
                                                                                                          • return
                                                                                                          • +
                                                                                                          • as
                                                                                                          • base
                                                                                                          • +
                                                                                                          • bool
                                                                                                          • +
                                                                                                          • break
                                                                                                          • +
                                                                                                          • byte
                                                                                                          • +
                                                                                                          • case
                                                                                                          • +
                                                                                                          • catch
                                                                                                          • +
                                                                                                          • char
                                                                                                          • +
                                                                                                          • checked
                                                                                                          • +
                                                                                                          • class
                                                                                                          • +
                                                                                                          • client
                                                                                                          • +
                                                                                                          • const
                                                                                                          • +
                                                                                                          • continue
                                                                                                          • +
                                                                                                          • decimal
                                                                                                          • +
                                                                                                          • default
                                                                                                          • +
                                                                                                          • delegate
                                                                                                          • +
                                                                                                          • do
                                                                                                          • +
                                                                                                          • double
                                                                                                          • +
                                                                                                          • else
                                                                                                          • +
                                                                                                          • enum
                                                                                                          • +
                                                                                                          • event
                                                                                                          • +
                                                                                                          • explicit
                                                                                                          • +
                                                                                                          • extern
                                                                                                          • +
                                                                                                          • false
                                                                                                          • +
                                                                                                          • finally
                                                                                                          • +
                                                                                                          • fixed
                                                                                                          • +
                                                                                                          • float
                                                                                                          • +
                                                                                                          • for
                                                                                                          • +
                                                                                                          • foreach
                                                                                                          • +
                                                                                                          • goto
                                                                                                          • +
                                                                                                          • if
                                                                                                          • +
                                                                                                          • implicit
                                                                                                          • +
                                                                                                          • in
                                                                                                          • +
                                                                                                          • int
                                                                                                          • +
                                                                                                          • interface
                                                                                                          • +
                                                                                                          • internal
                                                                                                          • +
                                                                                                          • is
                                                                                                          • +
                                                                                                          • localVarFileParams
                                                                                                          • +
                                                                                                          • localVarFormParams
                                                                                                          • +
                                                                                                          • localVarHeaderParams
                                                                                                          • +
                                                                                                          • localVarHttpContentType
                                                                                                          • +
                                                                                                          • localVarHttpContentTypes
                                                                                                          • +
                                                                                                          • localVarHttpHeaderAccept
                                                                                                          • +
                                                                                                          • localVarHttpHeaderAccepts
                                                                                                          • +
                                                                                                          • localVarPath
                                                                                                          • +
                                                                                                          • localVarPathParams
                                                                                                          • +
                                                                                                          • localVarPostBody
                                                                                                          • +
                                                                                                          • localVarQueryParams
                                                                                                          • +
                                                                                                          • localVarResponse
                                                                                                          • +
                                                                                                          • localVarStatusCode
                                                                                                          • +
                                                                                                          • lock
                                                                                                          • +
                                                                                                          • long
                                                                                                          • +
                                                                                                          • namespace
                                                                                                          • +
                                                                                                          • new
                                                                                                          • +
                                                                                                          • null
                                                                                                          • +
                                                                                                          • object
                                                                                                          • +
                                                                                                          • operator
                                                                                                          • +
                                                                                                          • out
                                                                                                          • +
                                                                                                          • override
                                                                                                          • +
                                                                                                          • parameter
                                                                                                          • +
                                                                                                          • params
                                                                                                          • +
                                                                                                          • private
                                                                                                          • +
                                                                                                          • protected
                                                                                                          • +
                                                                                                          • public
                                                                                                          • +
                                                                                                          • readonly
                                                                                                          • +
                                                                                                          • ref
                                                                                                          • +
                                                                                                          • return
                                                                                                          • +
                                                                                                          • sbyte
                                                                                                          • +
                                                                                                          • sealed
                                                                                                          • +
                                                                                                          • short
                                                                                                          • +
                                                                                                          • sizeof
                                                                                                          • +
                                                                                                          • stackalloc
                                                                                                          • +
                                                                                                          • static
                                                                                                          • +
                                                                                                          • string
                                                                                                          • +
                                                                                                          • struct
                                                                                                          • +
                                                                                                          • switch
                                                                                                          • +
                                                                                                          • this
                                                                                                          • +
                                                                                                          • throw
                                                                                                          • +
                                                                                                          • true
                                                                                                          • +
                                                                                                          • try
                                                                                                          • +
                                                                                                          • typeof
                                                                                                          • +
                                                                                                          • uint
                                                                                                          • +
                                                                                                          • ulong
                                                                                                          • +
                                                                                                          • unchecked
                                                                                                          • +
                                                                                                          • unsafe
                                                                                                          • +
                                                                                                          • ushort
                                                                                                          • +
                                                                                                          • using
                                                                                                          • +
                                                                                                          • virtual
                                                                                                          • +
                                                                                                          • void
                                                                                                          • +
                                                                                                          • volatile
                                                                                                          • +
                                                                                                          • while
                                                                                                          diff --git a/docs/generators/csharp-nancyfx.md b/docs/generators/csharp-nancyfx.md index 20d46765b4..48913347f5 100644 --- a/docs/generators/csharp-nancyfx.md +++ b/docs/generators/csharp-nancyfx.md @@ -5,20 +5,20 @@ sidebar_label: csharp-nancyfx | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|asyncServer|Set to true to enable the generation of async routes/endpoints.| |false| +|immutable|Enabled by default. If disabled generates model classes with setters| |true| +|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| || +|optionalProjectFile|Generate {PackageName}.csproj.| |true| +|packageContext|Optionally overrides the PackageContext which determines the namespace (namespace=packageName.packageContext). If not set, packageContext will default to basePath.| |null| +|packageGuid|The GUID that will be associated with the C# project| |null| |packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| |packageVersion|C# package version.| |1.0.0| -|sourceFolder|source folder for generated code| |src| -|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| || -|packageGuid|The GUID that will be associated with the C# project| |null| -|packageContext|Optionally overrides the PackageContext which determines the namespace (namespace=packageName.packageContext). If not set, packageContext will default to basePath.| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|optionalProjectFile|Generate {PackageName}.csproj.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|immutable|Enabled by default. If disabled generates model classes with setters| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| +|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |writeModulePath|Enabled by default. If disabled, module paths will not mirror api base path| |true| -|asyncServer|Set to true to enable the generation of async routes/endpoints.| |false| ## IMPORT MAPPING @@ -37,48 +37,48 @@ sidebar_label: csharp-nancyfx ## LANGUAGE PRIMITIVES -
                                                                                                          • int?
                                                                                                          • -
                                                                                                          • Dictionary
                                                                                                          • -
                                                                                                          • string
                                                                                                          • -
                                                                                                          • bool
                                                                                                          • -
                                                                                                          • LocalDate?
                                                                                                          • -
                                                                                                          • DateTimeOffset?
                                                                                                          • -
                                                                                                          • ZonedDateTime?
                                                                                                          • -
                                                                                                          • String
                                                                                                          • -
                                                                                                          • Guid
                                                                                                          • -
                                                                                                          • System.IO.Stream
                                                                                                          • -
                                                                                                          • bool?
                                                                                                          • -
                                                                                                          • float
                                                                                                          • -
                                                                                                          • long
                                                                                                          • -
                                                                                                          • DateTime
                                                                                                          • -
                                                                                                          • Int32
                                                                                                          • -
                                                                                                          • float?
                                                                                                          • -
                                                                                                          • DateTime?
                                                                                                          • -
                                                                                                          • List
                                                                                                          • -
                                                                                                          • Boolean
                                                                                                          • -
                                                                                                          • LocalTime?
                                                                                                          • -
                                                                                                          • long?
                                                                                                          • -
                                                                                                          • double
                                                                                                          • -
                                                                                                          • Guid?
                                                                                                          • -
                                                                                                          • DateTimeOffset
                                                                                                          • -
                                                                                                          • Double
                                                                                                          • -
                                                                                                          • int
                                                                                                          • -
                                                                                                          • byte[]
                                                                                                          • -
                                                                                                          • Float
                                                                                                          • -
                                                                                                          • Int64
                                                                                                          • -
                                                                                                          • double?
                                                                                                          • -
                                                                                                          • ICollection
                                                                                                          • +
                                                                                                            • Boolean
                                                                                                            • Collection
                                                                                                            • +
                                                                                                            • DateTime
                                                                                                            • +
                                                                                                            • DateTime?
                                                                                                            • +
                                                                                                            • DateTimeOffset
                                                                                                            • +
                                                                                                            • DateTimeOffset?
                                                                                                            • +
                                                                                                            • Dictionary
                                                                                                            • +
                                                                                                            • Double
                                                                                                            • +
                                                                                                            • Float
                                                                                                            • +
                                                                                                            • Guid
                                                                                                            • +
                                                                                                            • Guid?
                                                                                                            • +
                                                                                                            • ICollection
                                                                                                            • +
                                                                                                            • Int32
                                                                                                            • +
                                                                                                            • Int64
                                                                                                            • +
                                                                                                            • List
                                                                                                            • +
                                                                                                            • LocalDate?
                                                                                                            • +
                                                                                                            • LocalTime?
                                                                                                            • Object
                                                                                                            • -
                                                                                                            • decimal?
                                                                                                            • +
                                                                                                            • String
                                                                                                            • +
                                                                                                            • System.IO.Stream
                                                                                                            • +
                                                                                                            • ZonedDateTime?
                                                                                                            • +
                                                                                                            • bool
                                                                                                            • +
                                                                                                            • bool?
                                                                                                            • +
                                                                                                            • byte[]
                                                                                                            • decimal
                                                                                                            • +
                                                                                                            • decimal?
                                                                                                            • +
                                                                                                            • double
                                                                                                            • +
                                                                                                            • double?
                                                                                                            • +
                                                                                                            • float
                                                                                                            • +
                                                                                                            • float?
                                                                                                            • +
                                                                                                            • int
                                                                                                            • +
                                                                                                            • int?
                                                                                                            • +
                                                                                                            • long
                                                                                                            • +
                                                                                                            • long?
                                                                                                            • +
                                                                                                            • string
                                                                                                            ## RESERVED WORDS
                                                                                                            • async
                                                                                                            • -
                                                                                                            • var
                                                                                                            • -
                                                                                                            • yield
                                                                                                            • await
                                                                                                            • dynamic
                                                                                                            • +
                                                                                                            • var
                                                                                                            • +
                                                                                                            • yield
                                                                                                            diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 167c200650..fb09d3a1ff 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -5,27 +5,27 @@ sidebar_label: csharp-netcore | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| -|packageVersion|C# package version.| |1.0.0| -|sourceFolder|source folder for generated code| |src| -|packageGuid|The GUID that will be associated with the C# project| |null| -|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| -|targetFramework|The target .NET framework version.|
                                                                                                            **netstandard1.3**
                                                                                                            .NET Standard 1.3 compatible
                                                                                                            **netstandard1.4**
                                                                                                            .NET Standard 1.4 compatible
                                                                                                            **netstandard1.5**
                                                                                                            .NET Standard 1.5 compatible
                                                                                                            **netstandard1.6**
                                                                                                            .NET Standard 1.6 compatible
                                                                                                            **netstandard2.0**
                                                                                                            .NET Standard 2.0 compatible
                                                                                                            **netcoreapp2.0**
                                                                                                            .NET Core 2.0 compatible
                                                                                                            |netstandard2.0| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| +|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| +|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| +|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| |optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| |optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| +|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| |optionalProjectFile|Generate {PackageName}.csproj.| |true| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| +|packageGuid|The GUID that will be associated with the C# project| |null| +|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| +|packageVersion|C# package version.| |1.0.0| +|returnICollection|Return ICollection<T> instead of the concrete type.| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|targetFramework|The target .NET framework version.|
                                                                                                            **netstandard1.3**
                                                                                                            .NET Standard 1.3 compatible
                                                                                                            **netstandard1.4**
                                                                                                            .NET Standard 1.4 compatible
                                                                                                            **netstandard1.5**
                                                                                                            .NET Standard 1.5 compatible
                                                                                                            **netstandard1.6**
                                                                                                            .NET Standard 1.6 compatible
                                                                                                            **netstandard2.0**
                                                                                                            .NET Standard 2.0 compatible
                                                                                                            **netcoreapp2.0**
                                                                                                            .NET Core 2.0 compatible
                                                                                                            |netstandard2.0| +|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| +|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |validatable|Generates self-validatable models.| |true| -|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| ## IMPORT MAPPING @@ -44,133 +44,133 @@ sidebar_label: csharp-netcore ## LANGUAGE PRIMITIVES -
                                                                                                            • int?
                                                                                                            • -
                                                                                                            • Dictionary
                                                                                                            • -
                                                                                                            • string
                                                                                                            • -
                                                                                                            • bool
                                                                                                            • -
                                                                                                            • DateTimeOffset?
                                                                                                            • -
                                                                                                            • String
                                                                                                            • -
                                                                                                            • Guid
                                                                                                            • -
                                                                                                            • System.IO.Stream
                                                                                                            • -
                                                                                                            • bool?
                                                                                                            • -
                                                                                                            • float
                                                                                                            • -
                                                                                                            • long
                                                                                                            • -
                                                                                                            • DateTime
                                                                                                            • -
                                                                                                            • Int32
                                                                                                            • -
                                                                                                            • float?
                                                                                                            • -
                                                                                                            • DateTime?
                                                                                                            • -
                                                                                                            • List
                                                                                                            • -
                                                                                                            • Boolean
                                                                                                            • -
                                                                                                            • long?
                                                                                                            • -
                                                                                                            • double
                                                                                                            • -
                                                                                                            • Guid?
                                                                                                            • -
                                                                                                            • DateTimeOffset
                                                                                                            • -
                                                                                                            • Double
                                                                                                            • -
                                                                                                            • int
                                                                                                            • -
                                                                                                            • byte[]
                                                                                                            • -
                                                                                                            • Float
                                                                                                            • -
                                                                                                            • Int64
                                                                                                            • -
                                                                                                            • double?
                                                                                                            • -
                                                                                                            • ICollection
                                                                                                            • +
                                                                                                              • Boolean
                                                                                                              • Collection
                                                                                                              • +
                                                                                                              • DateTime
                                                                                                              • +
                                                                                                              • DateTime?
                                                                                                              • +
                                                                                                              • DateTimeOffset
                                                                                                              • +
                                                                                                              • DateTimeOffset?
                                                                                                              • +
                                                                                                              • Dictionary
                                                                                                              • +
                                                                                                              • Double
                                                                                                              • +
                                                                                                              • Float
                                                                                                              • +
                                                                                                              • Guid
                                                                                                              • +
                                                                                                              • Guid?
                                                                                                              • +
                                                                                                              • ICollection
                                                                                                              • +
                                                                                                              • Int32
                                                                                                              • +
                                                                                                              • Int64
                                                                                                              • +
                                                                                                              • List
                                                                                                              • Object
                                                                                                              • -
                                                                                                              • decimal?
                                                                                                              • +
                                                                                                              • String
                                                                                                              • +
                                                                                                              • System.IO.Stream
                                                                                                              • +
                                                                                                              • bool
                                                                                                              • +
                                                                                                              • bool?
                                                                                                              • +
                                                                                                              • byte[]
                                                                                                              • decimal
                                                                                                              • +
                                                                                                              • decimal?
                                                                                                              • +
                                                                                                              • double
                                                                                                              • +
                                                                                                              • double?
                                                                                                              • +
                                                                                                              • float
                                                                                                              • +
                                                                                                              • float?
                                                                                                              • +
                                                                                                              • int
                                                                                                              • +
                                                                                                              • int?
                                                                                                              • +
                                                                                                              • long
                                                                                                              • +
                                                                                                              • long?
                                                                                                              • +
                                                                                                              • string
                                                                                                              ## RESERVED WORDS -
                                                                                                              • struct
                                                                                                              • -
                                                                                                              • extern
                                                                                                              • -
                                                                                                              • do
                                                                                                              • -
                                                                                                              • ushort
                                                                                                              • -
                                                                                                              • float
                                                                                                              • -
                                                                                                              • while
                                                                                                              • -
                                                                                                              • operator
                                                                                                              • -
                                                                                                              • localVarQueryParams
                                                                                                              • -
                                                                                                              • ref
                                                                                                              • -
                                                                                                              • protected
                                                                                                              • -
                                                                                                              • readonly
                                                                                                              • -
                                                                                                              • continue
                                                                                                              • -
                                                                                                              • else
                                                                                                              • -
                                                                                                              • checked
                                                                                                              • -
                                                                                                              • lock
                                                                                                              • -
                                                                                                              • localVarPathParams
                                                                                                              • -
                                                                                                              • catch
                                                                                                              • -
                                                                                                              • Client
                                                                                                              • -
                                                                                                              • if
                                                                                                              • -
                                                                                                              • case
                                                                                                              • -
                                                                                                              • localVarHttpHeaderAccepts
                                                                                                              • -
                                                                                                              • new
                                                                                                              • -
                                                                                                              • using
                                                                                                              • -
                                                                                                              • static
                                                                                                              • -
                                                                                                              • void
                                                                                                              • -
                                                                                                              • localVarPostBody
                                                                                                              • -
                                                                                                              • in
                                                                                                              • -
                                                                                                              • sizeof
                                                                                                              • -
                                                                                                              • localVarResponse
                                                                                                              • -
                                                                                                              • byte
                                                                                                              • -
                                                                                                              • double
                                                                                                              • -
                                                                                                              • sealed
                                                                                                              • -
                                                                                                              • finally
                                                                                                              • -
                                                                                                              • this
                                                                                                              • -
                                                                                                              • unchecked
                                                                                                              • -
                                                                                                              • is
                                                                                                              • -
                                                                                                              • params
                                                                                                              • -
                                                                                                              • enum
                                                                                                              • -
                                                                                                              • explicit
                                                                                                              • -
                                                                                                              • as
                                                                                                              • -
                                                                                                              • null
                                                                                                              • -
                                                                                                              • localVarPath
                                                                                                              • -
                                                                                                              • true
                                                                                                              • -
                                                                                                              • fixed
                                                                                                              • -
                                                                                                              • try
                                                                                                              • -
                                                                                                              • decimal
                                                                                                              • -
                                                                                                              • object
                                                                                                              • -
                                                                                                              • implicit
                                                                                                              • -
                                                                                                              • internal
                                                                                                              • -
                                                                                                              • private
                                                                                                              • -
                                                                                                              • virtual
                                                                                                              • -
                                                                                                              • bool
                                                                                                              • -
                                                                                                              • const
                                                                                                              • -
                                                                                                              • string
                                                                                                              • -
                                                                                                              • for
                                                                                                              • -
                                                                                                              • localVarHttpHeaderAccept
                                                                                                              • -
                                                                                                              • interface
                                                                                                              • -
                                                                                                              • unsafe
                                                                                                              • -
                                                                                                              • long
                                                                                                              • -
                                                                                                              • out
                                                                                                              • -
                                                                                                              • switch
                                                                                                              • -
                                                                                                              • delegate
                                                                                                              • -
                                                                                                              • foreach
                                                                                                              • -
                                                                                                              • default
                                                                                                              • -
                                                                                                              • ulong
                                                                                                              • -
                                                                                                              • goto
                                                                                                              • -
                                                                                                              • localVarHttpContentTypes
                                                                                                              • -
                                                                                                              • localVarHttpContentType
                                                                                                              • -
                                                                                                              • public
                                                                                                              • -
                                                                                                              • localVarStatusCode
                                                                                                              • -
                                                                                                              • stackalloc
                                                                                                              • -
                                                                                                              • parameter
                                                                                                              • -
                                                                                                              • client
                                                                                                              • -
                                                                                                              • override
                                                                                                              • -
                                                                                                              • event
                                                                                                              • -
                                                                                                              • class
                                                                                                              • -
                                                                                                              • typeof
                                                                                                              • -
                                                                                                              • localVarFormParams
                                                                                                              • -
                                                                                                              • break
                                                                                                              • -
                                                                                                              • false
                                                                                                              • -
                                                                                                              • volatile
                                                                                                              • +
                                                                                                                • Client
                                                                                                                • abstract
                                                                                                                • -
                                                                                                                • uint
                                                                                                                • -
                                                                                                                • int
                                                                                                                • -
                                                                                                                • localVarHeaderParams
                                                                                                                • -
                                                                                                                • throw
                                                                                                                • -
                                                                                                                • char
                                                                                                                • -
                                                                                                                • namespace
                                                                                                                • -
                                                                                                                • sbyte
                                                                                                                • -
                                                                                                                • short
                                                                                                                • -
                                                                                                                • localVarFileParams
                                                                                                                • -
                                                                                                                • return
                                                                                                                • +
                                                                                                                • as
                                                                                                                • base
                                                                                                                • +
                                                                                                                • bool
                                                                                                                • +
                                                                                                                • break
                                                                                                                • +
                                                                                                                • byte
                                                                                                                • +
                                                                                                                • case
                                                                                                                • +
                                                                                                                • catch
                                                                                                                • +
                                                                                                                • char
                                                                                                                • +
                                                                                                                • checked
                                                                                                                • +
                                                                                                                • class
                                                                                                                • +
                                                                                                                • client
                                                                                                                • +
                                                                                                                • const
                                                                                                                • +
                                                                                                                • continue
                                                                                                                • +
                                                                                                                • decimal
                                                                                                                • +
                                                                                                                • default
                                                                                                                • +
                                                                                                                • delegate
                                                                                                                • +
                                                                                                                • do
                                                                                                                • +
                                                                                                                • double
                                                                                                                • +
                                                                                                                • else
                                                                                                                • +
                                                                                                                • enum
                                                                                                                • +
                                                                                                                • event
                                                                                                                • +
                                                                                                                • explicit
                                                                                                                • +
                                                                                                                • extern
                                                                                                                • +
                                                                                                                • false
                                                                                                                • +
                                                                                                                • finally
                                                                                                                • +
                                                                                                                • fixed
                                                                                                                • +
                                                                                                                • float
                                                                                                                • +
                                                                                                                • for
                                                                                                                • +
                                                                                                                • foreach
                                                                                                                • +
                                                                                                                • goto
                                                                                                                • +
                                                                                                                • if
                                                                                                                • +
                                                                                                                • implicit
                                                                                                                • +
                                                                                                                • in
                                                                                                                • +
                                                                                                                • int
                                                                                                                • +
                                                                                                                • interface
                                                                                                                • +
                                                                                                                • internal
                                                                                                                • +
                                                                                                                • is
                                                                                                                • +
                                                                                                                • localVarFileParams
                                                                                                                • +
                                                                                                                • localVarFormParams
                                                                                                                • +
                                                                                                                • localVarHeaderParams
                                                                                                                • +
                                                                                                                • localVarHttpContentType
                                                                                                                • +
                                                                                                                • localVarHttpContentTypes
                                                                                                                • +
                                                                                                                • localVarHttpHeaderAccept
                                                                                                                • +
                                                                                                                • localVarHttpHeaderAccepts
                                                                                                                • +
                                                                                                                • localVarPath
                                                                                                                • +
                                                                                                                • localVarPathParams
                                                                                                                • +
                                                                                                                • localVarPostBody
                                                                                                                • +
                                                                                                                • localVarQueryParams
                                                                                                                • +
                                                                                                                • localVarResponse
                                                                                                                • +
                                                                                                                • localVarStatusCode
                                                                                                                • +
                                                                                                                • lock
                                                                                                                • +
                                                                                                                • long
                                                                                                                • +
                                                                                                                • namespace
                                                                                                                • +
                                                                                                                • new
                                                                                                                • +
                                                                                                                • null
                                                                                                                • +
                                                                                                                • object
                                                                                                                • +
                                                                                                                • operator
                                                                                                                • +
                                                                                                                • out
                                                                                                                • +
                                                                                                                • override
                                                                                                                • +
                                                                                                                • parameter
                                                                                                                • +
                                                                                                                • params
                                                                                                                • +
                                                                                                                • private
                                                                                                                • +
                                                                                                                • protected
                                                                                                                • +
                                                                                                                • public
                                                                                                                • +
                                                                                                                • readonly
                                                                                                                • +
                                                                                                                • ref
                                                                                                                • +
                                                                                                                • return
                                                                                                                • +
                                                                                                                • sbyte
                                                                                                                • +
                                                                                                                • sealed
                                                                                                                • +
                                                                                                                • short
                                                                                                                • +
                                                                                                                • sizeof
                                                                                                                • +
                                                                                                                • stackalloc
                                                                                                                • +
                                                                                                                • static
                                                                                                                • +
                                                                                                                • string
                                                                                                                • +
                                                                                                                • struct
                                                                                                                • +
                                                                                                                • switch
                                                                                                                • +
                                                                                                                • this
                                                                                                                • +
                                                                                                                • throw
                                                                                                                • +
                                                                                                                • true
                                                                                                                • +
                                                                                                                • try
                                                                                                                • +
                                                                                                                • typeof
                                                                                                                • +
                                                                                                                • uint
                                                                                                                • +
                                                                                                                • ulong
                                                                                                                • +
                                                                                                                • unchecked
                                                                                                                • +
                                                                                                                • unsafe
                                                                                                                • +
                                                                                                                • ushort
                                                                                                                • +
                                                                                                                • using
                                                                                                                • +
                                                                                                                • virtual
                                                                                                                • +
                                                                                                                • void
                                                                                                                • +
                                                                                                                • volatile
                                                                                                                • +
                                                                                                                • while
                                                                                                                diff --git a/docs/generators/csharp-refactor.md b/docs/generators/csharp-refactor.md deleted file mode 100644 index d9f5714900..0000000000 --- a/docs/generators/csharp-refactor.md +++ /dev/null @@ -1,29 +0,0 @@ - ---- -id: generator-opts-client-csharp-refactor -title: Config Options for csharp-refactor -sidebar_label: csharp-refactor ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| -|packageVersion|C# package version.| |1.0.0| -|sourceFolder|source folder for generated code| |src| -|packageGuid|The GUID that will be associated with the C# project| |null| -|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| -|targetFramework|The target .NET framework version.|
                                                                                                                **netstandard1.3**
                                                                                                                .NET Standard 1.3 compatible
                                                                                                                **netstandard1.4**
                                                                                                                .NET Standard 1.4 compatible
                                                                                                                **netstandard1.5**
                                                                                                                .NET Standard 1.5 compatible
                                                                                                                **netstandard1.6**
                                                                                                                .NET Standard 1.6 compatible
                                                                                                                **netstandard2.0**
                                                                                                                .NET Standard 2.0 compatible
                                                                                                                **netcoreapp2.0**
                                                                                                                .NET Core 2.0 compatible
                                                                                                                |v4.6.1| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| -|optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| -|optionalProjectFile|Generate {PackageName}.csproj.| |true| -|optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| -|validatable|Generates self-validatable models.| |true| diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md index 731c734923..4ec890a4e8 100644 --- a/docs/generators/csharp.md +++ b/docs/generators/csharp.md @@ -5,29 +5,29 @@ sidebar_label: csharp | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| -|packageVersion|C# package version.| |1.0.0| -|sourceFolder|source folder for generated code| |src| -|packageGuid|The GUID that will be associated with the C# project| |null| -|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| -|targetFramework|The target .NET framework version.|
                                                                                                                **v3.5**
                                                                                                                .NET Framework 3.5 compatible
                                                                                                                **v4.0**
                                                                                                                .NET Framework 4.0 compatible
                                                                                                                **v4.5**
                                                                                                                .NET Framework 4.5+ compatible
                                                                                                                **v5.0**
                                                                                                                .NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)
                                                                                                                **uwp**
                                                                                                                Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)
                                                                                                                |v4.5| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| +|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| +|generatePropertyChanged|Specifies a AssemblyDescription for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| +|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| +|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| +|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| |optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| |optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| +|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| |optionalProjectFile|Generate {PackageName}.csproj.| |true| -|generatePropertyChanged|Specifies a AssemblyDescription for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |false| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| -|validatable|Generates self-validatable models.| |true| +|packageGuid|The GUID that will be associated with the C# project| |null| +|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| +|packageVersion|C# package version.| |1.0.0| +|returnICollection|Return ICollection<T> instead of the concrete type.| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|targetFramework|The target .NET framework version.|
                                                                                                                **v3.5**
                                                                                                                .NET Framework 3.5 compatible
                                                                                                                **v4.0**
                                                                                                                .NET Framework 4.0 compatible
                                                                                                                **v4.5**
                                                                                                                .NET Framework 4.5+ compatible
                                                                                                                **v5.0**
                                                                                                                .NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)
                                                                                                                **uwp**
                                                                                                                Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)
                                                                                                                |v4.5| +|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useCompareNetObjects|Use KellermanSoftware.CompareNetObjects for deep recursive object comparison. WARNING: this option incurs potential performance impact.| |false| -|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| +|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| +|validatable|Generates self-validatable models.| |true| ## IMPORT MAPPING @@ -46,133 +46,133 @@ sidebar_label: csharp ## LANGUAGE PRIMITIVES -
                                                                                                                • int?
                                                                                                                • -
                                                                                                                • Dictionary
                                                                                                                • -
                                                                                                                • string
                                                                                                                • -
                                                                                                                • bool
                                                                                                                • -
                                                                                                                • DateTimeOffset?
                                                                                                                • -
                                                                                                                • String
                                                                                                                • -
                                                                                                                • Guid
                                                                                                                • -
                                                                                                                • System.IO.Stream
                                                                                                                • -
                                                                                                                • bool?
                                                                                                                • -
                                                                                                                • float
                                                                                                                • -
                                                                                                                • long
                                                                                                                • -
                                                                                                                • DateTime
                                                                                                                • -
                                                                                                                • Int32
                                                                                                                • -
                                                                                                                • float?
                                                                                                                • -
                                                                                                                • DateTime?
                                                                                                                • -
                                                                                                                • List
                                                                                                                • -
                                                                                                                • Boolean
                                                                                                                • -
                                                                                                                • long?
                                                                                                                • -
                                                                                                                • double
                                                                                                                • -
                                                                                                                • Guid?
                                                                                                                • -
                                                                                                                • DateTimeOffset
                                                                                                                • -
                                                                                                                • Double
                                                                                                                • -
                                                                                                                • int
                                                                                                                • -
                                                                                                                • byte[]
                                                                                                                • -
                                                                                                                • Float
                                                                                                                • -
                                                                                                                • Int64
                                                                                                                • -
                                                                                                                • double?
                                                                                                                • -
                                                                                                                • ICollection
                                                                                                                • +
                                                                                                                  • Boolean
                                                                                                                  • Collection
                                                                                                                  • +
                                                                                                                  • DateTime
                                                                                                                  • +
                                                                                                                  • DateTime?
                                                                                                                  • +
                                                                                                                  • DateTimeOffset
                                                                                                                  • +
                                                                                                                  • DateTimeOffset?
                                                                                                                  • +
                                                                                                                  • Dictionary
                                                                                                                  • +
                                                                                                                  • Double
                                                                                                                  • +
                                                                                                                  • Float
                                                                                                                  • +
                                                                                                                  • Guid
                                                                                                                  • +
                                                                                                                  • Guid?
                                                                                                                  • +
                                                                                                                  • ICollection
                                                                                                                  • +
                                                                                                                  • Int32
                                                                                                                  • +
                                                                                                                  • Int64
                                                                                                                  • +
                                                                                                                  • List
                                                                                                                  • Object
                                                                                                                  • -
                                                                                                                  • decimal?
                                                                                                                  • +
                                                                                                                  • String
                                                                                                                  • +
                                                                                                                  • System.IO.Stream
                                                                                                                  • +
                                                                                                                  • bool
                                                                                                                  • +
                                                                                                                  • bool?
                                                                                                                  • +
                                                                                                                  • byte[]
                                                                                                                  • decimal
                                                                                                                  • +
                                                                                                                  • decimal?
                                                                                                                  • +
                                                                                                                  • double
                                                                                                                  • +
                                                                                                                  • double?
                                                                                                                  • +
                                                                                                                  • float
                                                                                                                  • +
                                                                                                                  • float?
                                                                                                                  • +
                                                                                                                  • int
                                                                                                                  • +
                                                                                                                  • int?
                                                                                                                  • +
                                                                                                                  • long
                                                                                                                  • +
                                                                                                                  • long?
                                                                                                                  • +
                                                                                                                  • string
                                                                                                                  ## RESERVED WORDS -
                                                                                                                  • struct
                                                                                                                  • -
                                                                                                                  • extern
                                                                                                                  • -
                                                                                                                  • do
                                                                                                                  • -
                                                                                                                  • ushort
                                                                                                                  • -
                                                                                                                  • float
                                                                                                                  • -
                                                                                                                  • while
                                                                                                                  • -
                                                                                                                  • operator
                                                                                                                  • -
                                                                                                                  • localVarQueryParams
                                                                                                                  • -
                                                                                                                  • ref
                                                                                                                  • -
                                                                                                                  • protected
                                                                                                                  • -
                                                                                                                  • readonly
                                                                                                                  • -
                                                                                                                  • continue
                                                                                                                  • -
                                                                                                                  • else
                                                                                                                  • -
                                                                                                                  • checked
                                                                                                                  • -
                                                                                                                  • lock
                                                                                                                  • -
                                                                                                                  • localVarPathParams
                                                                                                                  • -
                                                                                                                  • catch
                                                                                                                  • -
                                                                                                                  • Client
                                                                                                                  • -
                                                                                                                  • if
                                                                                                                  • -
                                                                                                                  • case
                                                                                                                  • -
                                                                                                                  • localVarHttpHeaderAccepts
                                                                                                                  • -
                                                                                                                  • new
                                                                                                                  • -
                                                                                                                  • using
                                                                                                                  • -
                                                                                                                  • static
                                                                                                                  • -
                                                                                                                  • void
                                                                                                                  • -
                                                                                                                  • localVarPostBody
                                                                                                                  • -
                                                                                                                  • in
                                                                                                                  • -
                                                                                                                  • sizeof
                                                                                                                  • -
                                                                                                                  • localVarResponse
                                                                                                                  • -
                                                                                                                  • byte
                                                                                                                  • -
                                                                                                                  • double
                                                                                                                  • -
                                                                                                                  • sealed
                                                                                                                  • -
                                                                                                                  • finally
                                                                                                                  • -
                                                                                                                  • this
                                                                                                                  • -
                                                                                                                  • unchecked
                                                                                                                  • -
                                                                                                                  • is
                                                                                                                  • -
                                                                                                                  • params
                                                                                                                  • -
                                                                                                                  • enum
                                                                                                                  • -
                                                                                                                  • explicit
                                                                                                                  • -
                                                                                                                  • as
                                                                                                                  • -
                                                                                                                  • null
                                                                                                                  • -
                                                                                                                  • localVarPath
                                                                                                                  • -
                                                                                                                  • true
                                                                                                                  • -
                                                                                                                  • fixed
                                                                                                                  • -
                                                                                                                  • try
                                                                                                                  • -
                                                                                                                  • decimal
                                                                                                                  • -
                                                                                                                  • object
                                                                                                                  • -
                                                                                                                  • implicit
                                                                                                                  • -
                                                                                                                  • internal
                                                                                                                  • -
                                                                                                                  • private
                                                                                                                  • -
                                                                                                                  • virtual
                                                                                                                  • -
                                                                                                                  • bool
                                                                                                                  • -
                                                                                                                  • const
                                                                                                                  • -
                                                                                                                  • string
                                                                                                                  • -
                                                                                                                  • for
                                                                                                                  • -
                                                                                                                  • localVarHttpHeaderAccept
                                                                                                                  • -
                                                                                                                  • interface
                                                                                                                  • -
                                                                                                                  • unsafe
                                                                                                                  • -
                                                                                                                  • long
                                                                                                                  • -
                                                                                                                  • out
                                                                                                                  • -
                                                                                                                  • switch
                                                                                                                  • -
                                                                                                                  • delegate
                                                                                                                  • -
                                                                                                                  • foreach
                                                                                                                  • -
                                                                                                                  • default
                                                                                                                  • -
                                                                                                                  • ulong
                                                                                                                  • -
                                                                                                                  • goto
                                                                                                                  • -
                                                                                                                  • localVarHttpContentTypes
                                                                                                                  • -
                                                                                                                  • localVarHttpContentType
                                                                                                                  • -
                                                                                                                  • public
                                                                                                                  • -
                                                                                                                  • localVarStatusCode
                                                                                                                  • -
                                                                                                                  • stackalloc
                                                                                                                  • -
                                                                                                                  • parameter
                                                                                                                  • -
                                                                                                                  • client
                                                                                                                  • -
                                                                                                                  • override
                                                                                                                  • -
                                                                                                                  • event
                                                                                                                  • -
                                                                                                                  • class
                                                                                                                  • -
                                                                                                                  • typeof
                                                                                                                  • -
                                                                                                                  • localVarFormParams
                                                                                                                  • -
                                                                                                                  • break
                                                                                                                  • -
                                                                                                                  • false
                                                                                                                  • -
                                                                                                                  • volatile
                                                                                                                  • +
                                                                                                                    • Client
                                                                                                                    • abstract
                                                                                                                    • -
                                                                                                                    • uint
                                                                                                                    • -
                                                                                                                    • int
                                                                                                                    • -
                                                                                                                    • localVarHeaderParams
                                                                                                                    • -
                                                                                                                    • throw
                                                                                                                    • -
                                                                                                                    • char
                                                                                                                    • -
                                                                                                                    • namespace
                                                                                                                    • -
                                                                                                                    • sbyte
                                                                                                                    • -
                                                                                                                    • short
                                                                                                                    • -
                                                                                                                    • localVarFileParams
                                                                                                                    • -
                                                                                                                    • return
                                                                                                                    • +
                                                                                                                    • as
                                                                                                                    • base
                                                                                                                    • +
                                                                                                                    • bool
                                                                                                                    • +
                                                                                                                    • break
                                                                                                                    • +
                                                                                                                    • byte
                                                                                                                    • +
                                                                                                                    • case
                                                                                                                    • +
                                                                                                                    • catch
                                                                                                                    • +
                                                                                                                    • char
                                                                                                                    • +
                                                                                                                    • checked
                                                                                                                    • +
                                                                                                                    • class
                                                                                                                    • +
                                                                                                                    • client
                                                                                                                    • +
                                                                                                                    • const
                                                                                                                    • +
                                                                                                                    • continue
                                                                                                                    • +
                                                                                                                    • decimal
                                                                                                                    • +
                                                                                                                    • default
                                                                                                                    • +
                                                                                                                    • delegate
                                                                                                                    • +
                                                                                                                    • do
                                                                                                                    • +
                                                                                                                    • double
                                                                                                                    • +
                                                                                                                    • else
                                                                                                                    • +
                                                                                                                    • enum
                                                                                                                    • +
                                                                                                                    • event
                                                                                                                    • +
                                                                                                                    • explicit
                                                                                                                    • +
                                                                                                                    • extern
                                                                                                                    • +
                                                                                                                    • false
                                                                                                                    • +
                                                                                                                    • finally
                                                                                                                    • +
                                                                                                                    • fixed
                                                                                                                    • +
                                                                                                                    • float
                                                                                                                    • +
                                                                                                                    • for
                                                                                                                    • +
                                                                                                                    • foreach
                                                                                                                    • +
                                                                                                                    • goto
                                                                                                                    • +
                                                                                                                    • if
                                                                                                                    • +
                                                                                                                    • implicit
                                                                                                                    • +
                                                                                                                    • in
                                                                                                                    • +
                                                                                                                    • int
                                                                                                                    • +
                                                                                                                    • interface
                                                                                                                    • +
                                                                                                                    • internal
                                                                                                                    • +
                                                                                                                    • is
                                                                                                                    • +
                                                                                                                    • localVarFileParams
                                                                                                                    • +
                                                                                                                    • localVarFormParams
                                                                                                                    • +
                                                                                                                    • localVarHeaderParams
                                                                                                                    • +
                                                                                                                    • localVarHttpContentType
                                                                                                                    • +
                                                                                                                    • localVarHttpContentTypes
                                                                                                                    • +
                                                                                                                    • localVarHttpHeaderAccept
                                                                                                                    • +
                                                                                                                    • localVarHttpHeaderAccepts
                                                                                                                    • +
                                                                                                                    • localVarPath
                                                                                                                    • +
                                                                                                                    • localVarPathParams
                                                                                                                    • +
                                                                                                                    • localVarPostBody
                                                                                                                    • +
                                                                                                                    • localVarQueryParams
                                                                                                                    • +
                                                                                                                    • localVarResponse
                                                                                                                    • +
                                                                                                                    • localVarStatusCode
                                                                                                                    • +
                                                                                                                    • lock
                                                                                                                    • +
                                                                                                                    • long
                                                                                                                    • +
                                                                                                                    • namespace
                                                                                                                    • +
                                                                                                                    • new
                                                                                                                    • +
                                                                                                                    • null
                                                                                                                    • +
                                                                                                                    • object
                                                                                                                    • +
                                                                                                                    • operator
                                                                                                                    • +
                                                                                                                    • out
                                                                                                                    • +
                                                                                                                    • override
                                                                                                                    • +
                                                                                                                    • parameter
                                                                                                                    • +
                                                                                                                    • params
                                                                                                                    • +
                                                                                                                    • private
                                                                                                                    • +
                                                                                                                    • protected
                                                                                                                    • +
                                                                                                                    • public
                                                                                                                    • +
                                                                                                                    • readonly
                                                                                                                    • +
                                                                                                                    • ref
                                                                                                                    • +
                                                                                                                    • return
                                                                                                                    • +
                                                                                                                    • sbyte
                                                                                                                    • +
                                                                                                                    • sealed
                                                                                                                    • +
                                                                                                                    • short
                                                                                                                    • +
                                                                                                                    • sizeof
                                                                                                                    • +
                                                                                                                    • stackalloc
                                                                                                                    • +
                                                                                                                    • static
                                                                                                                    • +
                                                                                                                    • string
                                                                                                                    • +
                                                                                                                    • struct
                                                                                                                    • +
                                                                                                                    • switch
                                                                                                                    • +
                                                                                                                    • this
                                                                                                                    • +
                                                                                                                    • throw
                                                                                                                    • +
                                                                                                                    • true
                                                                                                                    • +
                                                                                                                    • try
                                                                                                                    • +
                                                                                                                    • typeof
                                                                                                                    • +
                                                                                                                    • uint
                                                                                                                    • +
                                                                                                                    • ulong
                                                                                                                    • +
                                                                                                                    • unchecked
                                                                                                                    • +
                                                                                                                    • unsafe
                                                                                                                    • +
                                                                                                                    • ushort
                                                                                                                    • +
                                                                                                                    • using
                                                                                                                    • +
                                                                                                                    • virtual
                                                                                                                    • +
                                                                                                                    • void
                                                                                                                    • +
                                                                                                                    • volatile
                                                                                                                    • +
                                                                                                                    • while
                                                                                                                    diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md index 7f3a29158b..9765e1cc58 100644 --- a/docs/generators/cwiki.md +++ b/docs/generators/cwiki.md @@ -5,21 +5,21 @@ sidebar_label: cwiki | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|appName|short name of the application| |null| |appDescription|description of the application| |null| -|infoUrl|a URL where users can get more information about the application| |null| -|infoEmail|an email address to contact for inquiries about the application| |null| -|licenseInfo|a short description of the license| |null| -|licenseUrl|a URL pointing to the full license| |null| -|invokerPackage|root package for generated code| |null| -|groupId|groupId in generated pom.xml| |null| +|appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId in generated pom.xml| |null| +|infoEmail|an email address to contact for inquiries about the application| |null| +|infoUrl|a URL where users can get more information about the application| |null| +|invokerPackage|root package for generated code| |null| +|licenseInfo|a short description of the license| |null| +|licenseUrl|a URL pointing to the full license| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index bf00311720..3445c7e165 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -5,32 +5,32 @@ sidebar_label: dart-dio | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| +|dateLibrary|Option. Date library to use|
                                                                                                                    **core**
                                                                                                                    Dart core library (DateTime)
                                                                                                                    **timemachine**
                                                                                                                    Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
                                                                                                                    |core| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|nullableFields|Is the null fields should be in the JSON payload| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |pubAuthor|Author name in generated pubspec| |null| |pubAuthorEmail|Email address of the author in generated pubspec| |null| +|pubDescription|Description in generated pubspec| |null| |pubHomepage|Homepage in generated pubspec| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|pubName|Name in generated pubspec| |null| +|pubVersion|Version in generated pubspec| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|Source folder for generated code| |null| |supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| -|nullableFields|Is the null fields should be in the JSON payload| |null| -|dateLibrary|Option. Date library to use|
                                                                                                                    **core**
                                                                                                                    Dart core library (DateTime)
                                                                                                                    **timemachine**
                                                                                                                    Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
                                                                                                                    |core| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | +|BuiltList|package:built_collection/built_collection.dart| |BuiltMap|package:built_collection/built_collection.dart| |JsonObject|package:built_value/json_object.dart| |Uint8List|dart:typed_data| -|BuiltList|package:built_collection/built_collection.dart| ## INSTANTIATION TYPES @@ -43,82 +43,82 @@ sidebar_label: dart-dio ## LANGUAGE PRIMITIVES -
                                                                                                                    • bool
                                                                                                                    • +
                                                                                                                      • String
                                                                                                                      • +
                                                                                                                      • bool
                                                                                                                      • double
                                                                                                                      • -
                                                                                                                      • num
                                                                                                                      • -
                                                                                                                      • String
                                                                                                                      • int
                                                                                                                      • +
                                                                                                                      • num
                                                                                                                      ## RESERVED WORDS -
                                                                                                                      • do
                                                                                                                      • -
                                                                                                                      • source
                                                                                                                      • -
                                                                                                                      • while
                                                                                                                      • -
                                                                                                                      • operator
                                                                                                                      • -
                                                                                                                      • required
                                                                                                                      • -
                                                                                                                      • patch
                                                                                                                      • -
                                                                                                                      • late
                                                                                                                      • -
                                                                                                                      • continue
                                                                                                                      • -
                                                                                                                      • else
                                                                                                                      • -
                                                                                                                      • function
                                                                                                                      • -
                                                                                                                      • dynamic
                                                                                                                      • -
                                                                                                                      • catch
                                                                                                                      • -
                                                                                                                      • export
                                                                                                                      • -
                                                                                                                      • if
                                                                                                                      • -
                                                                                                                      • case
                                                                                                                      • -
                                                                                                                      • new
                                                                                                                      • -
                                                                                                                      • static
                                                                                                                      • -
                                                                                                                      • void
                                                                                                                      • -
                                                                                                                      • in
                                                                                                                      • -
                                                                                                                      • var
                                                                                                                      • -
                                                                                                                      • finally
                                                                                                                      • -
                                                                                                                      • this
                                                                                                                      • -
                                                                                                                      • is
                                                                                                                      • -
                                                                                                                      • sync
                                                                                                                      • -
                                                                                                                      • typedef
                                                                                                                      • -
                                                                                                                      • enum
                                                                                                                      • -
                                                                                                                      • covariant
                                                                                                                      • -
                                                                                                                      • mixin
                                                                                                                      • +
                                                                                                                        • abstract
                                                                                                                        • as
                                                                                                                        • -
                                                                                                                        • external
                                                                                                                        • +
                                                                                                                        • assert
                                                                                                                        • +
                                                                                                                        • async
                                                                                                                        • +
                                                                                                                        • await
                                                                                                                        • +
                                                                                                                        • break
                                                                                                                        • +
                                                                                                                        • case
                                                                                                                        • +
                                                                                                                        • catch
                                                                                                                        • +
                                                                                                                        • class
                                                                                                                        • +
                                                                                                                        • const
                                                                                                                        • +
                                                                                                                        • continue
                                                                                                                        • +
                                                                                                                        • covariant
                                                                                                                        • +
                                                                                                                        • default
                                                                                                                        • +
                                                                                                                        • deferred
                                                                                                                        • +
                                                                                                                        • do
                                                                                                                        • +
                                                                                                                        • dynamic
                                                                                                                        • +
                                                                                                                        • else
                                                                                                                        • +
                                                                                                                        • enum
                                                                                                                        • +
                                                                                                                        • export
                                                                                                                        • extends
                                                                                                                        • -
                                                                                                                        • null
                                                                                                                        • +
                                                                                                                        • extension
                                                                                                                        • +
                                                                                                                        • external
                                                                                                                        • +
                                                                                                                        • factory
                                                                                                                        • +
                                                                                                                        • false
                                                                                                                        • final
                                                                                                                        • +
                                                                                                                        • finally
                                                                                                                        • +
                                                                                                                        • for
                                                                                                                        • +
                                                                                                                        • function
                                                                                                                        • +
                                                                                                                        • get
                                                                                                                        • +
                                                                                                                        • hide
                                                                                                                        • +
                                                                                                                        • if
                                                                                                                        • +
                                                                                                                        • implements
                                                                                                                        • +
                                                                                                                        • import
                                                                                                                        • +
                                                                                                                        • in
                                                                                                                        • +
                                                                                                                        • inout
                                                                                                                        • +
                                                                                                                        • interface
                                                                                                                        • +
                                                                                                                        • is
                                                                                                                        • +
                                                                                                                        • late
                                                                                                                        • +
                                                                                                                        • library
                                                                                                                        • +
                                                                                                                        • mixin
                                                                                                                        • +
                                                                                                                        • native
                                                                                                                        • +
                                                                                                                        • new
                                                                                                                        • +
                                                                                                                        • null
                                                                                                                        • +
                                                                                                                        • of
                                                                                                                        • +
                                                                                                                        • on
                                                                                                                        • +
                                                                                                                        • operator
                                                                                                                        • +
                                                                                                                        • out
                                                                                                                        • +
                                                                                                                        • part
                                                                                                                        • +
                                                                                                                        • patch
                                                                                                                        • +
                                                                                                                        • required
                                                                                                                        • +
                                                                                                                        • rethrow
                                                                                                                        • +
                                                                                                                        • return
                                                                                                                        • +
                                                                                                                        • set
                                                                                                                        • +
                                                                                                                        • show
                                                                                                                        • +
                                                                                                                        • source
                                                                                                                        • +
                                                                                                                        • static
                                                                                                                        • +
                                                                                                                        • super
                                                                                                                        • +
                                                                                                                        • switch
                                                                                                                        • +
                                                                                                                        • sync
                                                                                                                        • +
                                                                                                                        • this
                                                                                                                        • +
                                                                                                                        • throw
                                                                                                                        • true
                                                                                                                        • try
                                                                                                                        • -
                                                                                                                        • implements
                                                                                                                        • -
                                                                                                                        • deferred
                                                                                                                        • -
                                                                                                                        • extension
                                                                                                                        • -
                                                                                                                        • const
                                                                                                                        • -
                                                                                                                        • import
                                                                                                                        • -
                                                                                                                        • part
                                                                                                                        • -
                                                                                                                        • for
                                                                                                                        • -
                                                                                                                        • show
                                                                                                                        • -
                                                                                                                        • interface
                                                                                                                        • -
                                                                                                                        • out
                                                                                                                        • -
                                                                                                                        • switch
                                                                                                                        • -
                                                                                                                        • default
                                                                                                                        • -
                                                                                                                        • library
                                                                                                                        • -
                                                                                                                        • native
                                                                                                                        • -
                                                                                                                        • assert
                                                                                                                        • -
                                                                                                                        • get
                                                                                                                        • -
                                                                                                                        • of
                                                                                                                        • -
                                                                                                                        • yield
                                                                                                                        • -
                                                                                                                        • await
                                                                                                                        • -
                                                                                                                        • class
                                                                                                                        • -
                                                                                                                        • on
                                                                                                                        • -
                                                                                                                        • rethrow
                                                                                                                        • -
                                                                                                                        • factory
                                                                                                                        • -
                                                                                                                        • set
                                                                                                                        • -
                                                                                                                        • break
                                                                                                                        • -
                                                                                                                        • false
                                                                                                                        • -
                                                                                                                        • abstract
                                                                                                                        • -
                                                                                                                        • super
                                                                                                                        • -
                                                                                                                        • async
                                                                                                                        • +
                                                                                                                        • typedef
                                                                                                                        • +
                                                                                                                        • var
                                                                                                                        • +
                                                                                                                        • void
                                                                                                                        • +
                                                                                                                        • while
                                                                                                                        • with
                                                                                                                        • -
                                                                                                                        • hide
                                                                                                                        • -
                                                                                                                        • inout
                                                                                                                        • -
                                                                                                                        • throw
                                                                                                                        • -
                                                                                                                        • return
                                                                                                                        • +
                                                                                                                        • yield
                                                                                                                        diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index 631c13c3b6..78f1eac7d5 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -5,23 +5,23 @@ sidebar_label: dart-jaguar | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|nullableFields|Is the null fields should be in the JSON payload| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |pubAuthor|Author name in generated pubspec| |null| |pubAuthorEmail|Email address of the author in generated pubspec| |null| +|pubDescription|Description in generated pubspec| |null| |pubHomepage|Homepage in generated pubspec| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|pubName|Name in generated pubspec| |null| +|pubVersion|Version in generated pubspec| |null| +|serialization|Choose serialization format JSON or PROTO is supported| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|Source folder for generated code| |null| |supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| -|nullableFields|Is the null fields should be in the JSON payload| |null| -|serialization|Choose serialization format JSON or PROTO is supported| |null| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| ## IMPORT MAPPING @@ -39,82 +39,82 @@ sidebar_label: dart-jaguar ## LANGUAGE PRIMITIVES -
                                                                                                                        • bool
                                                                                                                        • +
                                                                                                                          • String
                                                                                                                          • +
                                                                                                                          • bool
                                                                                                                          • double
                                                                                                                          • -
                                                                                                                          • num
                                                                                                                          • -
                                                                                                                          • String
                                                                                                                          • int
                                                                                                                          • +
                                                                                                                          • num
                                                                                                                          ## RESERVED WORDS -
                                                                                                                          • do
                                                                                                                          • -
                                                                                                                          • source
                                                                                                                          • -
                                                                                                                          • while
                                                                                                                          • -
                                                                                                                          • operator
                                                                                                                          • -
                                                                                                                          • required
                                                                                                                          • -
                                                                                                                          • patch
                                                                                                                          • -
                                                                                                                          • late
                                                                                                                          • -
                                                                                                                          • continue
                                                                                                                          • -
                                                                                                                          • else
                                                                                                                          • -
                                                                                                                          • function
                                                                                                                          • -
                                                                                                                          • dynamic
                                                                                                                          • -
                                                                                                                          • catch
                                                                                                                          • -
                                                                                                                          • export
                                                                                                                          • -
                                                                                                                          • if
                                                                                                                          • -
                                                                                                                          • case
                                                                                                                          • -
                                                                                                                          • new
                                                                                                                          • -
                                                                                                                          • static
                                                                                                                          • -
                                                                                                                          • void
                                                                                                                          • -
                                                                                                                          • in
                                                                                                                          • -
                                                                                                                          • var
                                                                                                                          • -
                                                                                                                          • finally
                                                                                                                          • -
                                                                                                                          • this
                                                                                                                          • -
                                                                                                                          • is
                                                                                                                          • -
                                                                                                                          • sync
                                                                                                                          • -
                                                                                                                          • typedef
                                                                                                                          • -
                                                                                                                          • enum
                                                                                                                          • -
                                                                                                                          • covariant
                                                                                                                          • -
                                                                                                                          • mixin
                                                                                                                          • +
                                                                                                                            • abstract
                                                                                                                            • as
                                                                                                                            • -
                                                                                                                            • external
                                                                                                                            • +
                                                                                                                            • assert
                                                                                                                            • +
                                                                                                                            • async
                                                                                                                            • +
                                                                                                                            • await
                                                                                                                            • +
                                                                                                                            • break
                                                                                                                            • +
                                                                                                                            • case
                                                                                                                            • +
                                                                                                                            • catch
                                                                                                                            • +
                                                                                                                            • class
                                                                                                                            • +
                                                                                                                            • const
                                                                                                                            • +
                                                                                                                            • continue
                                                                                                                            • +
                                                                                                                            • covariant
                                                                                                                            • +
                                                                                                                            • default
                                                                                                                            • +
                                                                                                                            • deferred
                                                                                                                            • +
                                                                                                                            • do
                                                                                                                            • +
                                                                                                                            • dynamic
                                                                                                                            • +
                                                                                                                            • else
                                                                                                                            • +
                                                                                                                            • enum
                                                                                                                            • +
                                                                                                                            • export
                                                                                                                            • extends
                                                                                                                            • -
                                                                                                                            • null
                                                                                                                            • +
                                                                                                                            • extension
                                                                                                                            • +
                                                                                                                            • external
                                                                                                                            • +
                                                                                                                            • factory
                                                                                                                            • +
                                                                                                                            • false
                                                                                                                            • final
                                                                                                                            • +
                                                                                                                            • finally
                                                                                                                            • +
                                                                                                                            • for
                                                                                                                            • +
                                                                                                                            • function
                                                                                                                            • +
                                                                                                                            • get
                                                                                                                            • +
                                                                                                                            • hide
                                                                                                                            • +
                                                                                                                            • if
                                                                                                                            • +
                                                                                                                            • implements
                                                                                                                            • +
                                                                                                                            • import
                                                                                                                            • +
                                                                                                                            • in
                                                                                                                            • +
                                                                                                                            • inout
                                                                                                                            • +
                                                                                                                            • interface
                                                                                                                            • +
                                                                                                                            • is
                                                                                                                            • +
                                                                                                                            • late
                                                                                                                            • +
                                                                                                                            • library
                                                                                                                            • +
                                                                                                                            • mixin
                                                                                                                            • +
                                                                                                                            • native
                                                                                                                            • +
                                                                                                                            • new
                                                                                                                            • +
                                                                                                                            • null
                                                                                                                            • +
                                                                                                                            • of
                                                                                                                            • +
                                                                                                                            • on
                                                                                                                            • +
                                                                                                                            • operator
                                                                                                                            • +
                                                                                                                            • out
                                                                                                                            • +
                                                                                                                            • part
                                                                                                                            • +
                                                                                                                            • patch
                                                                                                                            • +
                                                                                                                            • required
                                                                                                                            • +
                                                                                                                            • rethrow
                                                                                                                            • +
                                                                                                                            • return
                                                                                                                            • +
                                                                                                                            • set
                                                                                                                            • +
                                                                                                                            • show
                                                                                                                            • +
                                                                                                                            • source
                                                                                                                            • +
                                                                                                                            • static
                                                                                                                            • +
                                                                                                                            • super
                                                                                                                            • +
                                                                                                                            • switch
                                                                                                                            • +
                                                                                                                            • sync
                                                                                                                            • +
                                                                                                                            • this
                                                                                                                            • +
                                                                                                                            • throw
                                                                                                                            • true
                                                                                                                            • try
                                                                                                                            • -
                                                                                                                            • implements
                                                                                                                            • -
                                                                                                                            • deferred
                                                                                                                            • -
                                                                                                                            • extension
                                                                                                                            • -
                                                                                                                            • const
                                                                                                                            • -
                                                                                                                            • import
                                                                                                                            • -
                                                                                                                            • part
                                                                                                                            • -
                                                                                                                            • for
                                                                                                                            • -
                                                                                                                            • show
                                                                                                                            • -
                                                                                                                            • interface
                                                                                                                            • -
                                                                                                                            • out
                                                                                                                            • -
                                                                                                                            • switch
                                                                                                                            • -
                                                                                                                            • default
                                                                                                                            • -
                                                                                                                            • library
                                                                                                                            • -
                                                                                                                            • native
                                                                                                                            • -
                                                                                                                            • assert
                                                                                                                            • -
                                                                                                                            • get
                                                                                                                            • -
                                                                                                                            • of
                                                                                                                            • -
                                                                                                                            • yield
                                                                                                                            • -
                                                                                                                            • await
                                                                                                                            • -
                                                                                                                            • class
                                                                                                                            • -
                                                                                                                            • on
                                                                                                                            • -
                                                                                                                            • rethrow
                                                                                                                            • -
                                                                                                                            • factory
                                                                                                                            • -
                                                                                                                            • set
                                                                                                                            • -
                                                                                                                            • break
                                                                                                                            • -
                                                                                                                            • false
                                                                                                                            • -
                                                                                                                            • abstract
                                                                                                                            • -
                                                                                                                            • super
                                                                                                                            • -
                                                                                                                            • async
                                                                                                                            • +
                                                                                                                            • typedef
                                                                                                                            • +
                                                                                                                            • var
                                                                                                                            • +
                                                                                                                            • void
                                                                                                                            • +
                                                                                                                            • while
                                                                                                                            • with
                                                                                                                            • -
                                                                                                                            • hide
                                                                                                                            • -
                                                                                                                            • inout
                                                                                                                            • -
                                                                                                                            • throw
                                                                                                                            • -
                                                                                                                            • return
                                                                                                                            • +
                                                                                                                            • yield
                                                                                                                            diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 779ddf7c18..8b1bd158c3 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -5,21 +5,21 @@ sidebar_label: dart | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |browserClient|Is the client browser based (for Dart 1.x only)| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |pubAuthor|Author name in generated pubspec| |null| |pubAuthorEmail|Email address of the author in generated pubspec| |null| +|pubDescription|Description in generated pubspec| |null| |pubHomepage|Homepage in generated pubspec| |null| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|pubName|Name in generated pubspec| |null| +|pubVersion|Version in generated pubspec| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|Source folder for generated code| |null| |supportDart2|Support Dart 2.x (Dart 1.x support has been deprecated)| |true| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| ## IMPORT MAPPING @@ -37,82 +37,82 @@ sidebar_label: dart ## LANGUAGE PRIMITIVES -
                                                                                                                            • bool
                                                                                                                            • +
                                                                                                                              • String
                                                                                                                              • +
                                                                                                                              • bool
                                                                                                                              • double
                                                                                                                              • -
                                                                                                                              • num
                                                                                                                              • -
                                                                                                                              • String
                                                                                                                              • int
                                                                                                                              • +
                                                                                                                              • num
                                                                                                                              ## RESERVED WORDS -
                                                                                                                              • do
                                                                                                                              • -
                                                                                                                              • source
                                                                                                                              • -
                                                                                                                              • while
                                                                                                                              • -
                                                                                                                              • operator
                                                                                                                              • -
                                                                                                                              • required
                                                                                                                              • -
                                                                                                                              • patch
                                                                                                                              • -
                                                                                                                              • late
                                                                                                                              • -
                                                                                                                              • continue
                                                                                                                              • -
                                                                                                                              • else
                                                                                                                              • -
                                                                                                                              • function
                                                                                                                              • -
                                                                                                                              • dynamic
                                                                                                                              • -
                                                                                                                              • catch
                                                                                                                              • -
                                                                                                                              • export
                                                                                                                              • -
                                                                                                                              • if
                                                                                                                              • -
                                                                                                                              • case
                                                                                                                              • -
                                                                                                                              • new
                                                                                                                              • -
                                                                                                                              • static
                                                                                                                              • -
                                                                                                                              • void
                                                                                                                              • -
                                                                                                                              • in
                                                                                                                              • -
                                                                                                                              • var
                                                                                                                              • -
                                                                                                                              • finally
                                                                                                                              • -
                                                                                                                              • this
                                                                                                                              • -
                                                                                                                              • is
                                                                                                                              • -
                                                                                                                              • sync
                                                                                                                              • -
                                                                                                                              • typedef
                                                                                                                              • -
                                                                                                                              • enum
                                                                                                                              • -
                                                                                                                              • covariant
                                                                                                                              • -
                                                                                                                              • mixin
                                                                                                                              • +
                                                                                                                                • abstract
                                                                                                                                • as
                                                                                                                                • -
                                                                                                                                • external
                                                                                                                                • +
                                                                                                                                • assert
                                                                                                                                • +
                                                                                                                                • async
                                                                                                                                • +
                                                                                                                                • await
                                                                                                                                • +
                                                                                                                                • break
                                                                                                                                • +
                                                                                                                                • case
                                                                                                                                • +
                                                                                                                                • catch
                                                                                                                                • +
                                                                                                                                • class
                                                                                                                                • +
                                                                                                                                • const
                                                                                                                                • +
                                                                                                                                • continue
                                                                                                                                • +
                                                                                                                                • covariant
                                                                                                                                • +
                                                                                                                                • default
                                                                                                                                • +
                                                                                                                                • deferred
                                                                                                                                • +
                                                                                                                                • do
                                                                                                                                • +
                                                                                                                                • dynamic
                                                                                                                                • +
                                                                                                                                • else
                                                                                                                                • +
                                                                                                                                • enum
                                                                                                                                • +
                                                                                                                                • export
                                                                                                                                • extends
                                                                                                                                • -
                                                                                                                                • null
                                                                                                                                • +
                                                                                                                                • extension
                                                                                                                                • +
                                                                                                                                • external
                                                                                                                                • +
                                                                                                                                • factory
                                                                                                                                • +
                                                                                                                                • false
                                                                                                                                • final
                                                                                                                                • +
                                                                                                                                • finally
                                                                                                                                • +
                                                                                                                                • for
                                                                                                                                • +
                                                                                                                                • function
                                                                                                                                • +
                                                                                                                                • get
                                                                                                                                • +
                                                                                                                                • hide
                                                                                                                                • +
                                                                                                                                • if
                                                                                                                                • +
                                                                                                                                • implements
                                                                                                                                • +
                                                                                                                                • import
                                                                                                                                • +
                                                                                                                                • in
                                                                                                                                • +
                                                                                                                                • inout
                                                                                                                                • +
                                                                                                                                • interface
                                                                                                                                • +
                                                                                                                                • is
                                                                                                                                • +
                                                                                                                                • late
                                                                                                                                • +
                                                                                                                                • library
                                                                                                                                • +
                                                                                                                                • mixin
                                                                                                                                • +
                                                                                                                                • native
                                                                                                                                • +
                                                                                                                                • new
                                                                                                                                • +
                                                                                                                                • null
                                                                                                                                • +
                                                                                                                                • of
                                                                                                                                • +
                                                                                                                                • on
                                                                                                                                • +
                                                                                                                                • operator
                                                                                                                                • +
                                                                                                                                • out
                                                                                                                                • +
                                                                                                                                • part
                                                                                                                                • +
                                                                                                                                • patch
                                                                                                                                • +
                                                                                                                                • required
                                                                                                                                • +
                                                                                                                                • rethrow
                                                                                                                                • +
                                                                                                                                • return
                                                                                                                                • +
                                                                                                                                • set
                                                                                                                                • +
                                                                                                                                • show
                                                                                                                                • +
                                                                                                                                • source
                                                                                                                                • +
                                                                                                                                • static
                                                                                                                                • +
                                                                                                                                • super
                                                                                                                                • +
                                                                                                                                • switch
                                                                                                                                • +
                                                                                                                                • sync
                                                                                                                                • +
                                                                                                                                • this
                                                                                                                                • +
                                                                                                                                • throw
                                                                                                                                • true
                                                                                                                                • try
                                                                                                                                • -
                                                                                                                                • implements
                                                                                                                                • -
                                                                                                                                • deferred
                                                                                                                                • -
                                                                                                                                • extension
                                                                                                                                • -
                                                                                                                                • const
                                                                                                                                • -
                                                                                                                                • import
                                                                                                                                • -
                                                                                                                                • part
                                                                                                                                • -
                                                                                                                                • for
                                                                                                                                • -
                                                                                                                                • show
                                                                                                                                • -
                                                                                                                                • interface
                                                                                                                                • -
                                                                                                                                • out
                                                                                                                                • -
                                                                                                                                • switch
                                                                                                                                • -
                                                                                                                                • default
                                                                                                                                • -
                                                                                                                                • library
                                                                                                                                • -
                                                                                                                                • native
                                                                                                                                • -
                                                                                                                                • assert
                                                                                                                                • -
                                                                                                                                • get
                                                                                                                                • -
                                                                                                                                • of
                                                                                                                                • -
                                                                                                                                • yield
                                                                                                                                • -
                                                                                                                                • await
                                                                                                                                • -
                                                                                                                                • class
                                                                                                                                • -
                                                                                                                                • on
                                                                                                                                • -
                                                                                                                                • rethrow
                                                                                                                                • -
                                                                                                                                • factory
                                                                                                                                • -
                                                                                                                                • set
                                                                                                                                • -
                                                                                                                                • break
                                                                                                                                • -
                                                                                                                                • false
                                                                                                                                • -
                                                                                                                                • abstract
                                                                                                                                • -
                                                                                                                                • super
                                                                                                                                • -
                                                                                                                                • async
                                                                                                                                • +
                                                                                                                                • typedef
                                                                                                                                • +
                                                                                                                                • var
                                                                                                                                • +
                                                                                                                                • void
                                                                                                                                • +
                                                                                                                                • while
                                                                                                                                • with
                                                                                                                                • -
                                                                                                                                • hide
                                                                                                                                • -
                                                                                                                                • inout
                                                                                                                                • -
                                                                                                                                • throw
                                                                                                                                • -
                                                                                                                                • return
                                                                                                                                • +
                                                                                                                                • yield
                                                                                                                                diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md index 7527655ca3..1fa63d3434 100644 --- a/docs/generators/dynamic-html.md +++ b/docs/generators/dynamic-html.md @@ -5,15 +5,15 @@ sidebar_label: dynamic-html | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|invokerPackage|root package for generated code| |null| -|groupId|groupId in generated pom.xml| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId in generated pom.xml| |null| +|invokerPackage|root package for generated code| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING diff --git a/docs/generators/eiffel.md b/docs/generators/eiffel.md index 9b853a32d8..2f239b7c40 100644 --- a/docs/generators/eiffel.md +++ b/docs/generators/eiffel.md @@ -5,30 +5,30 @@ sidebar_label: eiffel | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|Eiffel Cluster name (convention: lowercase).| |openapi| |packageVersion|Eiffel package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -42,79 +42,79 @@ sidebar_label: eiffel ## LANGUAGE PRIMITIVES -
                                                                                                                                • INTEGER_16
                                                                                                                                • -
                                                                                                                                • NATURAL_16
                                                                                                                                • -
                                                                                                                                • INTEGER_8
                                                                                                                                • -
                                                                                                                                • REAL_32
                                                                                                                                • +
                                                                                                                                  • BOOLEAN
                                                                                                                                  • +
                                                                                                                                  • INTEGER_16
                                                                                                                                  • INTEGER_32
                                                                                                                                  • INTEGER_64
                                                                                                                                  • -
                                                                                                                                  • REAL_64
                                                                                                                                  • -
                                                                                                                                  • NATURAL_8
                                                                                                                                  • -
                                                                                                                                  • BOOLEAN
                                                                                                                                  • -
                                                                                                                                  • NATURAL_64
                                                                                                                                  • +
                                                                                                                                  • INTEGER_8
                                                                                                                                  • +
                                                                                                                                  • NATURAL_16
                                                                                                                                  • NATURAL_32
                                                                                                                                  • +
                                                                                                                                  • NATURAL_64
                                                                                                                                  • +
                                                                                                                                  • NATURAL_8
                                                                                                                                  • +
                                                                                                                                  • REAL_32
                                                                                                                                  • +
                                                                                                                                  • REAL_64
                                                                                                                                  ## RESERVED WORDS -
                                                                                                                                  • agent
                                                                                                                                  • -
                                                                                                                                  • select
                                                                                                                                  • -
                                                                                                                                  • separate
                                                                                                                                  • -
                                                                                                                                  • convert
                                                                                                                                  • -
                                                                                                                                  • do
                                                                                                                                  • -
                                                                                                                                  • when
                                                                                                                                  • -
                                                                                                                                  • else
                                                                                                                                  • -
                                                                                                                                  • loop
                                                                                                                                  • -
                                                                                                                                  • elseif
                                                                                                                                  • -
                                                                                                                                  • only
                                                                                                                                  • -
                                                                                                                                  • precursor
                                                                                                                                  • -
                                                                                                                                  • variant
                                                                                                                                  • -
                                                                                                                                  • create
                                                                                                                                  • -
                                                                                                                                  • from
                                                                                                                                  • -
                                                                                                                                  • export
                                                                                                                                  • -
                                                                                                                                  • if
                                                                                                                                  • +
                                                                                                                                    • across
                                                                                                                                    • +
                                                                                                                                    • agent
                                                                                                                                    • +
                                                                                                                                    • alias
                                                                                                                                    • all
                                                                                                                                    • -
                                                                                                                                    • ensure
                                                                                                                                    • -
                                                                                                                                    • void
                                                                                                                                    • -
                                                                                                                                    • like
                                                                                                                                    • -
                                                                                                                                    • old
                                                                                                                                    • -
                                                                                                                                    • frozen
                                                                                                                                    • -
                                                                                                                                    • require
                                                                                                                                    • -
                                                                                                                                    • check
                                                                                                                                    • -
                                                                                                                                    • then
                                                                                                                                    • -
                                                                                                                                    • undefine
                                                                                                                                    • -
                                                                                                                                    • invariant
                                                                                                                                    • +
                                                                                                                                    • and
                                                                                                                                    • as
                                                                                                                                    • -
                                                                                                                                    • external
                                                                                                                                    • -
                                                                                                                                    • once
                                                                                                                                    • -
                                                                                                                                    • inspect
                                                                                                                                    • -
                                                                                                                                    • true
                                                                                                                                    • +
                                                                                                                                    • assign
                                                                                                                                    • +
                                                                                                                                    • attribute
                                                                                                                                    • +
                                                                                                                                    • check
                                                                                                                                    • +
                                                                                                                                    • class
                                                                                                                                    • +
                                                                                                                                    • convert
                                                                                                                                    • +
                                                                                                                                    • create
                                                                                                                                    • +
                                                                                                                                    • current
                                                                                                                                    • +
                                                                                                                                    • debug
                                                                                                                                    • deferred
                                                                                                                                    • +
                                                                                                                                    • do
                                                                                                                                    • +
                                                                                                                                    • else
                                                                                                                                    • +
                                                                                                                                    • elseif
                                                                                                                                    • +
                                                                                                                                    • end
                                                                                                                                    • +
                                                                                                                                    • ensure
                                                                                                                                    • +
                                                                                                                                    • expanded
                                                                                                                                    • +
                                                                                                                                    • export
                                                                                                                                    • +
                                                                                                                                    • external
                                                                                                                                    • +
                                                                                                                                    • false
                                                                                                                                    • +
                                                                                                                                    • feature
                                                                                                                                    • +
                                                                                                                                    • from
                                                                                                                                    • +
                                                                                                                                    • frozen
                                                                                                                                    • +
                                                                                                                                    • if
                                                                                                                                    • +
                                                                                                                                    • implies
                                                                                                                                    • +
                                                                                                                                    • inherit
                                                                                                                                    • +
                                                                                                                                    • inspect
                                                                                                                                    • +
                                                                                                                                    • invariant
                                                                                                                                    • +
                                                                                                                                    • like
                                                                                                                                    • +
                                                                                                                                    • local
                                                                                                                                    • +
                                                                                                                                    • loop
                                                                                                                                    • +
                                                                                                                                    • not
                                                                                                                                    • note
                                                                                                                                    • obsolete
                                                                                                                                    • -
                                                                                                                                    • local
                                                                                                                                    • -
                                                                                                                                    • result
                                                                                                                                    • -
                                                                                                                                    • across
                                                                                                                                    • -
                                                                                                                                    • redefine
                                                                                                                                    • -
                                                                                                                                    • tuple
                                                                                                                                    • -
                                                                                                                                    • current
                                                                                                                                    • -
                                                                                                                                    • expanded
                                                                                                                                    • -
                                                                                                                                    • not
                                                                                                                                    • -
                                                                                                                                    • feature
                                                                                                                                    • -
                                                                                                                                    • and
                                                                                                                                    • -
                                                                                                                                    • alias
                                                                                                                                    • -
                                                                                                                                    • end
                                                                                                                                    • -
                                                                                                                                    • xor
                                                                                                                                    • -
                                                                                                                                    • attribute
                                                                                                                                    • -
                                                                                                                                    • class
                                                                                                                                    • -
                                                                                                                                    • rescue
                                                                                                                                    • -
                                                                                                                                    • retry
                                                                                                                                    • -
                                                                                                                                    • debug
                                                                                                                                    • +
                                                                                                                                    • old
                                                                                                                                    • +
                                                                                                                                    • once
                                                                                                                                    • +
                                                                                                                                    • only
                                                                                                                                    • or
                                                                                                                                    • -
                                                                                                                                    • false
                                                                                                                                    • +
                                                                                                                                    • precursor
                                                                                                                                    • +
                                                                                                                                    • redefine
                                                                                                                                    • rename
                                                                                                                                    • -
                                                                                                                                    • inherit
                                                                                                                                    • +
                                                                                                                                    • require
                                                                                                                                    • +
                                                                                                                                    • rescue
                                                                                                                                    • +
                                                                                                                                    • result
                                                                                                                                    • +
                                                                                                                                    • retry
                                                                                                                                    • +
                                                                                                                                    • select
                                                                                                                                    • +
                                                                                                                                    • separate
                                                                                                                                    • +
                                                                                                                                    • then
                                                                                                                                    • +
                                                                                                                                    • true
                                                                                                                                    • +
                                                                                                                                    • tuple
                                                                                                                                    • +
                                                                                                                                    • undefine
                                                                                                                                    • until
                                                                                                                                    • -
                                                                                                                                    • implies
                                                                                                                                    • -
                                                                                                                                    • assign
                                                                                                                                    • +
                                                                                                                                    • variant
                                                                                                                                    • +
                                                                                                                                    • void
                                                                                                                                    • +
                                                                                                                                    • when
                                                                                                                                    • +
                                                                                                                                    • xor
                                                                                                                                    diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md index 47c9405e6f..fae1d80bd3 100644 --- a/docs/generators/elixir.md +++ b/docs/generators/elixir.md @@ -5,35 +5,35 @@ sidebar_label: elixir | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |invokerPackage|The main namespace to use for all classes. e.g. Yay.Pets| |null| |licenseHeader|The license header to prepend to the top of all source files.| |null| |packageName|Elixir package name (convention: lowercase).| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -44,26 +44,26 @@ sidebar_label: elixir ## LANGUAGE PRIMITIVES -
                                                                                                                                    • Integer
                                                                                                                                    • +
                                                                                                                                      • Atom
                                                                                                                                      • +
                                                                                                                                      • Boolean
                                                                                                                                      • +
                                                                                                                                      • DateTime
                                                                                                                                      • Float
                                                                                                                                      • +
                                                                                                                                      • Integer
                                                                                                                                      • List
                                                                                                                                      • +
                                                                                                                                      • Map
                                                                                                                                      • PID
                                                                                                                                      • String
                                                                                                                                      • -
                                                                                                                                      • Boolean
                                                                                                                                      • -
                                                                                                                                      • Map
                                                                                                                                      • -
                                                                                                                                      • Atom
                                                                                                                                      • Tuple
                                                                                                                                      • -
                                                                                                                                      • DateTime
                                                                                                                                      ## RESERVED WORDS -
                                                                                                                                      • nil
                                                                                                                                      • +
                                                                                                                                        • __CALLER__
                                                                                                                                        • __DIR__
                                                                                                                                        • __ENV__
                                                                                                                                        • -
                                                                                                                                        • __CALLER__
                                                                                                                                        • __FILE__
                                                                                                                                        • -
                                                                                                                                        • true
                                                                                                                                        • -
                                                                                                                                        • false
                                                                                                                                        • __MODULE__
                                                                                                                                        • +
                                                                                                                                        • false
                                                                                                                                        • +
                                                                                                                                        • nil
                                                                                                                                        • +
                                                                                                                                        • true
                                                                                                                                        diff --git a/docs/generators/elm.md b/docs/generators/elm.md index 3c1fabd660..aa3fe4f49b 100644 --- a/docs/generators/elm.md +++ b/docs/generators/elm.md @@ -5,10 +5,10 @@ sidebar_label: elm | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|elmVersion|Elm version: 0.18, 0.19|
                                                                                                                                        **0.19**
                                                                                                                                        Elm 0.19
                                                                                                                                        **0.18**
                                                                                                                                        Elm 0.18
                                                                                                                                        |0.19| -|elmPrefixCustomTypeVariants|Prefix custom type variants| |false| |elmEnableCustomBasePaths|Enable setting the base path for each request| |false| |elmEnableHttpRequestTrackers|Enable adding a tracker to each http request| |false| +|elmPrefixCustomTypeVariants|Prefix custom type variants| |false| +|elmVersion|Elm version: 0.18, 0.19|
                                                                                                                                        **0.19**
                                                                                                                                        Elm 0.19
                                                                                                                                        **0.18**
                                                                                                                                        Elm 0.18
                                                                                                                                        |0.19| ## IMPORT MAPPING @@ -26,28 +26,28 @@ sidebar_label: elm ## LANGUAGE PRIMITIVES -
                                                                                                                                        • Float
                                                                                                                                        • -
                                                                                                                                        • Bool
                                                                                                                                        • +
                                                                                                                                          • Bool
                                                                                                                                          • Dict
                                                                                                                                          • +
                                                                                                                                          • Float
                                                                                                                                          • +
                                                                                                                                          • Int
                                                                                                                                          • List
                                                                                                                                          • String
                                                                                                                                          • -
                                                                                                                                          • Int
                                                                                                                                          ## RESERVED WORDS -
                                                                                                                                          • import
                                                                                                                                          • +
                                                                                                                                            • as
                                                                                                                                            • +
                                                                                                                                            • case
                                                                                                                                            • +
                                                                                                                                            • else
                                                                                                                                            • +
                                                                                                                                            • exposing
                                                                                                                                            • +
                                                                                                                                            • if
                                                                                                                                            • +
                                                                                                                                            • import
                                                                                                                                            • in
                                                                                                                                            • +
                                                                                                                                            • let
                                                                                                                                            • module
                                                                                                                                            • +
                                                                                                                                            • of
                                                                                                                                            • +
                                                                                                                                            • port
                                                                                                                                            • then
                                                                                                                                            • type
                                                                                                                                            • -
                                                                                                                                            • exposing
                                                                                                                                            • -
                                                                                                                                            • as
                                                                                                                                            • -
                                                                                                                                            • port
                                                                                                                                            • -
                                                                                                                                            • else
                                                                                                                                            • -
                                                                                                                                            • of
                                                                                                                                            • -
                                                                                                                                            • let
                                                                                                                                            • where
                                                                                                                                            • -
                                                                                                                                            • if
                                                                                                                                            • -
                                                                                                                                            • case
                                                                                                                                            diff --git a/docs/generators/erlang-client.md b/docs/generators/erlang-client.md index cc4454bcd4..72e4df6061 100644 --- a/docs/generators/erlang-client.md +++ b/docs/generators/erlang-client.md @@ -6,28 +6,28 @@ sidebar_label: erlang-client | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |packageName|Erlang application name (convention: lowercase).| |openapi| -|packageName|Erlang application version| |1.0.0| +|packageVersion|Erlang application version| |1.0.0| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -42,31 +42,31 @@ sidebar_label: erlang-client ## RESERVED WORDS -
                                                                                                                                            • bsr
                                                                                                                                            • -
                                                                                                                                            • orelse
                                                                                                                                            • -
                                                                                                                                            • bor
                                                                                                                                            • -
                                                                                                                                            • cond
                                                                                                                                            • -
                                                                                                                                            • when
                                                                                                                                            • -
                                                                                                                                            • div
                                                                                                                                            • -
                                                                                                                                            • not
                                                                                                                                            • +
                                                                                                                                              • after
                                                                                                                                              • and
                                                                                                                                              • -
                                                                                                                                              • bxor
                                                                                                                                              • -
                                                                                                                                              • of
                                                                                                                                              • -
                                                                                                                                              • end
                                                                                                                                              • -
                                                                                                                                              • let
                                                                                                                                              • -
                                                                                                                                              • xor
                                                                                                                                              • -
                                                                                                                                              • after
                                                                                                                                              • -
                                                                                                                                              • band
                                                                                                                                              • -
                                                                                                                                              • catch
                                                                                                                                              • -
                                                                                                                                              • rem
                                                                                                                                              • -
                                                                                                                                              • if
                                                                                                                                              • -
                                                                                                                                              • case
                                                                                                                                              • -
                                                                                                                                              • bnot
                                                                                                                                              • -
                                                                                                                                              • receive
                                                                                                                                              • -
                                                                                                                                              • or
                                                                                                                                              • -
                                                                                                                                              • bsl
                                                                                                                                              • -
                                                                                                                                              • try
                                                                                                                                              • -
                                                                                                                                              • begin
                                                                                                                                              • andalso
                                                                                                                                              • +
                                                                                                                                              • band
                                                                                                                                              • +
                                                                                                                                              • begin
                                                                                                                                              • +
                                                                                                                                              • bnot
                                                                                                                                              • +
                                                                                                                                              • bor
                                                                                                                                              • +
                                                                                                                                              • bsl
                                                                                                                                              • +
                                                                                                                                              • bsr
                                                                                                                                              • +
                                                                                                                                              • bxor
                                                                                                                                              • +
                                                                                                                                              • case
                                                                                                                                              • +
                                                                                                                                              • catch
                                                                                                                                              • +
                                                                                                                                              • cond
                                                                                                                                              • +
                                                                                                                                              • div
                                                                                                                                              • +
                                                                                                                                              • end
                                                                                                                                              • fun
                                                                                                                                              • +
                                                                                                                                              • if
                                                                                                                                              • +
                                                                                                                                              • let
                                                                                                                                              • +
                                                                                                                                              • not
                                                                                                                                              • +
                                                                                                                                              • of
                                                                                                                                              • +
                                                                                                                                              • or
                                                                                                                                              • +
                                                                                                                                              • orelse
                                                                                                                                              • +
                                                                                                                                              • receive
                                                                                                                                              • +
                                                                                                                                              • rem
                                                                                                                                              • +
                                                                                                                                              • try
                                                                                                                                              • +
                                                                                                                                              • when
                                                                                                                                              • +
                                                                                                                                              • xor
                                                                                                                                              diff --git a/docs/generators/erlang-proper.md b/docs/generators/erlang-proper.md index 9aa6ce7834..6d48712bdc 100644 --- a/docs/generators/erlang-proper.md +++ b/docs/generators/erlang-proper.md @@ -6,28 +6,28 @@ sidebar_label: erlang-proper | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |packageName|Erlang application name (convention: lowercase).| |openapi| -|packageName|Erlang application version| |1.0.0| +|packageVersion|Erlang application version| |1.0.0| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -42,31 +42,31 @@ sidebar_label: erlang-proper ## RESERVED WORDS -
                                                                                                                                              • bsr
                                                                                                                                              • -
                                                                                                                                              • orelse
                                                                                                                                              • -
                                                                                                                                              • bor
                                                                                                                                              • -
                                                                                                                                              • cond
                                                                                                                                              • -
                                                                                                                                              • when
                                                                                                                                              • -
                                                                                                                                              • div
                                                                                                                                              • -
                                                                                                                                              • not
                                                                                                                                              • +
                                                                                                                                                • after
                                                                                                                                                • and
                                                                                                                                                • -
                                                                                                                                                • bxor
                                                                                                                                                • -
                                                                                                                                                • of
                                                                                                                                                • -
                                                                                                                                                • end
                                                                                                                                                • -
                                                                                                                                                • let
                                                                                                                                                • -
                                                                                                                                                • xor
                                                                                                                                                • -
                                                                                                                                                • after
                                                                                                                                                • -
                                                                                                                                                • band
                                                                                                                                                • -
                                                                                                                                                • catch
                                                                                                                                                • -
                                                                                                                                                • rem
                                                                                                                                                • -
                                                                                                                                                • if
                                                                                                                                                • -
                                                                                                                                                • case
                                                                                                                                                • -
                                                                                                                                                • bnot
                                                                                                                                                • -
                                                                                                                                                • receive
                                                                                                                                                • -
                                                                                                                                                • or
                                                                                                                                                • -
                                                                                                                                                • bsl
                                                                                                                                                • -
                                                                                                                                                • try
                                                                                                                                                • -
                                                                                                                                                • begin
                                                                                                                                                • andalso
                                                                                                                                                • +
                                                                                                                                                • band
                                                                                                                                                • +
                                                                                                                                                • begin
                                                                                                                                                • +
                                                                                                                                                • bnot
                                                                                                                                                • +
                                                                                                                                                • bor
                                                                                                                                                • +
                                                                                                                                                • bsl
                                                                                                                                                • +
                                                                                                                                                • bsr
                                                                                                                                                • +
                                                                                                                                                • bxor
                                                                                                                                                • +
                                                                                                                                                • case
                                                                                                                                                • +
                                                                                                                                                • catch
                                                                                                                                                • +
                                                                                                                                                • cond
                                                                                                                                                • +
                                                                                                                                                • div
                                                                                                                                                • +
                                                                                                                                                • end
                                                                                                                                                • fun
                                                                                                                                                • +
                                                                                                                                                • if
                                                                                                                                                • +
                                                                                                                                                • let
                                                                                                                                                • +
                                                                                                                                                • not
                                                                                                                                                • +
                                                                                                                                                • of
                                                                                                                                                • +
                                                                                                                                                • or
                                                                                                                                                • +
                                                                                                                                                • orelse
                                                                                                                                                • +
                                                                                                                                                • receive
                                                                                                                                                • +
                                                                                                                                                • rem
                                                                                                                                                • +
                                                                                                                                                • try
                                                                                                                                                • +
                                                                                                                                                • when
                                                                                                                                                • +
                                                                                                                                                • xor
                                                                                                                                                diff --git a/docs/generators/erlang-server.md b/docs/generators/erlang-server.md index b63b6f2a50..8db2184f0d 100644 --- a/docs/generators/erlang-server.md +++ b/docs/generators/erlang-server.md @@ -5,29 +5,29 @@ sidebar_label: erlang-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Erlang package name (convention: lowercase).| |openapi| |openAPISpecName|Openapi Spec Name.| |openapi| +|packageName|Erlang package name (convention: lowercase).| |openapi| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -42,31 +42,31 @@ sidebar_label: erlang-server ## RESERVED WORDS -
                                                                                                                                                • bsr
                                                                                                                                                • -
                                                                                                                                                • orelse
                                                                                                                                                • -
                                                                                                                                                • bor
                                                                                                                                                • -
                                                                                                                                                • cond
                                                                                                                                                • -
                                                                                                                                                • when
                                                                                                                                                • -
                                                                                                                                                • div
                                                                                                                                                • -
                                                                                                                                                • not
                                                                                                                                                • +
                                                                                                                                                  • after
                                                                                                                                                  • and
                                                                                                                                                  • -
                                                                                                                                                  • bxor
                                                                                                                                                  • -
                                                                                                                                                  • of
                                                                                                                                                  • -
                                                                                                                                                  • end
                                                                                                                                                  • -
                                                                                                                                                  • let
                                                                                                                                                  • -
                                                                                                                                                  • xor
                                                                                                                                                  • -
                                                                                                                                                  • after
                                                                                                                                                  • -
                                                                                                                                                  • band
                                                                                                                                                  • -
                                                                                                                                                  • catch
                                                                                                                                                  • -
                                                                                                                                                  • rem
                                                                                                                                                  • -
                                                                                                                                                  • if
                                                                                                                                                  • -
                                                                                                                                                  • case
                                                                                                                                                  • -
                                                                                                                                                  • bnot
                                                                                                                                                  • -
                                                                                                                                                  • receive
                                                                                                                                                  • -
                                                                                                                                                  • or
                                                                                                                                                  • -
                                                                                                                                                  • bsl
                                                                                                                                                  • -
                                                                                                                                                  • try
                                                                                                                                                  • -
                                                                                                                                                  • begin
                                                                                                                                                  • andalso
                                                                                                                                                  • +
                                                                                                                                                  • band
                                                                                                                                                  • +
                                                                                                                                                  • begin
                                                                                                                                                  • +
                                                                                                                                                  • bnot
                                                                                                                                                  • +
                                                                                                                                                  • bor
                                                                                                                                                  • +
                                                                                                                                                  • bsl
                                                                                                                                                  • +
                                                                                                                                                  • bsr
                                                                                                                                                  • +
                                                                                                                                                  • bxor
                                                                                                                                                  • +
                                                                                                                                                  • case
                                                                                                                                                  • +
                                                                                                                                                  • catch
                                                                                                                                                  • +
                                                                                                                                                  • cond
                                                                                                                                                  • +
                                                                                                                                                  • div
                                                                                                                                                  • +
                                                                                                                                                  • end
                                                                                                                                                  • fun
                                                                                                                                                  • +
                                                                                                                                                  • if
                                                                                                                                                  • +
                                                                                                                                                  • let
                                                                                                                                                  • +
                                                                                                                                                  • not
                                                                                                                                                  • +
                                                                                                                                                  • of
                                                                                                                                                  • +
                                                                                                                                                  • or
                                                                                                                                                  • +
                                                                                                                                                  • orelse
                                                                                                                                                  • +
                                                                                                                                                  • receive
                                                                                                                                                  • +
                                                                                                                                                  • rem
                                                                                                                                                  • +
                                                                                                                                                  • try
                                                                                                                                                  • +
                                                                                                                                                  • when
                                                                                                                                                  • +
                                                                                                                                                  • xor
                                                                                                                                                  diff --git a/docs/generators/flash.md b/docs/generators/flash.md index aeedd28652..5d6fd829b1 100644 --- a/docs/generators/flash.md +++ b/docs/generators/flash.md @@ -5,9 +5,9 @@ sidebar_label: flash | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|invokerPackage|root package for generated code| |null| |packageName|flash package name (convention: package.name)| |org.openapitools| |packageVersion|flash package version| |1.0.0| -|invokerPackage|root package for generated code| |null| |sourceFolder|source folder for generated code. e.g. flash| |null| ## IMPORT MAPPING @@ -26,44 +26,44 @@ sidebar_label: flash ## LANGUAGE PRIMITIVES
                                                                                                                                                  • Array
                                                                                                                                                  • +
                                                                                                                                                  • Boolean
                                                                                                                                                  • +
                                                                                                                                                  • Date
                                                                                                                                                  • Dictionary
                                                                                                                                                  • Number
                                                                                                                                                  • String
                                                                                                                                                  • -
                                                                                                                                                  • Boolean
                                                                                                                                                  • -
                                                                                                                                                  • Date
                                                                                                                                                  ## RESERVED WORDS -
                                                                                                                                                  • for
                                                                                                                                                  • -
                                                                                                                                                  • lt
                                                                                                                                                  • -
                                                                                                                                                  • onclipevent
                                                                                                                                                  • -
                                                                                                                                                  • do
                                                                                                                                                  • -
                                                                                                                                                  • while
                                                                                                                                                  • -
                                                                                                                                                  • delete
                                                                                                                                                  • -
                                                                                                                                                  • not
                                                                                                                                                  • +
                                                                                                                                                    • add
                                                                                                                                                    • and
                                                                                                                                                    • -
                                                                                                                                                    • continue
                                                                                                                                                    • -
                                                                                                                                                    • else
                                                                                                                                                    • -
                                                                                                                                                    • function
                                                                                                                                                    • -
                                                                                                                                                    • if
                                                                                                                                                    • -
                                                                                                                                                    • ge
                                                                                                                                                    • -
                                                                                                                                                    • typeof
                                                                                                                                                    • -
                                                                                                                                                    • on
                                                                                                                                                    • -
                                                                                                                                                    • add
                                                                                                                                                    • -
                                                                                                                                                    • new
                                                                                                                                                    • -
                                                                                                                                                    • void
                                                                                                                                                    • -
                                                                                                                                                    • or
                                                                                                                                                    • -
                                                                                                                                                    • ifframeloaded
                                                                                                                                                    • break
                                                                                                                                                    • +
                                                                                                                                                    • continue
                                                                                                                                                    • +
                                                                                                                                                    • delete
                                                                                                                                                    • +
                                                                                                                                                    • do
                                                                                                                                                    • +
                                                                                                                                                    • else
                                                                                                                                                    • +
                                                                                                                                                    • eq
                                                                                                                                                    • +
                                                                                                                                                    • for
                                                                                                                                                    • +
                                                                                                                                                    • function
                                                                                                                                                    • +
                                                                                                                                                    • ge
                                                                                                                                                    • +
                                                                                                                                                    • gt
                                                                                                                                                    • +
                                                                                                                                                    • if
                                                                                                                                                    • +
                                                                                                                                                    • ifframeloaded
                                                                                                                                                    • in
                                                                                                                                                    • -
                                                                                                                                                    • var
                                                                                                                                                    • +
                                                                                                                                                    • le
                                                                                                                                                    • +
                                                                                                                                                    • lt
                                                                                                                                                    • +
                                                                                                                                                    • ne
                                                                                                                                                    • +
                                                                                                                                                    • new
                                                                                                                                                    • +
                                                                                                                                                    • not
                                                                                                                                                    • +
                                                                                                                                                    • on
                                                                                                                                                    • +
                                                                                                                                                    • onclipevent
                                                                                                                                                    • +
                                                                                                                                                    • or
                                                                                                                                                    • +
                                                                                                                                                    • return
                                                                                                                                                    • telltarget
                                                                                                                                                    • this
                                                                                                                                                    • -
                                                                                                                                                    • eq
                                                                                                                                                    • -
                                                                                                                                                    • gt
                                                                                                                                                    • +
                                                                                                                                                    • typeof
                                                                                                                                                    • +
                                                                                                                                                    • var
                                                                                                                                                    • +
                                                                                                                                                    • void
                                                                                                                                                    • +
                                                                                                                                                    • while
                                                                                                                                                    • with
                                                                                                                                                    • -
                                                                                                                                                    • ne
                                                                                                                                                    • -
                                                                                                                                                    • le
                                                                                                                                                    • -
                                                                                                                                                    • return
                                                                                                                                                    diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md index c233d81760..389c94b133 100644 --- a/docs/generators/fsharp-functions.md +++ b/docs/generators/fsharp-functions.md @@ -5,19 +5,19 @@ sidebar_label: fsharp-functions | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|licenseUrl|The URL of the license| |http://localhost| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |licenseName|The name of the license| |NoLicense| -|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| +|licenseUrl|The URL of the license| |http://localhost| |packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| -|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| -|packageName|F# module name (convention: Title.Case).| |OpenAPI| -|packageVersion|F# package version.| |1.0.0| +|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| |packageGuid|The GUID that will be associated with the C# project| |null| +|packageName|F# module name (convention: Title.Case).| |OpenAPI| +|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| +|packageVersion|F# package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |OpenAPI/src| ## IMPORT MAPPING @@ -38,150 +38,150 @@ sidebar_label: fsharp-functions ## LANGUAGE PRIMITIVES -
                                                                                                                                                    • Dictionary
                                                                                                                                                    • -
                                                                                                                                                    • string
                                                                                                                                                    • -
                                                                                                                                                    • bool
                                                                                                                                                    • +
                                                                                                                                                      • Collection
                                                                                                                                                      • +
                                                                                                                                                      • DataTimeOffset
                                                                                                                                                      • +
                                                                                                                                                      • DateTime
                                                                                                                                                      • +
                                                                                                                                                      • Dictionary
                                                                                                                                                      • +
                                                                                                                                                      • Double
                                                                                                                                                      • +
                                                                                                                                                      • ICollection
                                                                                                                                                      • +
                                                                                                                                                      • Int32
                                                                                                                                                      • +
                                                                                                                                                      • Int64
                                                                                                                                                      • +
                                                                                                                                                      • List
                                                                                                                                                      • String
                                                                                                                                                      • System.IO.Stream
                                                                                                                                                      • -
                                                                                                                                                      • float
                                                                                                                                                      • -
                                                                                                                                                      • DateTime
                                                                                                                                                      • -
                                                                                                                                                      • int64
                                                                                                                                                      • -
                                                                                                                                                      • Int32
                                                                                                                                                      • -
                                                                                                                                                      • DataTimeOffset
                                                                                                                                                      • +
                                                                                                                                                      • bool
                                                                                                                                                      • +
                                                                                                                                                      • byte[]
                                                                                                                                                      • +
                                                                                                                                                      • char
                                                                                                                                                      • +
                                                                                                                                                      • decimal
                                                                                                                                                      • dict
                                                                                                                                                      • -
                                                                                                                                                      • List
                                                                                                                                                      • -
                                                                                                                                                      • unativeint
                                                                                                                                                      • -
                                                                                                                                                      • uint32
                                                                                                                                                      • -
                                                                                                                                                      • uint16
                                                                                                                                                      • -
                                                                                                                                                      • seq
                                                                                                                                                      • -
                                                                                                                                                      • nativeint
                                                                                                                                                      • double
                                                                                                                                                      • +
                                                                                                                                                      • float
                                                                                                                                                      • float32
                                                                                                                                                      • -
                                                                                                                                                      • list
                                                                                                                                                      • -
                                                                                                                                                      • Double
                                                                                                                                                      • int
                                                                                                                                                      • int16
                                                                                                                                                      • -
                                                                                                                                                      • byte[]
                                                                                                                                                      • -
                                                                                                                                                      • single
                                                                                                                                                      • -
                                                                                                                                                      • Int64
                                                                                                                                                      • +
                                                                                                                                                      • int64
                                                                                                                                                      • +
                                                                                                                                                      • list
                                                                                                                                                      • +
                                                                                                                                                      • nativeint
                                                                                                                                                      • obj
                                                                                                                                                      • -
                                                                                                                                                      • char
                                                                                                                                                      • -
                                                                                                                                                      • ICollection
                                                                                                                                                      • -
                                                                                                                                                      • Collection
                                                                                                                                                      • +
                                                                                                                                                      • seq
                                                                                                                                                      • +
                                                                                                                                                      • single
                                                                                                                                                      • +
                                                                                                                                                      • string
                                                                                                                                                      • +
                                                                                                                                                      • uint16
                                                                                                                                                      • +
                                                                                                                                                      • uint32
                                                                                                                                                      • uint64
                                                                                                                                                      • -
                                                                                                                                                      • decimal
                                                                                                                                                      • +
                                                                                                                                                      • unativeint
                                                                                                                                                      ## RESERVED WORDS -
                                                                                                                                                      • exception
                                                                                                                                                      • -
                                                                                                                                                      • struct
                                                                                                                                                      • -
                                                                                                                                                      • select
                                                                                                                                                      • -
                                                                                                                                                      • type
                                                                                                                                                      • -
                                                                                                                                                      • when
                                                                                                                                                      • -
                                                                                                                                                      • localVarQueryParams
                                                                                                                                                      • -
                                                                                                                                                      • else
                                                                                                                                                      • -
                                                                                                                                                      • mutable
                                                                                                                                                      • -
                                                                                                                                                      • lock
                                                                                                                                                      • -
                                                                                                                                                      • let
                                                                                                                                                      • -
                                                                                                                                                      • localVarPathParams
                                                                                                                                                      • -
                                                                                                                                                      • catch
                                                                                                                                                      • -
                                                                                                                                                      • if
                                                                                                                                                      • -
                                                                                                                                                      • case
                                                                                                                                                      • -
                                                                                                                                                      • val
                                                                                                                                                      • -
                                                                                                                                                      • localVarHttpHeaderAccepts
                                                                                                                                                      • -
                                                                                                                                                      • localVarPostBody
                                                                                                                                                      • -
                                                                                                                                                      • in
                                                                                                                                                      • -
                                                                                                                                                      • byte
                                                                                                                                                      • -
                                                                                                                                                      • double
                                                                                                                                                      • -
                                                                                                                                                      • module
                                                                                                                                                      • -
                                                                                                                                                      • is
                                                                                                                                                      • -
                                                                                                                                                      • elif
                                                                                                                                                      • -
                                                                                                                                                      • then
                                                                                                                                                      • -
                                                                                                                                                      • params
                                                                                                                                                      • -
                                                                                                                                                      • enum
                                                                                                                                                      • -
                                                                                                                                                      • explicit
                                                                                                                                                      • -
                                                                                                                                                      • as
                                                                                                                                                      • -
                                                                                                                                                      • begin
                                                                                                                                                      • -
                                                                                                                                                      • internal
                                                                                                                                                      • -
                                                                                                                                                      • yield!
                                                                                                                                                      • -
                                                                                                                                                      • lazy
                                                                                                                                                      • -
                                                                                                                                                      • localVarHttpHeaderAccept
                                                                                                                                                      • -
                                                                                                                                                      • use!
                                                                                                                                                      • -
                                                                                                                                                      • delegate
                                                                                                                                                      • -
                                                                                                                                                      • default
                                                                                                                                                      • -
                                                                                                                                                      • localVarHttpContentTypes
                                                                                                                                                      • -
                                                                                                                                                      • localVarHttpContentType
                                                                                                                                                      • -
                                                                                                                                                      • let!
                                                                                                                                                      • -
                                                                                                                                                      • assert
                                                                                                                                                      • -
                                                                                                                                                      • yield
                                                                                                                                                      • -
                                                                                                                                                      • member
                                                                                                                                                      • -
                                                                                                                                                      • override
                                                                                                                                                      • -
                                                                                                                                                      • event
                                                                                                                                                      • -
                                                                                                                                                      • break
                                                                                                                                                      • -
                                                                                                                                                      • downto
                                                                                                                                                      • -
                                                                                                                                                      • abstract
                                                                                                                                                      • -
                                                                                                                                                      • match!
                                                                                                                                                      • -
                                                                                                                                                      • char
                                                                                                                                                      • -
                                                                                                                                                      • localVarFileParams
                                                                                                                                                      • -
                                                                                                                                                      • to
                                                                                                                                                      • -
                                                                                                                                                      • fun
                                                                                                                                                      • -
                                                                                                                                                      • open
                                                                                                                                                      • -
                                                                                                                                                      • return
                                                                                                                                                      • -
                                                                                                                                                      • use
                                                                                                                                                      • -
                                                                                                                                                      • return!
                                                                                                                                                      • -
                                                                                                                                                      • extern
                                                                                                                                                      • -
                                                                                                                                                      • do
                                                                                                                                                      • -
                                                                                                                                                      • float
                                                                                                                                                      • -
                                                                                                                                                      • while
                                                                                                                                                      • -
                                                                                                                                                      • rec
                                                                                                                                                      • -
                                                                                                                                                      • continue
                                                                                                                                                      • -
                                                                                                                                                      • function
                                                                                                                                                      • -
                                                                                                                                                      • raise
                                                                                                                                                      • -
                                                                                                                                                      • checked
                                                                                                                                                      • -
                                                                                                                                                      • dynamic
                                                                                                                                                      • -
                                                                                                                                                      • new
                                                                                                                                                      • -
                                                                                                                                                      • static
                                                                                                                                                      • -
                                                                                                                                                      • void
                                                                                                                                                      • -
                                                                                                                                                      • upcast
                                                                                                                                                      • -
                                                                                                                                                      • localVarResponse
                                                                                                                                                      • -
                                                                                                                                                      • sealed
                                                                                                                                                      • -
                                                                                                                                                      • finally
                                                                                                                                                      • -
                                                                                                                                                      • done
                                                                                                                                                      • -
                                                                                                                                                      • null
                                                                                                                                                      • -
                                                                                                                                                      • localVarPath
                                                                                                                                                      • -
                                                                                                                                                      • true
                                                                                                                                                      • -
                                                                                                                                                      • fixed
                                                                                                                                                      • -
                                                                                                                                                      • try
                                                                                                                                                      • -
                                                                                                                                                      • decimal
                                                                                                                                                      • -
                                                                                                                                                      • option
                                                                                                                                                      • -
                                                                                                                                                      • private
                                                                                                                                                      • -
                                                                                                                                                      • bool
                                                                                                                                                      • -
                                                                                                                                                      • const
                                                                                                                                                      • -
                                                                                                                                                      • string
                                                                                                                                                      • -
                                                                                                                                                      • for
                                                                                                                                                      • -
                                                                                                                                                      • interface
                                                                                                                                                      • -
                                                                                                                                                      • foreach
                                                                                                                                                      • -
                                                                                                                                                      • not
                                                                                                                                                      • -
                                                                                                                                                      • public
                                                                                                                                                      • -
                                                                                                                                                      • localVarStatusCode
                                                                                                                                                      • +
                                                                                                                                                        • abstract
                                                                                                                                                        • and
                                                                                                                                                        • -
                                                                                                                                                        • of
                                                                                                                                                        • -
                                                                                                                                                        • await
                                                                                                                                                        • -
                                                                                                                                                        • end
                                                                                                                                                        • -
                                                                                                                                                        • class
                                                                                                                                                        • -
                                                                                                                                                        • localVarFormParams
                                                                                                                                                        • -
                                                                                                                                                        • or
                                                                                                                                                        • -
                                                                                                                                                        • false
                                                                                                                                                        • -
                                                                                                                                                        • match
                                                                                                                                                        • -
                                                                                                                                                        • volatile
                                                                                                                                                        • -
                                                                                                                                                        • int
                                                                                                                                                        • +
                                                                                                                                                        • as
                                                                                                                                                        • +
                                                                                                                                                        • assert
                                                                                                                                                        • async
                                                                                                                                                        • -
                                                                                                                                                        • with
                                                                                                                                                        • -
                                                                                                                                                        • localVarHeaderParams
                                                                                                                                                        • -
                                                                                                                                                        • inline
                                                                                                                                                        • -
                                                                                                                                                        • downcast
                                                                                                                                                        • -
                                                                                                                                                        • inherit
                                                                                                                                                        • -
                                                                                                                                                        • namespace
                                                                                                                                                        • +
                                                                                                                                                        • await
                                                                                                                                                        • base
                                                                                                                                                        • +
                                                                                                                                                        • begin
                                                                                                                                                        • +
                                                                                                                                                        • bool
                                                                                                                                                        • +
                                                                                                                                                        • break
                                                                                                                                                        • +
                                                                                                                                                        • byte
                                                                                                                                                        • +
                                                                                                                                                        • case
                                                                                                                                                        • +
                                                                                                                                                        • catch
                                                                                                                                                        • +
                                                                                                                                                        • char
                                                                                                                                                        • +
                                                                                                                                                        • checked
                                                                                                                                                        • +
                                                                                                                                                        • class
                                                                                                                                                        • +
                                                                                                                                                        • const
                                                                                                                                                        • +
                                                                                                                                                        • continue
                                                                                                                                                        • +
                                                                                                                                                        • decimal
                                                                                                                                                        • +
                                                                                                                                                        • default
                                                                                                                                                        • +
                                                                                                                                                        • delegate
                                                                                                                                                        • +
                                                                                                                                                        • do
                                                                                                                                                        • +
                                                                                                                                                        • done
                                                                                                                                                        • +
                                                                                                                                                        • double
                                                                                                                                                        • +
                                                                                                                                                        • downcast
                                                                                                                                                        • +
                                                                                                                                                        • downto
                                                                                                                                                        • +
                                                                                                                                                        • dynamic
                                                                                                                                                        • +
                                                                                                                                                        • elif
                                                                                                                                                        • +
                                                                                                                                                        • else
                                                                                                                                                        • +
                                                                                                                                                        • end
                                                                                                                                                        • +
                                                                                                                                                        • enum
                                                                                                                                                        • +
                                                                                                                                                        • event
                                                                                                                                                        • +
                                                                                                                                                        • exception
                                                                                                                                                        • +
                                                                                                                                                        • explicit
                                                                                                                                                        • +
                                                                                                                                                        • extern
                                                                                                                                                        • +
                                                                                                                                                        • false
                                                                                                                                                        • +
                                                                                                                                                        • finally
                                                                                                                                                        • +
                                                                                                                                                        • fixed
                                                                                                                                                        • +
                                                                                                                                                        • float
                                                                                                                                                        • +
                                                                                                                                                        • for
                                                                                                                                                        • +
                                                                                                                                                        • foreach
                                                                                                                                                        • +
                                                                                                                                                        • fun
                                                                                                                                                        • +
                                                                                                                                                        • function
                                                                                                                                                        • +
                                                                                                                                                        • if
                                                                                                                                                        • +
                                                                                                                                                        • in
                                                                                                                                                        • +
                                                                                                                                                        • inherit
                                                                                                                                                        • +
                                                                                                                                                        • inline
                                                                                                                                                        • +
                                                                                                                                                        • int
                                                                                                                                                        • +
                                                                                                                                                        • interface
                                                                                                                                                        • +
                                                                                                                                                        • internal
                                                                                                                                                        • +
                                                                                                                                                        • is
                                                                                                                                                        • +
                                                                                                                                                        • lazy
                                                                                                                                                        • +
                                                                                                                                                        • let
                                                                                                                                                        • +
                                                                                                                                                        • let!
                                                                                                                                                        • +
                                                                                                                                                        • localVarFileParams
                                                                                                                                                        • +
                                                                                                                                                        • localVarFormParams
                                                                                                                                                        • +
                                                                                                                                                        • localVarHeaderParams
                                                                                                                                                        • +
                                                                                                                                                        • localVarHttpContentType
                                                                                                                                                        • +
                                                                                                                                                        • localVarHttpContentTypes
                                                                                                                                                        • +
                                                                                                                                                        • localVarHttpHeaderAccept
                                                                                                                                                        • +
                                                                                                                                                        • localVarHttpHeaderAccepts
                                                                                                                                                        • +
                                                                                                                                                        • localVarPath
                                                                                                                                                        • +
                                                                                                                                                        • localVarPathParams
                                                                                                                                                        • +
                                                                                                                                                        • localVarPostBody
                                                                                                                                                        • +
                                                                                                                                                        • localVarQueryParams
                                                                                                                                                        • +
                                                                                                                                                        • localVarResponse
                                                                                                                                                        • +
                                                                                                                                                        • localVarStatusCode
                                                                                                                                                        • +
                                                                                                                                                        • lock
                                                                                                                                                        • +
                                                                                                                                                        • match
                                                                                                                                                        • +
                                                                                                                                                        • match!
                                                                                                                                                        • +
                                                                                                                                                        • member
                                                                                                                                                        • +
                                                                                                                                                        • module
                                                                                                                                                        • +
                                                                                                                                                        • mutable
                                                                                                                                                        • +
                                                                                                                                                        • namespace
                                                                                                                                                        • +
                                                                                                                                                        • new
                                                                                                                                                        • +
                                                                                                                                                        • not
                                                                                                                                                        • +
                                                                                                                                                        • null
                                                                                                                                                        • +
                                                                                                                                                        • of
                                                                                                                                                        • +
                                                                                                                                                        • open
                                                                                                                                                        • +
                                                                                                                                                        • option
                                                                                                                                                        • +
                                                                                                                                                        • or
                                                                                                                                                        • +
                                                                                                                                                        • override
                                                                                                                                                        • +
                                                                                                                                                        • params
                                                                                                                                                        • +
                                                                                                                                                        • private
                                                                                                                                                        • +
                                                                                                                                                        • public
                                                                                                                                                        • +
                                                                                                                                                        • raise
                                                                                                                                                        • +
                                                                                                                                                        • rec
                                                                                                                                                        • +
                                                                                                                                                        • return
                                                                                                                                                        • +
                                                                                                                                                        • return!
                                                                                                                                                        • +
                                                                                                                                                        • sealed
                                                                                                                                                        • +
                                                                                                                                                        • select
                                                                                                                                                        • +
                                                                                                                                                        • static
                                                                                                                                                        • +
                                                                                                                                                        • string
                                                                                                                                                        • +
                                                                                                                                                        • struct
                                                                                                                                                        • +
                                                                                                                                                        • then
                                                                                                                                                        • +
                                                                                                                                                        • to
                                                                                                                                                        • +
                                                                                                                                                        • true
                                                                                                                                                        • +
                                                                                                                                                        • try
                                                                                                                                                        • +
                                                                                                                                                        • type
                                                                                                                                                        • +
                                                                                                                                                        • upcast
                                                                                                                                                        • +
                                                                                                                                                        • use
                                                                                                                                                        • +
                                                                                                                                                        • use!
                                                                                                                                                        • +
                                                                                                                                                        • val
                                                                                                                                                        • +
                                                                                                                                                        • void
                                                                                                                                                        • +
                                                                                                                                                        • volatile
                                                                                                                                                        • +
                                                                                                                                                        • when
                                                                                                                                                        • +
                                                                                                                                                        • while
                                                                                                                                                        • +
                                                                                                                                                        • with
                                                                                                                                                        • +
                                                                                                                                                        • yield
                                                                                                                                                        • +
                                                                                                                                                        • yield!
                                                                                                                                                        diff --git a/docs/generators/fsharp-giraffe-server.md b/docs/generators/fsharp-giraffe-server.md index f042e6b9ef..d05383c75d 100644 --- a/docs/generators/fsharp-giraffe-server.md +++ b/docs/generators/fsharp-giraffe-server.md @@ -5,22 +5,22 @@ sidebar_label: fsharp-giraffe-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|licenseUrl|The URL of the license| |http://localhost| -|licenseName|The name of the license| |NoLicense| -|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| -|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| -|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| -|packageName|F# module name (convention: Title.Case).| |OpenAPI| -|packageVersion|F# package version.| |1.0.0| -|packageGuid|The GUID that will be associated with the C# project| |null| -|sourceFolder|source folder for generated code| |OpenAPI/src| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false| -|generateBody|Generates method body.| |true| |buildTarget|Target the build for a program or library.| |program| +|generateBody|Generates method body.| |true| +|licenseName|The name of the license| |NoLicense| +|licenseUrl|The URL of the license| |http://localhost| +|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| +|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| +|packageGuid|The GUID that will be associated with the C# project| |null| +|packageName|F# module name (convention: Title.Case).| |OpenAPI| +|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| +|packageVersion|F# package version.| |1.0.0| +|returnICollection|Return ICollection<T> instead of the concrete type.| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |OpenAPI/src| +|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| +|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| +|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false| ## IMPORT MAPPING @@ -40,150 +40,150 @@ sidebar_label: fsharp-giraffe-server ## LANGUAGE PRIMITIVES -
                                                                                                                                                        • Dictionary
                                                                                                                                                        • -
                                                                                                                                                        • string
                                                                                                                                                        • -
                                                                                                                                                        • bool
                                                                                                                                                        • +
                                                                                                                                                          • Collection
                                                                                                                                                          • +
                                                                                                                                                          • DataTimeOffset
                                                                                                                                                          • +
                                                                                                                                                          • DateTime
                                                                                                                                                          • +
                                                                                                                                                          • Dictionary
                                                                                                                                                          • +
                                                                                                                                                          • Double
                                                                                                                                                          • +
                                                                                                                                                          • ICollection
                                                                                                                                                          • +
                                                                                                                                                          • Int32
                                                                                                                                                          • +
                                                                                                                                                          • Int64
                                                                                                                                                          • +
                                                                                                                                                          • List
                                                                                                                                                          • String
                                                                                                                                                          • System.IO.Stream
                                                                                                                                                          • -
                                                                                                                                                          • float
                                                                                                                                                          • -
                                                                                                                                                          • DateTime
                                                                                                                                                          • -
                                                                                                                                                          • int64
                                                                                                                                                          • -
                                                                                                                                                          • Int32
                                                                                                                                                          • -
                                                                                                                                                          • DataTimeOffset
                                                                                                                                                          • +
                                                                                                                                                          • bool
                                                                                                                                                          • +
                                                                                                                                                          • byte[]
                                                                                                                                                          • +
                                                                                                                                                          • char
                                                                                                                                                          • +
                                                                                                                                                          • decimal
                                                                                                                                                          • dict
                                                                                                                                                          • -
                                                                                                                                                          • List
                                                                                                                                                          • -
                                                                                                                                                          • unativeint
                                                                                                                                                          • -
                                                                                                                                                          • uint32
                                                                                                                                                          • -
                                                                                                                                                          • uint16
                                                                                                                                                          • -
                                                                                                                                                          • seq
                                                                                                                                                          • -
                                                                                                                                                          • nativeint
                                                                                                                                                          • double
                                                                                                                                                          • +
                                                                                                                                                          • float
                                                                                                                                                          • float32
                                                                                                                                                          • -
                                                                                                                                                          • list
                                                                                                                                                          • -
                                                                                                                                                          • Double
                                                                                                                                                          • int
                                                                                                                                                          • int16
                                                                                                                                                          • -
                                                                                                                                                          • byte[]
                                                                                                                                                          • -
                                                                                                                                                          • single
                                                                                                                                                          • -
                                                                                                                                                          • Int64
                                                                                                                                                          • +
                                                                                                                                                          • int64
                                                                                                                                                          • +
                                                                                                                                                          • list
                                                                                                                                                          • +
                                                                                                                                                          • nativeint
                                                                                                                                                          • obj
                                                                                                                                                          • -
                                                                                                                                                          • char
                                                                                                                                                          • -
                                                                                                                                                          • ICollection
                                                                                                                                                          • -
                                                                                                                                                          • Collection
                                                                                                                                                          • +
                                                                                                                                                          • seq
                                                                                                                                                          • +
                                                                                                                                                          • single
                                                                                                                                                          • +
                                                                                                                                                          • string
                                                                                                                                                          • +
                                                                                                                                                          • uint16
                                                                                                                                                          • +
                                                                                                                                                          • uint32
                                                                                                                                                          • uint64
                                                                                                                                                          • -
                                                                                                                                                          • decimal
                                                                                                                                                          • +
                                                                                                                                                          • unativeint
                                                                                                                                                          ## RESERVED WORDS -
                                                                                                                                                          • exception
                                                                                                                                                          • -
                                                                                                                                                          • struct
                                                                                                                                                          • -
                                                                                                                                                          • select
                                                                                                                                                          • -
                                                                                                                                                          • type
                                                                                                                                                          • -
                                                                                                                                                          • when
                                                                                                                                                          • -
                                                                                                                                                          • localVarQueryParams
                                                                                                                                                          • -
                                                                                                                                                          • else
                                                                                                                                                          • -
                                                                                                                                                          • mutable
                                                                                                                                                          • -
                                                                                                                                                          • lock
                                                                                                                                                          • -
                                                                                                                                                          • let
                                                                                                                                                          • -
                                                                                                                                                          • localVarPathParams
                                                                                                                                                          • -
                                                                                                                                                          • catch
                                                                                                                                                          • -
                                                                                                                                                          • if
                                                                                                                                                          • -
                                                                                                                                                          • case
                                                                                                                                                          • -
                                                                                                                                                          • val
                                                                                                                                                          • -
                                                                                                                                                          • localVarHttpHeaderAccepts
                                                                                                                                                          • -
                                                                                                                                                          • localVarPostBody
                                                                                                                                                          • -
                                                                                                                                                          • in
                                                                                                                                                          • -
                                                                                                                                                          • byte
                                                                                                                                                          • -
                                                                                                                                                          • double
                                                                                                                                                          • -
                                                                                                                                                          • module
                                                                                                                                                          • -
                                                                                                                                                          • is
                                                                                                                                                          • -
                                                                                                                                                          • elif
                                                                                                                                                          • -
                                                                                                                                                          • then
                                                                                                                                                          • -
                                                                                                                                                          • params
                                                                                                                                                          • -
                                                                                                                                                          • enum
                                                                                                                                                          • -
                                                                                                                                                          • explicit
                                                                                                                                                          • -
                                                                                                                                                          • as
                                                                                                                                                          • -
                                                                                                                                                          • begin
                                                                                                                                                          • -
                                                                                                                                                          • internal
                                                                                                                                                          • -
                                                                                                                                                          • yield!
                                                                                                                                                          • -
                                                                                                                                                          • lazy
                                                                                                                                                          • -
                                                                                                                                                          • localVarHttpHeaderAccept
                                                                                                                                                          • -
                                                                                                                                                          • use!
                                                                                                                                                          • -
                                                                                                                                                          • delegate
                                                                                                                                                          • -
                                                                                                                                                          • default
                                                                                                                                                          • -
                                                                                                                                                          • localVarHttpContentTypes
                                                                                                                                                          • -
                                                                                                                                                          • localVarHttpContentType
                                                                                                                                                          • -
                                                                                                                                                          • let!
                                                                                                                                                          • -
                                                                                                                                                          • assert
                                                                                                                                                          • -
                                                                                                                                                          • yield
                                                                                                                                                          • -
                                                                                                                                                          • member
                                                                                                                                                          • -
                                                                                                                                                          • override
                                                                                                                                                          • -
                                                                                                                                                          • event
                                                                                                                                                          • -
                                                                                                                                                          • break
                                                                                                                                                          • -
                                                                                                                                                          • downto
                                                                                                                                                          • -
                                                                                                                                                          • abstract
                                                                                                                                                          • -
                                                                                                                                                          • match!
                                                                                                                                                          • -
                                                                                                                                                          • char
                                                                                                                                                          • -
                                                                                                                                                          • localVarFileParams
                                                                                                                                                          • -
                                                                                                                                                          • to
                                                                                                                                                          • -
                                                                                                                                                          • fun
                                                                                                                                                          • -
                                                                                                                                                          • open
                                                                                                                                                          • -
                                                                                                                                                          • return
                                                                                                                                                          • -
                                                                                                                                                          • use
                                                                                                                                                          • -
                                                                                                                                                          • return!
                                                                                                                                                          • -
                                                                                                                                                          • extern
                                                                                                                                                          • -
                                                                                                                                                          • do
                                                                                                                                                          • -
                                                                                                                                                          • float
                                                                                                                                                          • -
                                                                                                                                                          • while
                                                                                                                                                          • -
                                                                                                                                                          • rec
                                                                                                                                                          • -
                                                                                                                                                          • continue
                                                                                                                                                          • -
                                                                                                                                                          • function
                                                                                                                                                          • -
                                                                                                                                                          • raise
                                                                                                                                                          • -
                                                                                                                                                          • checked
                                                                                                                                                          • -
                                                                                                                                                          • dynamic
                                                                                                                                                          • -
                                                                                                                                                          • new
                                                                                                                                                          • -
                                                                                                                                                          • static
                                                                                                                                                          • -
                                                                                                                                                          • void
                                                                                                                                                          • -
                                                                                                                                                          • upcast
                                                                                                                                                          • -
                                                                                                                                                          • localVarResponse
                                                                                                                                                          • -
                                                                                                                                                          • sealed
                                                                                                                                                          • -
                                                                                                                                                          • finally
                                                                                                                                                          • -
                                                                                                                                                          • done
                                                                                                                                                          • -
                                                                                                                                                          • null
                                                                                                                                                          • -
                                                                                                                                                          • localVarPath
                                                                                                                                                          • -
                                                                                                                                                          • true
                                                                                                                                                          • -
                                                                                                                                                          • fixed
                                                                                                                                                          • -
                                                                                                                                                          • try
                                                                                                                                                          • -
                                                                                                                                                          • decimal
                                                                                                                                                          • -
                                                                                                                                                          • option
                                                                                                                                                          • -
                                                                                                                                                          • private
                                                                                                                                                          • -
                                                                                                                                                          • bool
                                                                                                                                                          • -
                                                                                                                                                          • const
                                                                                                                                                          • -
                                                                                                                                                          • string
                                                                                                                                                          • -
                                                                                                                                                          • for
                                                                                                                                                          • -
                                                                                                                                                          • interface
                                                                                                                                                          • -
                                                                                                                                                          • foreach
                                                                                                                                                          • -
                                                                                                                                                          • not
                                                                                                                                                          • -
                                                                                                                                                          • public
                                                                                                                                                          • -
                                                                                                                                                          • localVarStatusCode
                                                                                                                                                          • +
                                                                                                                                                            • abstract
                                                                                                                                                            • and
                                                                                                                                                            • -
                                                                                                                                                            • of
                                                                                                                                                            • -
                                                                                                                                                            • await
                                                                                                                                                            • -
                                                                                                                                                            • end
                                                                                                                                                            • -
                                                                                                                                                            • class
                                                                                                                                                            • -
                                                                                                                                                            • localVarFormParams
                                                                                                                                                            • -
                                                                                                                                                            • or
                                                                                                                                                            • -
                                                                                                                                                            • false
                                                                                                                                                            • -
                                                                                                                                                            • match
                                                                                                                                                            • -
                                                                                                                                                            • volatile
                                                                                                                                                            • -
                                                                                                                                                            • int
                                                                                                                                                            • +
                                                                                                                                                            • as
                                                                                                                                                            • +
                                                                                                                                                            • assert
                                                                                                                                                            • async
                                                                                                                                                            • -
                                                                                                                                                            • with
                                                                                                                                                            • -
                                                                                                                                                            • localVarHeaderParams
                                                                                                                                                            • -
                                                                                                                                                            • inline
                                                                                                                                                            • -
                                                                                                                                                            • downcast
                                                                                                                                                            • -
                                                                                                                                                            • inherit
                                                                                                                                                            • -
                                                                                                                                                            • namespace
                                                                                                                                                            • +
                                                                                                                                                            • await
                                                                                                                                                            • base
                                                                                                                                                            • +
                                                                                                                                                            • begin
                                                                                                                                                            • +
                                                                                                                                                            • bool
                                                                                                                                                            • +
                                                                                                                                                            • break
                                                                                                                                                            • +
                                                                                                                                                            • byte
                                                                                                                                                            • +
                                                                                                                                                            • case
                                                                                                                                                            • +
                                                                                                                                                            • catch
                                                                                                                                                            • +
                                                                                                                                                            • char
                                                                                                                                                            • +
                                                                                                                                                            • checked
                                                                                                                                                            • +
                                                                                                                                                            • class
                                                                                                                                                            • +
                                                                                                                                                            • const
                                                                                                                                                            • +
                                                                                                                                                            • continue
                                                                                                                                                            • +
                                                                                                                                                            • decimal
                                                                                                                                                            • +
                                                                                                                                                            • default
                                                                                                                                                            • +
                                                                                                                                                            • delegate
                                                                                                                                                            • +
                                                                                                                                                            • do
                                                                                                                                                            • +
                                                                                                                                                            • done
                                                                                                                                                            • +
                                                                                                                                                            • double
                                                                                                                                                            • +
                                                                                                                                                            • downcast
                                                                                                                                                            • +
                                                                                                                                                            • downto
                                                                                                                                                            • +
                                                                                                                                                            • dynamic
                                                                                                                                                            • +
                                                                                                                                                            • elif
                                                                                                                                                            • +
                                                                                                                                                            • else
                                                                                                                                                            • +
                                                                                                                                                            • end
                                                                                                                                                            • +
                                                                                                                                                            • enum
                                                                                                                                                            • +
                                                                                                                                                            • event
                                                                                                                                                            • +
                                                                                                                                                            • exception
                                                                                                                                                            • +
                                                                                                                                                            • explicit
                                                                                                                                                            • +
                                                                                                                                                            • extern
                                                                                                                                                            • +
                                                                                                                                                            • false
                                                                                                                                                            • +
                                                                                                                                                            • finally
                                                                                                                                                            • +
                                                                                                                                                            • fixed
                                                                                                                                                            • +
                                                                                                                                                            • float
                                                                                                                                                            • +
                                                                                                                                                            • for
                                                                                                                                                            • +
                                                                                                                                                            • foreach
                                                                                                                                                            • +
                                                                                                                                                            • fun
                                                                                                                                                            • +
                                                                                                                                                            • function
                                                                                                                                                            • +
                                                                                                                                                            • if
                                                                                                                                                            • +
                                                                                                                                                            • in
                                                                                                                                                            • +
                                                                                                                                                            • inherit
                                                                                                                                                            • +
                                                                                                                                                            • inline
                                                                                                                                                            • +
                                                                                                                                                            • int
                                                                                                                                                            • +
                                                                                                                                                            • interface
                                                                                                                                                            • +
                                                                                                                                                            • internal
                                                                                                                                                            • +
                                                                                                                                                            • is
                                                                                                                                                            • +
                                                                                                                                                            • lazy
                                                                                                                                                            • +
                                                                                                                                                            • let
                                                                                                                                                            • +
                                                                                                                                                            • let!
                                                                                                                                                            • +
                                                                                                                                                            • localVarFileParams
                                                                                                                                                            • +
                                                                                                                                                            • localVarFormParams
                                                                                                                                                            • +
                                                                                                                                                            • localVarHeaderParams
                                                                                                                                                            • +
                                                                                                                                                            • localVarHttpContentType
                                                                                                                                                            • +
                                                                                                                                                            • localVarHttpContentTypes
                                                                                                                                                            • +
                                                                                                                                                            • localVarHttpHeaderAccept
                                                                                                                                                            • +
                                                                                                                                                            • localVarHttpHeaderAccepts
                                                                                                                                                            • +
                                                                                                                                                            • localVarPath
                                                                                                                                                            • +
                                                                                                                                                            • localVarPathParams
                                                                                                                                                            • +
                                                                                                                                                            • localVarPostBody
                                                                                                                                                            • +
                                                                                                                                                            • localVarQueryParams
                                                                                                                                                            • +
                                                                                                                                                            • localVarResponse
                                                                                                                                                            • +
                                                                                                                                                            • localVarStatusCode
                                                                                                                                                            • +
                                                                                                                                                            • lock
                                                                                                                                                            • +
                                                                                                                                                            • match
                                                                                                                                                            • +
                                                                                                                                                            • match!
                                                                                                                                                            • +
                                                                                                                                                            • member
                                                                                                                                                            • +
                                                                                                                                                            • module
                                                                                                                                                            • +
                                                                                                                                                            • mutable
                                                                                                                                                            • +
                                                                                                                                                            • namespace
                                                                                                                                                            • +
                                                                                                                                                            • new
                                                                                                                                                            • +
                                                                                                                                                            • not
                                                                                                                                                            • +
                                                                                                                                                            • null
                                                                                                                                                            • +
                                                                                                                                                            • of
                                                                                                                                                            • +
                                                                                                                                                            • open
                                                                                                                                                            • +
                                                                                                                                                            • option
                                                                                                                                                            • +
                                                                                                                                                            • or
                                                                                                                                                            • +
                                                                                                                                                            • override
                                                                                                                                                            • +
                                                                                                                                                            • params
                                                                                                                                                            • +
                                                                                                                                                            • private
                                                                                                                                                            • +
                                                                                                                                                            • public
                                                                                                                                                            • +
                                                                                                                                                            • raise
                                                                                                                                                            • +
                                                                                                                                                            • rec
                                                                                                                                                            • +
                                                                                                                                                            • return
                                                                                                                                                            • +
                                                                                                                                                            • return!
                                                                                                                                                            • +
                                                                                                                                                            • sealed
                                                                                                                                                            • +
                                                                                                                                                            • select
                                                                                                                                                            • +
                                                                                                                                                            • static
                                                                                                                                                            • +
                                                                                                                                                            • string
                                                                                                                                                            • +
                                                                                                                                                            • struct
                                                                                                                                                            • +
                                                                                                                                                            • then
                                                                                                                                                            • +
                                                                                                                                                            • to
                                                                                                                                                            • +
                                                                                                                                                            • true
                                                                                                                                                            • +
                                                                                                                                                            • try
                                                                                                                                                            • +
                                                                                                                                                            • type
                                                                                                                                                            • +
                                                                                                                                                            • upcast
                                                                                                                                                            • +
                                                                                                                                                            • use
                                                                                                                                                            • +
                                                                                                                                                            • use!
                                                                                                                                                            • +
                                                                                                                                                            • val
                                                                                                                                                            • +
                                                                                                                                                            • void
                                                                                                                                                            • +
                                                                                                                                                            • volatile
                                                                                                                                                            • +
                                                                                                                                                            • when
                                                                                                                                                            • +
                                                                                                                                                            • while
                                                                                                                                                            • +
                                                                                                                                                            • with
                                                                                                                                                            • +
                                                                                                                                                            • yield
                                                                                                                                                            • +
                                                                                                                                                            • yield!
                                                                                                                                                            diff --git a/docs/generators/fsharp-giraffe.md b/docs/generators/fsharp-giraffe.md deleted file mode 100644 index 473781b7c5..0000000000 --- a/docs/generators/fsharp-giraffe.md +++ /dev/null @@ -1,25 +0,0 @@ - ---- -id: generator-opts-server-fsharp-giraffe -title: Config Options for fsharp-giraffe -sidebar_label: fsharp-giraffe ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|licenseUrl|The URL of the license| |http://localhost| -|licenseName|The name of the license| |NoLicense| -|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| -|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| -|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| -|packageName|F# module name (convention: Title.Case).| |OpenAPI| -|packageVersion|F# package version.| |1.0.0| -|packageGuid|The GUID that will be associated with the C# project| |null| -|sourceFolder|source folder for generated code| |OpenAPI/src| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |false| -|generateBody|Generates method body.| |true| -|buildTarget|Target the build for a program or library.| |program| diff --git a/docs/generators/go-experimental.md b/docs/generators/go-experimental.md index 15d74272f0..6099220d65 100644 --- a/docs/generators/go-experimental.md +++ b/docs/generators/go-experimental.md @@ -5,16 +5,16 @@ sidebar_label: go-experimental | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Go package name (convention: lowercase).| |openapi| -|packageVersion|Go package version.| |1.0.0| +|enumClassPrefix|Prefix enum with class name| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |isGoSubmodule|whether the generated Go module is a submodule| |false| -|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|enumClassPrefix|Prefix enum with class name| |false| +|packageName|Go package name (convention: lowercase).| |openapi| +|packageVersion|Go package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts| |false| |withAWSV4Signature|whether to include AWS v4 signature support| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING @@ -30,68 +30,68 @@ sidebar_label: go-experimental ## LANGUAGE PRIMITIVES -
                                                                                                                                                            • string
                                                                                                                                                            • -
                                                                                                                                                            • bool
                                                                                                                                                            • +
                                                                                                                                                              • bool
                                                                                                                                                              • byte
                                                                                                                                                              • +
                                                                                                                                                              • complex128
                                                                                                                                                              • +
                                                                                                                                                              • complex64
                                                                                                                                                              • float32
                                                                                                                                                              • float64
                                                                                                                                                              • -
                                                                                                                                                              • uint
                                                                                                                                                              • int
                                                                                                                                                              • -
                                                                                                                                                              • complex64
                                                                                                                                                              • -
                                                                                                                                                              • rune
                                                                                                                                                              • int32
                                                                                                                                                              • int64
                                                                                                                                                              • -
                                                                                                                                                              • complex128
                                                                                                                                                              • -
                                                                                                                                                              • uint64
                                                                                                                                                              • +
                                                                                                                                                              • rune
                                                                                                                                                              • +
                                                                                                                                                              • string
                                                                                                                                                              • +
                                                                                                                                                              • uint
                                                                                                                                                              • uint32
                                                                                                                                                              • +
                                                                                                                                                              • uint64
                                                                                                                                                              ## RESERVED WORDS -
                                                                                                                                                              • struct
                                                                                                                                                              • -
                                                                                                                                                              • defer
                                                                                                                                                              • -
                                                                                                                                                              • select
                                                                                                                                                              • -
                                                                                                                                                              • string
                                                                                                                                                              • -
                                                                                                                                                              • bool
                                                                                                                                                              • -
                                                                                                                                                              • const
                                                                                                                                                              • -
                                                                                                                                                              • import
                                                                                                                                                              • -
                                                                                                                                                              • for
                                                                                                                                                              • -
                                                                                                                                                              • range
                                                                                                                                                              • -
                                                                                                                                                              • float64
                                                                                                                                                              • -
                                                                                                                                                              • interface
                                                                                                                                                              • -
                                                                                                                                                              • type
                                                                                                                                                              • -
                                                                                                                                                              • error
                                                                                                                                                              • -
                                                                                                                                                              • complex64
                                                                                                                                                              • -
                                                                                                                                                              • rune
                                                                                                                                                              • -
                                                                                                                                                              • switch
                                                                                                                                                              • -
                                                                                                                                                              • nil
                                                                                                                                                              • -
                                                                                                                                                              • default
                                                                                                                                                              • -
                                                                                                                                                              • goto
                                                                                                                                                              • -
                                                                                                                                                              • int64
                                                                                                                                                              • -
                                                                                                                                                              • else
                                                                                                                                                              • -
                                                                                                                                                              • continue
                                                                                                                                                              • -
                                                                                                                                                              • int8
                                                                                                                                                              • -
                                                                                                                                                              • uint32
                                                                                                                                                              • -
                                                                                                                                                              • uint16
                                                                                                                                                              • -
                                                                                                                                                              • map
                                                                                                                                                              • -
                                                                                                                                                              • if
                                                                                                                                                              • -
                                                                                                                                                              • case
                                                                                                                                                              • -
                                                                                                                                                              • package
                                                                                                                                                              • +
                                                                                                                                                                • bool
                                                                                                                                                                • break
                                                                                                                                                                • byte
                                                                                                                                                                • -
                                                                                                                                                                • var
                                                                                                                                                                • -
                                                                                                                                                                • go
                                                                                                                                                                • +
                                                                                                                                                                • case
                                                                                                                                                                • +
                                                                                                                                                                • chan
                                                                                                                                                                • +
                                                                                                                                                                • complex128
                                                                                                                                                                • +
                                                                                                                                                                • complex64
                                                                                                                                                                • +
                                                                                                                                                                • const
                                                                                                                                                                • +
                                                                                                                                                                • continue
                                                                                                                                                                • +
                                                                                                                                                                • default
                                                                                                                                                                • +
                                                                                                                                                                • defer
                                                                                                                                                                • +
                                                                                                                                                                • else
                                                                                                                                                                • +
                                                                                                                                                                • error
                                                                                                                                                                • +
                                                                                                                                                                • fallthrough
                                                                                                                                                                • float32
                                                                                                                                                                • -
                                                                                                                                                                • uint
                                                                                                                                                                • +
                                                                                                                                                                • float64
                                                                                                                                                                • +
                                                                                                                                                                • for
                                                                                                                                                                • +
                                                                                                                                                                • func
                                                                                                                                                                • +
                                                                                                                                                                • go
                                                                                                                                                                • +
                                                                                                                                                                • goto
                                                                                                                                                                • +
                                                                                                                                                                • if
                                                                                                                                                                • +
                                                                                                                                                                • import
                                                                                                                                                                • int
                                                                                                                                                                • int16
                                                                                                                                                                • -
                                                                                                                                                                • func
                                                                                                                                                                • int32
                                                                                                                                                                • -
                                                                                                                                                                • complex128
                                                                                                                                                                • +
                                                                                                                                                                • int64
                                                                                                                                                                • +
                                                                                                                                                                • int8
                                                                                                                                                                • +
                                                                                                                                                                • interface
                                                                                                                                                                • +
                                                                                                                                                                • map
                                                                                                                                                                • +
                                                                                                                                                                • nil
                                                                                                                                                                • +
                                                                                                                                                                • package
                                                                                                                                                                • +
                                                                                                                                                                • range
                                                                                                                                                                • +
                                                                                                                                                                • return
                                                                                                                                                                • +
                                                                                                                                                                • rune
                                                                                                                                                                • +
                                                                                                                                                                • select
                                                                                                                                                                • +
                                                                                                                                                                • string
                                                                                                                                                                • +
                                                                                                                                                                • struct
                                                                                                                                                                • +
                                                                                                                                                                • switch
                                                                                                                                                                • +
                                                                                                                                                                • type
                                                                                                                                                                • +
                                                                                                                                                                • uint
                                                                                                                                                                • +
                                                                                                                                                                • uint16
                                                                                                                                                                • +
                                                                                                                                                                • uint32
                                                                                                                                                                • uint64
                                                                                                                                                                • uint8
                                                                                                                                                                • -
                                                                                                                                                                • chan
                                                                                                                                                                • -
                                                                                                                                                                • fallthrough
                                                                                                                                                                • uintptr
                                                                                                                                                                • -
                                                                                                                                                                • return
                                                                                                                                                                • +
                                                                                                                                                                • var
                                                                                                                                                                diff --git a/docs/generators/go-gin-server.md b/docs/generators/go-gin-server.md index fabf59d855..189705f092 100644 --- a/docs/generators/go-gin-server.md +++ b/docs/generators/go-gin-server.md @@ -5,9 +5,9 @@ sidebar_label: go-gin-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|Go package name (convention: lowercase).| |openapi| |packageVersion|Go package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| ## IMPORT MAPPING @@ -23,68 +23,68 @@ sidebar_label: go-gin-server ## LANGUAGE PRIMITIVES -
                                                                                                                                                                • string
                                                                                                                                                                • -
                                                                                                                                                                • bool
                                                                                                                                                                • +
                                                                                                                                                                  • bool
                                                                                                                                                                  • byte
                                                                                                                                                                  • +
                                                                                                                                                                  • complex128
                                                                                                                                                                  • +
                                                                                                                                                                  • complex64
                                                                                                                                                                  • float32
                                                                                                                                                                  • float64
                                                                                                                                                                  • -
                                                                                                                                                                  • uint
                                                                                                                                                                  • int
                                                                                                                                                                  • -
                                                                                                                                                                  • complex64
                                                                                                                                                                  • -
                                                                                                                                                                  • rune
                                                                                                                                                                  • int32
                                                                                                                                                                  • int64
                                                                                                                                                                  • -
                                                                                                                                                                  • complex128
                                                                                                                                                                  • -
                                                                                                                                                                  • uint64
                                                                                                                                                                  • +
                                                                                                                                                                  • rune
                                                                                                                                                                  • +
                                                                                                                                                                  • string
                                                                                                                                                                  • +
                                                                                                                                                                  • uint
                                                                                                                                                                  • uint32
                                                                                                                                                                  • +
                                                                                                                                                                  • uint64
                                                                                                                                                                  ## RESERVED WORDS -
                                                                                                                                                                  • struct
                                                                                                                                                                  • -
                                                                                                                                                                  • defer
                                                                                                                                                                  • -
                                                                                                                                                                  • select
                                                                                                                                                                  • -
                                                                                                                                                                  • string
                                                                                                                                                                  • -
                                                                                                                                                                  • bool
                                                                                                                                                                  • -
                                                                                                                                                                  • const
                                                                                                                                                                  • -
                                                                                                                                                                  • import
                                                                                                                                                                  • -
                                                                                                                                                                  • for
                                                                                                                                                                  • -
                                                                                                                                                                  • range
                                                                                                                                                                  • -
                                                                                                                                                                  • float64
                                                                                                                                                                  • -
                                                                                                                                                                  • interface
                                                                                                                                                                  • -
                                                                                                                                                                  • type
                                                                                                                                                                  • -
                                                                                                                                                                  • error
                                                                                                                                                                  • -
                                                                                                                                                                  • complex64
                                                                                                                                                                  • -
                                                                                                                                                                  • rune
                                                                                                                                                                  • -
                                                                                                                                                                  • switch
                                                                                                                                                                  • -
                                                                                                                                                                  • nil
                                                                                                                                                                  • -
                                                                                                                                                                  • default
                                                                                                                                                                  • -
                                                                                                                                                                  • goto
                                                                                                                                                                  • -
                                                                                                                                                                  • int64
                                                                                                                                                                  • -
                                                                                                                                                                  • else
                                                                                                                                                                  • -
                                                                                                                                                                  • continue
                                                                                                                                                                  • -
                                                                                                                                                                  • int8
                                                                                                                                                                  • -
                                                                                                                                                                  • uint32
                                                                                                                                                                  • -
                                                                                                                                                                  • uint16
                                                                                                                                                                  • -
                                                                                                                                                                  • map
                                                                                                                                                                  • -
                                                                                                                                                                  • if
                                                                                                                                                                  • -
                                                                                                                                                                  • case
                                                                                                                                                                  • -
                                                                                                                                                                  • package
                                                                                                                                                                  • +
                                                                                                                                                                    • bool
                                                                                                                                                                    • break
                                                                                                                                                                    • byte
                                                                                                                                                                    • -
                                                                                                                                                                    • var
                                                                                                                                                                    • -
                                                                                                                                                                    • go
                                                                                                                                                                    • +
                                                                                                                                                                    • case
                                                                                                                                                                    • +
                                                                                                                                                                    • chan
                                                                                                                                                                    • +
                                                                                                                                                                    • complex128
                                                                                                                                                                    • +
                                                                                                                                                                    • complex64
                                                                                                                                                                    • +
                                                                                                                                                                    • const
                                                                                                                                                                    • +
                                                                                                                                                                    • continue
                                                                                                                                                                    • +
                                                                                                                                                                    • default
                                                                                                                                                                    • +
                                                                                                                                                                    • defer
                                                                                                                                                                    • +
                                                                                                                                                                    • else
                                                                                                                                                                    • +
                                                                                                                                                                    • error
                                                                                                                                                                    • +
                                                                                                                                                                    • fallthrough
                                                                                                                                                                    • float32
                                                                                                                                                                    • -
                                                                                                                                                                    • uint
                                                                                                                                                                    • +
                                                                                                                                                                    • float64
                                                                                                                                                                    • +
                                                                                                                                                                    • for
                                                                                                                                                                    • +
                                                                                                                                                                    • func
                                                                                                                                                                    • +
                                                                                                                                                                    • go
                                                                                                                                                                    • +
                                                                                                                                                                    • goto
                                                                                                                                                                    • +
                                                                                                                                                                    • if
                                                                                                                                                                    • +
                                                                                                                                                                    • import
                                                                                                                                                                    • int
                                                                                                                                                                    • int16
                                                                                                                                                                    • -
                                                                                                                                                                    • func
                                                                                                                                                                    • int32
                                                                                                                                                                    • -
                                                                                                                                                                    • complex128
                                                                                                                                                                    • +
                                                                                                                                                                    • int64
                                                                                                                                                                    • +
                                                                                                                                                                    • int8
                                                                                                                                                                    • +
                                                                                                                                                                    • interface
                                                                                                                                                                    • +
                                                                                                                                                                    • map
                                                                                                                                                                    • +
                                                                                                                                                                    • nil
                                                                                                                                                                    • +
                                                                                                                                                                    • package
                                                                                                                                                                    • +
                                                                                                                                                                    • range
                                                                                                                                                                    • +
                                                                                                                                                                    • return
                                                                                                                                                                    • +
                                                                                                                                                                    • rune
                                                                                                                                                                    • +
                                                                                                                                                                    • select
                                                                                                                                                                    • +
                                                                                                                                                                    • string
                                                                                                                                                                    • +
                                                                                                                                                                    • struct
                                                                                                                                                                    • +
                                                                                                                                                                    • switch
                                                                                                                                                                    • +
                                                                                                                                                                    • type
                                                                                                                                                                    • +
                                                                                                                                                                    • uint
                                                                                                                                                                    • +
                                                                                                                                                                    • uint16
                                                                                                                                                                    • +
                                                                                                                                                                    • uint32
                                                                                                                                                                    • uint64
                                                                                                                                                                    • uint8
                                                                                                                                                                    • -
                                                                                                                                                                    • chan
                                                                                                                                                                    • -
                                                                                                                                                                    • fallthrough
                                                                                                                                                                    • uintptr
                                                                                                                                                                    • -
                                                                                                                                                                    • return
                                                                                                                                                                    • +
                                                                                                                                                                    • var
                                                                                                                                                                    diff --git a/docs/generators/go-server.md b/docs/generators/go-server.md index c1bc80844f..0125db11e9 100644 --- a/docs/generators/go-server.md +++ b/docs/generators/go-server.md @@ -5,12 +5,12 @@ sidebar_label: go-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|featureCORS|Enable Cross-Origin Resource Sharing middleware| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|Go package name (convention: lowercase).| |openapi| |packageVersion|Go package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|sourceFolder|source folder for generated code| |go| |serverPort|The network port the generated server binds to| |8080| -|featureCORS|Enable Cross-Origin Resource Sharing middleware| |false| +|sourceFolder|source folder for generated code| |go| ## IMPORT MAPPING @@ -26,68 +26,68 @@ sidebar_label: go-server ## LANGUAGE PRIMITIVES -
                                                                                                                                                                    • string
                                                                                                                                                                    • -
                                                                                                                                                                    • bool
                                                                                                                                                                    • +
                                                                                                                                                                      • bool
                                                                                                                                                                      • byte
                                                                                                                                                                      • +
                                                                                                                                                                      • complex128
                                                                                                                                                                      • +
                                                                                                                                                                      • complex64
                                                                                                                                                                      • float32
                                                                                                                                                                      • float64
                                                                                                                                                                      • -
                                                                                                                                                                      • uint
                                                                                                                                                                      • int
                                                                                                                                                                      • -
                                                                                                                                                                      • complex64
                                                                                                                                                                      • -
                                                                                                                                                                      • rune
                                                                                                                                                                      • int32
                                                                                                                                                                      • int64
                                                                                                                                                                      • -
                                                                                                                                                                      • complex128
                                                                                                                                                                      • -
                                                                                                                                                                      • uint64
                                                                                                                                                                      • +
                                                                                                                                                                      • rune
                                                                                                                                                                      • +
                                                                                                                                                                      • string
                                                                                                                                                                      • +
                                                                                                                                                                      • uint
                                                                                                                                                                      • uint32
                                                                                                                                                                      • +
                                                                                                                                                                      • uint64
                                                                                                                                                                      ## RESERVED WORDS -
                                                                                                                                                                      • struct
                                                                                                                                                                      • -
                                                                                                                                                                      • defer
                                                                                                                                                                      • -
                                                                                                                                                                      • select
                                                                                                                                                                      • -
                                                                                                                                                                      • string
                                                                                                                                                                      • -
                                                                                                                                                                      • bool
                                                                                                                                                                      • -
                                                                                                                                                                      • const
                                                                                                                                                                      • -
                                                                                                                                                                      • import
                                                                                                                                                                      • -
                                                                                                                                                                      • for
                                                                                                                                                                      • -
                                                                                                                                                                      • range
                                                                                                                                                                      • -
                                                                                                                                                                      • float64
                                                                                                                                                                      • -
                                                                                                                                                                      • interface
                                                                                                                                                                      • -
                                                                                                                                                                      • type
                                                                                                                                                                      • -
                                                                                                                                                                      • error
                                                                                                                                                                      • -
                                                                                                                                                                      • complex64
                                                                                                                                                                      • -
                                                                                                                                                                      • rune
                                                                                                                                                                      • -
                                                                                                                                                                      • switch
                                                                                                                                                                      • -
                                                                                                                                                                      • nil
                                                                                                                                                                      • -
                                                                                                                                                                      • default
                                                                                                                                                                      • -
                                                                                                                                                                      • goto
                                                                                                                                                                      • -
                                                                                                                                                                      • int64
                                                                                                                                                                      • -
                                                                                                                                                                      • else
                                                                                                                                                                      • -
                                                                                                                                                                      • continue
                                                                                                                                                                      • -
                                                                                                                                                                      • int8
                                                                                                                                                                      • -
                                                                                                                                                                      • uint32
                                                                                                                                                                      • -
                                                                                                                                                                      • uint16
                                                                                                                                                                      • -
                                                                                                                                                                      • map
                                                                                                                                                                      • -
                                                                                                                                                                      • if
                                                                                                                                                                      • -
                                                                                                                                                                      • case
                                                                                                                                                                      • -
                                                                                                                                                                      • package
                                                                                                                                                                      • +
                                                                                                                                                                        • bool
                                                                                                                                                                        • break
                                                                                                                                                                        • byte
                                                                                                                                                                        • -
                                                                                                                                                                        • var
                                                                                                                                                                        • -
                                                                                                                                                                        • go
                                                                                                                                                                        • +
                                                                                                                                                                        • case
                                                                                                                                                                        • +
                                                                                                                                                                        • chan
                                                                                                                                                                        • +
                                                                                                                                                                        • complex128
                                                                                                                                                                        • +
                                                                                                                                                                        • complex64
                                                                                                                                                                        • +
                                                                                                                                                                        • const
                                                                                                                                                                        • +
                                                                                                                                                                        • continue
                                                                                                                                                                        • +
                                                                                                                                                                        • default
                                                                                                                                                                        • +
                                                                                                                                                                        • defer
                                                                                                                                                                        • +
                                                                                                                                                                        • else
                                                                                                                                                                        • +
                                                                                                                                                                        • error
                                                                                                                                                                        • +
                                                                                                                                                                        • fallthrough
                                                                                                                                                                        • float32
                                                                                                                                                                        • -
                                                                                                                                                                        • uint
                                                                                                                                                                        • +
                                                                                                                                                                        • float64
                                                                                                                                                                        • +
                                                                                                                                                                        • for
                                                                                                                                                                        • +
                                                                                                                                                                        • func
                                                                                                                                                                        • +
                                                                                                                                                                        • go
                                                                                                                                                                        • +
                                                                                                                                                                        • goto
                                                                                                                                                                        • +
                                                                                                                                                                        • if
                                                                                                                                                                        • +
                                                                                                                                                                        • import
                                                                                                                                                                        • int
                                                                                                                                                                        • int16
                                                                                                                                                                        • -
                                                                                                                                                                        • func
                                                                                                                                                                        • int32
                                                                                                                                                                        • -
                                                                                                                                                                        • complex128
                                                                                                                                                                        • +
                                                                                                                                                                        • int64
                                                                                                                                                                        • +
                                                                                                                                                                        • int8
                                                                                                                                                                        • +
                                                                                                                                                                        • interface
                                                                                                                                                                        • +
                                                                                                                                                                        • map
                                                                                                                                                                        • +
                                                                                                                                                                        • nil
                                                                                                                                                                        • +
                                                                                                                                                                        • package
                                                                                                                                                                        • +
                                                                                                                                                                        • range
                                                                                                                                                                        • +
                                                                                                                                                                        • return
                                                                                                                                                                        • +
                                                                                                                                                                        • rune
                                                                                                                                                                        • +
                                                                                                                                                                        • select
                                                                                                                                                                        • +
                                                                                                                                                                        • string
                                                                                                                                                                        • +
                                                                                                                                                                        • struct
                                                                                                                                                                        • +
                                                                                                                                                                        • switch
                                                                                                                                                                        • +
                                                                                                                                                                        • type
                                                                                                                                                                        • +
                                                                                                                                                                        • uint
                                                                                                                                                                        • +
                                                                                                                                                                        • uint16
                                                                                                                                                                        • +
                                                                                                                                                                        • uint32
                                                                                                                                                                        • uint64
                                                                                                                                                                        • uint8
                                                                                                                                                                        • -
                                                                                                                                                                        • chan
                                                                                                                                                                        • -
                                                                                                                                                                        • fallthrough
                                                                                                                                                                        • uintptr
                                                                                                                                                                        • -
                                                                                                                                                                        • return
                                                                                                                                                                        • +
                                                                                                                                                                        • var
                                                                                                                                                                        diff --git a/docs/generators/go.md b/docs/generators/go.md index c26fb88d2e..1d8909bbfc 100644 --- a/docs/generators/go.md +++ b/docs/generators/go.md @@ -5,16 +5,16 @@ sidebar_label: go | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Go package name (convention: lowercase).| |openapi| -|packageVersion|Go package version.| |1.0.0| +|enumClassPrefix|Prefix enum with class name| |false| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |isGoSubmodule|whether the generated Go module is a submodule| |false| -|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|enumClassPrefix|Prefix enum with class name| |false| +|packageName|Go package name (convention: lowercase).| |openapi| +|packageVersion|Go package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts| |false| |withAWSV4Signature|whether to include AWS v4 signature support| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default GitHub in PRs and diffs| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING @@ -30,68 +30,68 @@ sidebar_label: go ## LANGUAGE PRIMITIVES -
                                                                                                                                                                        • string
                                                                                                                                                                        • -
                                                                                                                                                                        • bool
                                                                                                                                                                        • +
                                                                                                                                                                          • bool
                                                                                                                                                                          • byte
                                                                                                                                                                          • +
                                                                                                                                                                          • complex128
                                                                                                                                                                          • +
                                                                                                                                                                          • complex64
                                                                                                                                                                          • float32
                                                                                                                                                                          • float64
                                                                                                                                                                          • -
                                                                                                                                                                          • uint
                                                                                                                                                                          • int
                                                                                                                                                                          • -
                                                                                                                                                                          • complex64
                                                                                                                                                                          • -
                                                                                                                                                                          • rune
                                                                                                                                                                          • int32
                                                                                                                                                                          • int64
                                                                                                                                                                          • -
                                                                                                                                                                          • complex128
                                                                                                                                                                          • -
                                                                                                                                                                          • uint64
                                                                                                                                                                          • +
                                                                                                                                                                          • rune
                                                                                                                                                                          • +
                                                                                                                                                                          • string
                                                                                                                                                                          • +
                                                                                                                                                                          • uint
                                                                                                                                                                          • uint32
                                                                                                                                                                          • +
                                                                                                                                                                          • uint64
                                                                                                                                                                          ## RESERVED WORDS -
                                                                                                                                                                          • struct
                                                                                                                                                                          • -
                                                                                                                                                                          • defer
                                                                                                                                                                          • -
                                                                                                                                                                          • select
                                                                                                                                                                          • -
                                                                                                                                                                          • string
                                                                                                                                                                          • -
                                                                                                                                                                          • bool
                                                                                                                                                                          • -
                                                                                                                                                                          • const
                                                                                                                                                                          • -
                                                                                                                                                                          • import
                                                                                                                                                                          • -
                                                                                                                                                                          • for
                                                                                                                                                                          • -
                                                                                                                                                                          • range
                                                                                                                                                                          • -
                                                                                                                                                                          • float64
                                                                                                                                                                          • -
                                                                                                                                                                          • interface
                                                                                                                                                                          • -
                                                                                                                                                                          • type
                                                                                                                                                                          • -
                                                                                                                                                                          • error
                                                                                                                                                                          • -
                                                                                                                                                                          • complex64
                                                                                                                                                                          • -
                                                                                                                                                                          • rune
                                                                                                                                                                          • -
                                                                                                                                                                          • switch
                                                                                                                                                                          • -
                                                                                                                                                                          • nil
                                                                                                                                                                          • -
                                                                                                                                                                          • default
                                                                                                                                                                          • -
                                                                                                                                                                          • goto
                                                                                                                                                                          • -
                                                                                                                                                                          • int64
                                                                                                                                                                          • -
                                                                                                                                                                          • else
                                                                                                                                                                          • -
                                                                                                                                                                          • continue
                                                                                                                                                                          • -
                                                                                                                                                                          • int8
                                                                                                                                                                          • -
                                                                                                                                                                          • uint32
                                                                                                                                                                          • -
                                                                                                                                                                          • uint16
                                                                                                                                                                          • -
                                                                                                                                                                          • map
                                                                                                                                                                          • -
                                                                                                                                                                          • if
                                                                                                                                                                          • -
                                                                                                                                                                          • case
                                                                                                                                                                          • -
                                                                                                                                                                          • package
                                                                                                                                                                          • +
                                                                                                                                                                            • bool
                                                                                                                                                                            • break
                                                                                                                                                                            • byte
                                                                                                                                                                            • -
                                                                                                                                                                            • var
                                                                                                                                                                            • -
                                                                                                                                                                            • go
                                                                                                                                                                            • +
                                                                                                                                                                            • case
                                                                                                                                                                            • +
                                                                                                                                                                            • chan
                                                                                                                                                                            • +
                                                                                                                                                                            • complex128
                                                                                                                                                                            • +
                                                                                                                                                                            • complex64
                                                                                                                                                                            • +
                                                                                                                                                                            • const
                                                                                                                                                                            • +
                                                                                                                                                                            • continue
                                                                                                                                                                            • +
                                                                                                                                                                            • default
                                                                                                                                                                            • +
                                                                                                                                                                            • defer
                                                                                                                                                                            • +
                                                                                                                                                                            • else
                                                                                                                                                                            • +
                                                                                                                                                                            • error
                                                                                                                                                                            • +
                                                                                                                                                                            • fallthrough
                                                                                                                                                                            • float32
                                                                                                                                                                            • -
                                                                                                                                                                            • uint
                                                                                                                                                                            • +
                                                                                                                                                                            • float64
                                                                                                                                                                            • +
                                                                                                                                                                            • for
                                                                                                                                                                            • +
                                                                                                                                                                            • func
                                                                                                                                                                            • +
                                                                                                                                                                            • go
                                                                                                                                                                            • +
                                                                                                                                                                            • goto
                                                                                                                                                                            • +
                                                                                                                                                                            • if
                                                                                                                                                                            • +
                                                                                                                                                                            • import
                                                                                                                                                                            • int
                                                                                                                                                                            • int16
                                                                                                                                                                            • -
                                                                                                                                                                            • func
                                                                                                                                                                            • int32
                                                                                                                                                                            • -
                                                                                                                                                                            • complex128
                                                                                                                                                                            • +
                                                                                                                                                                            • int64
                                                                                                                                                                            • +
                                                                                                                                                                            • int8
                                                                                                                                                                            • +
                                                                                                                                                                            • interface
                                                                                                                                                                            • +
                                                                                                                                                                            • map
                                                                                                                                                                            • +
                                                                                                                                                                            • nil
                                                                                                                                                                            • +
                                                                                                                                                                            • package
                                                                                                                                                                            • +
                                                                                                                                                                            • range
                                                                                                                                                                            • +
                                                                                                                                                                            • return
                                                                                                                                                                            • +
                                                                                                                                                                            • rune
                                                                                                                                                                            • +
                                                                                                                                                                            • select
                                                                                                                                                                            • +
                                                                                                                                                                            • string
                                                                                                                                                                            • +
                                                                                                                                                                            • struct
                                                                                                                                                                            • +
                                                                                                                                                                            • switch
                                                                                                                                                                            • +
                                                                                                                                                                            • type
                                                                                                                                                                            • +
                                                                                                                                                                            • uint
                                                                                                                                                                            • +
                                                                                                                                                                            • uint16
                                                                                                                                                                            • +
                                                                                                                                                                            • uint32
                                                                                                                                                                            • uint64
                                                                                                                                                                            • uint8
                                                                                                                                                                            • -
                                                                                                                                                                            • chan
                                                                                                                                                                            • -
                                                                                                                                                                            • fallthrough
                                                                                                                                                                            • uintptr
                                                                                                                                                                            • -
                                                                                                                                                                            • return
                                                                                                                                                                            • +
                                                                                                                                                                            • var
                                                                                                                                                                            diff --git a/docs/generators/graphql-nodejs-express-server.md b/docs/generators/graphql-nodejs-express-server.md index ff521e8015..8200c47531 100644 --- a/docs/generators/graphql-nodejs-express-server.md +++ b/docs/generators/graphql-nodejs-express-server.md @@ -5,30 +5,30 @@ sidebar_label: graphql-nodejs-express-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|GraphQL Node.js Express server package name (convention: lowercase).| |openapi3graphql-server| |packageVersion|GraphQL Node.js Express server package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -39,25 +39,25 @@ sidebar_label: graphql-nodejs-express-server ## LANGUAGE PRIMITIVES -
                                                                                                                                                                            • Float
                                                                                                                                                                            • -
                                                                                                                                                                            • null
                                                                                                                                                                            • +
                                                                                                                                                                              • Boolean
                                                                                                                                                                              • +
                                                                                                                                                                              • Float
                                                                                                                                                                              • ID
                                                                                                                                                                              • -
                                                                                                                                                                              • String
                                                                                                                                                                              • -
                                                                                                                                                                              • Boolean
                                                                                                                                                                              • Int
                                                                                                                                                                              • +
                                                                                                                                                                              • String
                                                                                                                                                                              • +
                                                                                                                                                                              • null
                                                                                                                                                                              ## RESERVED WORDS -
                                                                                                                                                                              • implements
                                                                                                                                                                              • -
                                                                                                                                                                              • boolean
                                                                                                                                                                              • -
                                                                                                                                                                              • null
                                                                                                                                                                              • -
                                                                                                                                                                              • string
                                                                                                                                                                              • -
                                                                                                                                                                              • query
                                                                                                                                                                              • -
                                                                                                                                                                              • id
                                                                                                                                                                              • -
                                                                                                                                                                              • union
                                                                                                                                                                              • +
                                                                                                                                                                                • boolean
                                                                                                                                                                                • float
                                                                                                                                                                                • -
                                                                                                                                                                                • type
                                                                                                                                                                                • -
                                                                                                                                                                                • interface
                                                                                                                                                                                • +
                                                                                                                                                                                • id
                                                                                                                                                                                • +
                                                                                                                                                                                • implements
                                                                                                                                                                                • int
                                                                                                                                                                                • +
                                                                                                                                                                                • interface
                                                                                                                                                                                • +
                                                                                                                                                                                • null
                                                                                                                                                                                • +
                                                                                                                                                                                • query
                                                                                                                                                                                • +
                                                                                                                                                                                • string
                                                                                                                                                                                • +
                                                                                                                                                                                • type
                                                                                                                                                                                • +
                                                                                                                                                                                • union
                                                                                                                                                                                diff --git a/docs/generators/graphql-schema.md b/docs/generators/graphql-schema.md index f87416a2fb..5cc481fa24 100644 --- a/docs/generators/graphql-schema.md +++ b/docs/generators/graphql-schema.md @@ -5,30 +5,30 @@ sidebar_label: graphql-schema | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|GraphQL package name (convention: lowercase).| |openapi2graphql| |packageVersion|GraphQL package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -39,25 +39,25 @@ sidebar_label: graphql-schema ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                • Float
                                                                                                                                                                                • -
                                                                                                                                                                                • null
                                                                                                                                                                                • +
                                                                                                                                                                                  • Boolean
                                                                                                                                                                                  • +
                                                                                                                                                                                  • Float
                                                                                                                                                                                  • ID
                                                                                                                                                                                  • -
                                                                                                                                                                                  • String
                                                                                                                                                                                  • -
                                                                                                                                                                                  • Boolean
                                                                                                                                                                                  • Int
                                                                                                                                                                                  • +
                                                                                                                                                                                  • String
                                                                                                                                                                                  • +
                                                                                                                                                                                  • null
                                                                                                                                                                                  ## RESERVED WORDS -
                                                                                                                                                                                  • implements
                                                                                                                                                                                  • -
                                                                                                                                                                                  • boolean
                                                                                                                                                                                  • -
                                                                                                                                                                                  • null
                                                                                                                                                                                  • -
                                                                                                                                                                                  • string
                                                                                                                                                                                  • -
                                                                                                                                                                                  • query
                                                                                                                                                                                  • -
                                                                                                                                                                                  • id
                                                                                                                                                                                  • -
                                                                                                                                                                                  • union
                                                                                                                                                                                  • +
                                                                                                                                                                                    • boolean
                                                                                                                                                                                    • float
                                                                                                                                                                                    • -
                                                                                                                                                                                    • type
                                                                                                                                                                                    • -
                                                                                                                                                                                    • interface
                                                                                                                                                                                    • +
                                                                                                                                                                                    • id
                                                                                                                                                                                    • +
                                                                                                                                                                                    • implements
                                                                                                                                                                                    • int
                                                                                                                                                                                    • +
                                                                                                                                                                                    • interface
                                                                                                                                                                                    • +
                                                                                                                                                                                    • null
                                                                                                                                                                                    • +
                                                                                                                                                                                    • query
                                                                                                                                                                                    • +
                                                                                                                                                                                    • string
                                                                                                                                                                                    • +
                                                                                                                                                                                    • type
                                                                                                                                                                                    • +
                                                                                                                                                                                    • union
                                                                                                                                                                                    diff --git a/docs/generators/graphql-server.md b/docs/generators/graphql-server.md deleted file mode 100644 index 97fb578008..0000000000 --- a/docs/generators/graphql-server.md +++ /dev/null @@ -1,12 +0,0 @@ - ---- -id: generator-opts-server-graphql-server -title: Config Options for graphql-server -sidebar_label: graphql-server ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|packageName|GraphQL express server package name (convention: lowercase).| |openapi3graphql-server| -|packageVersion|GraphQL express server package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index e1ec15d3b5..13e9a1a619 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -5,62 +5,62 @@ sidebar_label: groovy | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                    **joda**
                                                                                                                                                                                    Joda (for legacy app only)
                                                                                                                                                                                    **legacy**
                                                                                                                                                                                    Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                    **java8-localdatetime**
                                                                                                                                                                                    Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                    **java8**
                                                                                                                                                                                    Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                    **threetenbp**
                                                                                                                                                                                    Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                    |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                    **true**
                                                                                                                                                                                    Use Java 8 classes such as Base64
                                                                                                                                                                                    **false**
                                                                                                                                                                                    Various third party libraries as needed
                                                                                                                                                                                    |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/groovy| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                    **joda**
                                                                                                                                                                                    Joda (for legacy app only)
                                                                                                                                                                                    **legacy**
                                                                                                                                                                                    Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                    **java8-localdatetime**
                                                                                                                                                                                    Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                    **java8**
                                                                                                                                                                                    Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                    **threetenbp**
                                                                                                                                                                                    Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                    |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                    **true**
                                                                                                                                                                                    Use Java 8 classes such as Base64
                                                                                                                                                                                    **false**
                                                                                                                                                                                    Various third party libraries as needed
                                                                                                                                                                                    |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                    **true**
                                                                                                                                                                                    Use a SnapShot Version
                                                                                                                                                                                    **false**
                                                                                                                                                                                    Use a Release Version
                                                                                                                                                                                    |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/groovy| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -74,90 +74,90 @@ sidebar_label: groovy ## LANGUAGE PRIMITIVES
                                                                                                                                                                                    • ArrayList
                                                                                                                                                                                    • -
                                                                                                                                                                                    • String
                                                                                                                                                                                    • -
                                                                                                                                                                                    • Double
                                                                                                                                                                                    • -
                                                                                                                                                                                    • Date
                                                                                                                                                                                    • -
                                                                                                                                                                                    • Integer
                                                                                                                                                                                    • -
                                                                                                                                                                                    • byte[]
                                                                                                                                                                                    • -
                                                                                                                                                                                    • Float
                                                                                                                                                                                    • -
                                                                                                                                                                                    • boolean
                                                                                                                                                                                    • -
                                                                                                                                                                                    • Long
                                                                                                                                                                                    • -
                                                                                                                                                                                    • Object
                                                                                                                                                                                    • Boolean
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Date
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Double
                                                                                                                                                                                    • File
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Float
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Integer
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Long
                                                                                                                                                                                    • Map
                                                                                                                                                                                    • +
                                                                                                                                                                                    • Object
                                                                                                                                                                                    • +
                                                                                                                                                                                    • String
                                                                                                                                                                                    • +
                                                                                                                                                                                    • boolean
                                                                                                                                                                                    • +
                                                                                                                                                                                    • byte[]
                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                    • localvaraccepts
                                                                                                                                                                                    • -
                                                                                                                                                                                    • synchronized
                                                                                                                                                                                    • -
                                                                                                                                                                                    • do
                                                                                                                                                                                    • -
                                                                                                                                                                                    • float
                                                                                                                                                                                    • -
                                                                                                                                                                                    • while
                                                                                                                                                                                    • -
                                                                                                                                                                                    • localvarpath
                                                                                                                                                                                    • -
                                                                                                                                                                                    • protected
                                                                                                                                                                                    • -
                                                                                                                                                                                    • continue
                                                                                                                                                                                    • -
                                                                                                                                                                                    • else
                                                                                                                                                                                    • +
                                                                                                                                                                                      • abstract
                                                                                                                                                                                      • apiclient
                                                                                                                                                                                      • -
                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                      • -
                                                                                                                                                                                      • catch
                                                                                                                                                                                      • -
                                                                                                                                                                                      • if
                                                                                                                                                                                      • -
                                                                                                                                                                                      • case
                                                                                                                                                                                      • -
                                                                                                                                                                                      • new
                                                                                                                                                                                      • -
                                                                                                                                                                                      • package
                                                                                                                                                                                      • -
                                                                                                                                                                                      • static
                                                                                                                                                                                      • -
                                                                                                                                                                                      • void
                                                                                                                                                                                      • -
                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                      • -
                                                                                                                                                                                      • double
                                                                                                                                                                                      • +
                                                                                                                                                                                      • apiexception
                                                                                                                                                                                      • +
                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                      • +
                                                                                                                                                                                      • assert
                                                                                                                                                                                      • +
                                                                                                                                                                                      • boolean
                                                                                                                                                                                      • +
                                                                                                                                                                                      • break
                                                                                                                                                                                      • byte
                                                                                                                                                                                      • -
                                                                                                                                                                                      • finally
                                                                                                                                                                                      • -
                                                                                                                                                                                      • this
                                                                                                                                                                                      • -
                                                                                                                                                                                      • strictfp
                                                                                                                                                                                      • -
                                                                                                                                                                                      • throws
                                                                                                                                                                                      • +
                                                                                                                                                                                      • case
                                                                                                                                                                                      • +
                                                                                                                                                                                      • catch
                                                                                                                                                                                      • +
                                                                                                                                                                                      • char
                                                                                                                                                                                      • +
                                                                                                                                                                                      • class
                                                                                                                                                                                      • +
                                                                                                                                                                                      • configuration
                                                                                                                                                                                      • +
                                                                                                                                                                                      • const
                                                                                                                                                                                      • +
                                                                                                                                                                                      • continue
                                                                                                                                                                                      • +
                                                                                                                                                                                      • default
                                                                                                                                                                                      • +
                                                                                                                                                                                      • do
                                                                                                                                                                                      • +
                                                                                                                                                                                      • double
                                                                                                                                                                                      • +
                                                                                                                                                                                      • else
                                                                                                                                                                                      • enum
                                                                                                                                                                                      • extends
                                                                                                                                                                                      • -
                                                                                                                                                                                      • null
                                                                                                                                                                                      • -
                                                                                                                                                                                      • transient
                                                                                                                                                                                      • -
                                                                                                                                                                                      • apiexception
                                                                                                                                                                                      • final
                                                                                                                                                                                      • -
                                                                                                                                                                                      • try
                                                                                                                                                                                      • -
                                                                                                                                                                                      • object
                                                                                                                                                                                      • -
                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                      • -
                                                                                                                                                                                      • implements
                                                                                                                                                                                      • -
                                                                                                                                                                                      • private
                                                                                                                                                                                      • -
                                                                                                                                                                                      • import
                                                                                                                                                                                      • -
                                                                                                                                                                                      • const
                                                                                                                                                                                      • -
                                                                                                                                                                                      • configuration
                                                                                                                                                                                      • +
                                                                                                                                                                                      • finally
                                                                                                                                                                                      • +
                                                                                                                                                                                      • float
                                                                                                                                                                                      • for
                                                                                                                                                                                      • -
                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                      • -
                                                                                                                                                                                      • interface
                                                                                                                                                                                      • -
                                                                                                                                                                                      • long
                                                                                                                                                                                      • -
                                                                                                                                                                                      • switch
                                                                                                                                                                                      • -
                                                                                                                                                                                      • default
                                                                                                                                                                                      • goto
                                                                                                                                                                                      • -
                                                                                                                                                                                      • public
                                                                                                                                                                                      • -
                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                      • -
                                                                                                                                                                                      • native
                                                                                                                                                                                      • -
                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                      • -
                                                                                                                                                                                      • assert
                                                                                                                                                                                      • -
                                                                                                                                                                                      • stringutil
                                                                                                                                                                                      • -
                                                                                                                                                                                      • class
                                                                                                                                                                                      • -
                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                      • -
                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                      • -
                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                      • -
                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                      • -
                                                                                                                                                                                      • break
                                                                                                                                                                                      • -
                                                                                                                                                                                      • volatile
                                                                                                                                                                                      • -
                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                      • -
                                                                                                                                                                                      • abstract
                                                                                                                                                                                      • -
                                                                                                                                                                                      • int
                                                                                                                                                                                      • +
                                                                                                                                                                                      • if
                                                                                                                                                                                      • +
                                                                                                                                                                                      • implements
                                                                                                                                                                                      • +
                                                                                                                                                                                      • import
                                                                                                                                                                                      • instanceof
                                                                                                                                                                                      • -
                                                                                                                                                                                      • super
                                                                                                                                                                                      • -
                                                                                                                                                                                      • boolean
                                                                                                                                                                                      • -
                                                                                                                                                                                      • throw
                                                                                                                                                                                      • +
                                                                                                                                                                                      • int
                                                                                                                                                                                      • +
                                                                                                                                                                                      • interface
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvaraccepts
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvarpath
                                                                                                                                                                                      • localvarpostbody
                                                                                                                                                                                      • -
                                                                                                                                                                                      • char
                                                                                                                                                                                      • -
                                                                                                                                                                                      • short
                                                                                                                                                                                      • +
                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                      • +
                                                                                                                                                                                      • long
                                                                                                                                                                                      • +
                                                                                                                                                                                      • native
                                                                                                                                                                                      • +
                                                                                                                                                                                      • new
                                                                                                                                                                                      • +
                                                                                                                                                                                      • null
                                                                                                                                                                                      • +
                                                                                                                                                                                      • object
                                                                                                                                                                                      • +
                                                                                                                                                                                      • package
                                                                                                                                                                                      • +
                                                                                                                                                                                      • private
                                                                                                                                                                                      • +
                                                                                                                                                                                      • protected
                                                                                                                                                                                      • +
                                                                                                                                                                                      • public
                                                                                                                                                                                      • return
                                                                                                                                                                                      • +
                                                                                                                                                                                      • short
                                                                                                                                                                                      • +
                                                                                                                                                                                      • static
                                                                                                                                                                                      • +
                                                                                                                                                                                      • strictfp
                                                                                                                                                                                      • +
                                                                                                                                                                                      • stringutil
                                                                                                                                                                                      • +
                                                                                                                                                                                      • super
                                                                                                                                                                                      • +
                                                                                                                                                                                      • switch
                                                                                                                                                                                      • +
                                                                                                                                                                                      • synchronized
                                                                                                                                                                                      • +
                                                                                                                                                                                      • this
                                                                                                                                                                                      • +
                                                                                                                                                                                      • throw
                                                                                                                                                                                      • +
                                                                                                                                                                                      • throws
                                                                                                                                                                                      • +
                                                                                                                                                                                      • transient
                                                                                                                                                                                      • +
                                                                                                                                                                                      • try
                                                                                                                                                                                      • +
                                                                                                                                                                                      • void
                                                                                                                                                                                      • +
                                                                                                                                                                                      • volatile
                                                                                                                                                                                      • +
                                                                                                                                                                                      • while
                                                                                                                                                                                      diff --git a/docs/generators/grpc-schema.md b/docs/generators/grpc-schema.md deleted file mode 100644 index 17a765fbbc..0000000000 --- a/docs/generators/grpc-schema.md +++ /dev/null @@ -1,9 +0,0 @@ - ---- -id: generator-opts-config-grpc-schema -title: Config Options for grpc-schema -sidebar_label: grpc-schema ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md index b0abf7faa1..3a68e2276a 100644 --- a/docs/generators/haskell-http-client.md +++ b/docs/generators/haskell-http-client.md @@ -5,32 +5,32 @@ sidebar_label: haskell-http-client | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|allowFromJsonNulls|allow JSON Null during model decoding from JSON| |true| +|allowNonUniqueOperationIds|allow different API modules to contain the same operationId. Each API must be imported qualified| |false| +|allowToJsonNulls|allow emitting JSON Null during model encoding to JSON| |false| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|baseModule|Set the base module namespace| |null| |cabalPackage|Set the cabal package name, which consists of one or more alphanumeric words separated by hyphens| |null| |cabalVersion|Set the cabal version number, consisting of a sequence of one or more integers separated by dots| |null| -|baseModule|Set the base module namespace| |null| -|requestType|Set the name of the type used to generate requests| |null| |configType|Set the name of the type used for configuration| |null| -|allowFromJsonNulls|allow JSON Null during model decoding from JSON| |true| -|allowToJsonNulls|allow emitting JSON Null during model encoding to JSON| |false| -|allowNonUniqueOperationIds|allow different API modules to contain the same operationId. Each API must be imported qualified| |false| -|generateLenses|Generate Lens optics for Models| |true| -|generateModelConstructors|Generate smart constructors (only supply required fields) for models| |true| -|generateEnums|Generate specific datatypes for OpenAPI enums| |true| -|generateFormUrlEncodedInstances|Generate FromForm/ToForm instances for models that are used by operations that produce or consume application/x-www-form-urlencoded| |true| -|inlineMimeTypes|Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option| |true| -|modelDeriving|Additional classes to include in the deriving() clause of Models| |null| -|strictFields|Add strictness annotations to all model fields| |true| -|useKatip|Sets the default value for the UseKatip cabal flag. If true, the katip package provides logging instead of monad-logger| |true| +|customTestInstanceModule|test module used to provide typeclass instances for types not known by the generator| |null| +|dateFormat|format string used to parse/render a date| |%Y-%m-%d| |dateTimeFormat|format string used to parse/render a datetime| |null| |dateTimeParseFormat|overrides the format string used to parse a datetime| |null| -|dateFormat|format string used to parse/render a date| |%Y-%m-%d| -|customTestInstanceModule|test module used to provide typeclass instances for types not known by the generator| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|generateEnums|Generate specific datatypes for OpenAPI enums| |true| +|generateFormUrlEncodedInstances|Generate FromForm/ToForm instances for models that are used by operations that produce or consume application/x-www-form-urlencoded| |true| +|generateLenses|Generate Lens optics for Models| |true| +|generateModelConstructors|Generate smart constructors (only supply required fields) for models| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|inlineMimeTypes|Inline (hardcode) the content-type and accept parameters on operations, when there is only 1 option| |true| +|modelDeriving|Additional classes to include in the deriving() clause of Models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|requestType|Set the name of the type used to generate requests| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|strictFields|Add strictness annotations to all model fields| |true| +|useKatip|Sets the default value for the UseKatip cabal flag. If true, the katip package provides logging instead of monad-logger| |true| ## IMPORT MAPPING @@ -46,52 +46,52 @@ sidebar_label: haskell-http-client ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                      • Integer
                                                                                                                                                                                      • +
                                                                                                                                                                                        • Bool
                                                                                                                                                                                        • +
                                                                                                                                                                                        • Char
                                                                                                                                                                                        • +
                                                                                                                                                                                        • Double
                                                                                                                                                                                        • FilePath
                                                                                                                                                                                        • Float
                                                                                                                                                                                        • -
                                                                                                                                                                                        • Bool
                                                                                                                                                                                        • -
                                                                                                                                                                                        • Char
                                                                                                                                                                                        • -
                                                                                                                                                                                        • List
                                                                                                                                                                                        • -
                                                                                                                                                                                        • Text
                                                                                                                                                                                        • -
                                                                                                                                                                                        • String
                                                                                                                                                                                        • -
                                                                                                                                                                                        • Double
                                                                                                                                                                                        • Int
                                                                                                                                                                                        • +
                                                                                                                                                                                        • Integer
                                                                                                                                                                                        • +
                                                                                                                                                                                        • List
                                                                                                                                                                                        • +
                                                                                                                                                                                        • String
                                                                                                                                                                                        • +
                                                                                                                                                                                        • Text
                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                        • qualified
                                                                                                                                                                                        • -
                                                                                                                                                                                        • instance
                                                                                                                                                                                        • -
                                                                                                                                                                                        • data
                                                                                                                                                                                        • -
                                                                                                                                                                                        • import
                                                                                                                                                                                        • -
                                                                                                                                                                                        • infixr
                                                                                                                                                                                        • -
                                                                                                                                                                                        • do
                                                                                                                                                                                        • -
                                                                                                                                                                                        • type
                                                                                                                                                                                        • -
                                                                                                                                                                                        • pure
                                                                                                                                                                                        • -
                                                                                                                                                                                        • foreign
                                                                                                                                                                                        • -
                                                                                                                                                                                        • newtype
                                                                                                                                                                                        • -
                                                                                                                                                                                        • hiding
                                                                                                                                                                                        • -
                                                                                                                                                                                        • rec
                                                                                                                                                                                        • -
                                                                                                                                                                                        • default
                                                                                                                                                                                        • -
                                                                                                                                                                                        • else
                                                                                                                                                                                        • -
                                                                                                                                                                                        • of
                                                                                                                                                                                        • -
                                                                                                                                                                                        • let
                                                                                                                                                                                        • -
                                                                                                                                                                                        • where
                                                                                                                                                                                        • -
                                                                                                                                                                                        • class
                                                                                                                                                                                        • -
                                                                                                                                                                                        • if
                                                                                                                                                                                        • -
                                                                                                                                                                                        • case
                                                                                                                                                                                        • -
                                                                                                                                                                                        • proc
                                                                                                                                                                                        • -
                                                                                                                                                                                        • in
                                                                                                                                                                                        • -
                                                                                                                                                                                        • forall
                                                                                                                                                                                        • -
                                                                                                                                                                                        • module
                                                                                                                                                                                        • -
                                                                                                                                                                                        • then
                                                                                                                                                                                        • -
                                                                                                                                                                                        • infix
                                                                                                                                                                                        • -
                                                                                                                                                                                        • accept
                                                                                                                                                                                        • -
                                                                                                                                                                                        • contenttype
                                                                                                                                                                                        • +
                                                                                                                                                                                          • accept
                                                                                                                                                                                          • as
                                                                                                                                                                                          • +
                                                                                                                                                                                          • case
                                                                                                                                                                                          • +
                                                                                                                                                                                          • class
                                                                                                                                                                                          • +
                                                                                                                                                                                          • contenttype
                                                                                                                                                                                          • +
                                                                                                                                                                                          • data
                                                                                                                                                                                          • +
                                                                                                                                                                                          • default
                                                                                                                                                                                          • deriving
                                                                                                                                                                                          • -
                                                                                                                                                                                          • infixl
                                                                                                                                                                                          • -
                                                                                                                                                                                          • mdo
                                                                                                                                                                                          • +
                                                                                                                                                                                          • do
                                                                                                                                                                                          • +
                                                                                                                                                                                          • else
                                                                                                                                                                                          • family
                                                                                                                                                                                          • +
                                                                                                                                                                                          • forall
                                                                                                                                                                                          • +
                                                                                                                                                                                          • foreign
                                                                                                                                                                                          • +
                                                                                                                                                                                          • hiding
                                                                                                                                                                                          • +
                                                                                                                                                                                          • if
                                                                                                                                                                                          • +
                                                                                                                                                                                          • import
                                                                                                                                                                                          • +
                                                                                                                                                                                          • in
                                                                                                                                                                                          • +
                                                                                                                                                                                          • infix
                                                                                                                                                                                          • +
                                                                                                                                                                                          • infixl
                                                                                                                                                                                          • +
                                                                                                                                                                                          • infixr
                                                                                                                                                                                          • +
                                                                                                                                                                                          • instance
                                                                                                                                                                                          • +
                                                                                                                                                                                          • let
                                                                                                                                                                                          • +
                                                                                                                                                                                          • mdo
                                                                                                                                                                                          • +
                                                                                                                                                                                          • module
                                                                                                                                                                                          • +
                                                                                                                                                                                          • newtype
                                                                                                                                                                                          • +
                                                                                                                                                                                          • of
                                                                                                                                                                                          • +
                                                                                                                                                                                          • proc
                                                                                                                                                                                          • +
                                                                                                                                                                                          • pure
                                                                                                                                                                                          • +
                                                                                                                                                                                          • qualified
                                                                                                                                                                                          • +
                                                                                                                                                                                          • rec
                                                                                                                                                                                          • return
                                                                                                                                                                                          • +
                                                                                                                                                                                          • then
                                                                                                                                                                                          • +
                                                                                                                                                                                          • type
                                                                                                                                                                                          • +
                                                                                                                                                                                          • where
                                                                                                                                                                                          diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md index 650ba8a604..3e0cb77314 100644 --- a/docs/generators/haskell.md +++ b/docs/generators/haskell.md @@ -5,14 +5,14 @@ sidebar_label: haskell | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serveStatic|serve will serve files from the directory 'static'.| |true| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -29,47 +29,47 @@ sidebar_label: haskell ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                          • Integer
                                                                                                                                                                                          • +
                                                                                                                                                                                            • Bool
                                                                                                                                                                                            • +
                                                                                                                                                                                            • Char
                                                                                                                                                                                            • +
                                                                                                                                                                                            • Double
                                                                                                                                                                                            • FilePath
                                                                                                                                                                                            • Float
                                                                                                                                                                                            • -
                                                                                                                                                                                            • Bool
                                                                                                                                                                                            • -
                                                                                                                                                                                            • Char
                                                                                                                                                                                            • +
                                                                                                                                                                                            • Int
                                                                                                                                                                                            • +
                                                                                                                                                                                            • Integer
                                                                                                                                                                                            • List
                                                                                                                                                                                            • String
                                                                                                                                                                                            • -
                                                                                                                                                                                            • Double
                                                                                                                                                                                            • -
                                                                                                                                                                                            • Int
                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                            • qualified
                                                                                                                                                                                            • -
                                                                                                                                                                                            • instance
                                                                                                                                                                                            • -
                                                                                                                                                                                            • data
                                                                                                                                                                                            • -
                                                                                                                                                                                            • import
                                                                                                                                                                                            • -
                                                                                                                                                                                            • infixr
                                                                                                                                                                                            • -
                                                                                                                                                                                            • do
                                                                                                                                                                                            • -
                                                                                                                                                                                            • type
                                                                                                                                                                                            • -
                                                                                                                                                                                            • foreign
                                                                                                                                                                                            • -
                                                                                                                                                                                            • newtype
                                                                                                                                                                                            • -
                                                                                                                                                                                            • hiding
                                                                                                                                                                                            • -
                                                                                                                                                                                            • rec
                                                                                                                                                                                            • -
                                                                                                                                                                                            • default
                                                                                                                                                                                            • -
                                                                                                                                                                                            • else
                                                                                                                                                                                            • -
                                                                                                                                                                                            • of
                                                                                                                                                                                            • -
                                                                                                                                                                                            • let
                                                                                                                                                                                            • -
                                                                                                                                                                                            • where
                                                                                                                                                                                            • -
                                                                                                                                                                                            • class
                                                                                                                                                                                            • -
                                                                                                                                                                                            • if
                                                                                                                                                                                            • +
                                                                                                                                                                                              • as
                                                                                                                                                                                              • case
                                                                                                                                                                                              • -
                                                                                                                                                                                              • proc
                                                                                                                                                                                              • -
                                                                                                                                                                                              • in
                                                                                                                                                                                              • -
                                                                                                                                                                                              • forall
                                                                                                                                                                                              • -
                                                                                                                                                                                              • module
                                                                                                                                                                                              • -
                                                                                                                                                                                              • then
                                                                                                                                                                                              • -
                                                                                                                                                                                              • infix
                                                                                                                                                                                              • -
                                                                                                                                                                                              • as
                                                                                                                                                                                              • +
                                                                                                                                                                                              • class
                                                                                                                                                                                              • +
                                                                                                                                                                                              • data
                                                                                                                                                                                              • +
                                                                                                                                                                                              • default
                                                                                                                                                                                              • deriving
                                                                                                                                                                                              • -
                                                                                                                                                                                              • infixl
                                                                                                                                                                                              • -
                                                                                                                                                                                              • mdo
                                                                                                                                                                                              • +
                                                                                                                                                                                              • do
                                                                                                                                                                                              • +
                                                                                                                                                                                              • else
                                                                                                                                                                                              • family
                                                                                                                                                                                              • +
                                                                                                                                                                                              • forall
                                                                                                                                                                                              • +
                                                                                                                                                                                              • foreign
                                                                                                                                                                                              • +
                                                                                                                                                                                              • hiding
                                                                                                                                                                                              • +
                                                                                                                                                                                              • if
                                                                                                                                                                                              • +
                                                                                                                                                                                              • import
                                                                                                                                                                                              • +
                                                                                                                                                                                              • in
                                                                                                                                                                                              • +
                                                                                                                                                                                              • infix
                                                                                                                                                                                              • +
                                                                                                                                                                                              • infixl
                                                                                                                                                                                              • +
                                                                                                                                                                                              • infixr
                                                                                                                                                                                              • +
                                                                                                                                                                                              • instance
                                                                                                                                                                                              • +
                                                                                                                                                                                              • let
                                                                                                                                                                                              • +
                                                                                                                                                                                              • mdo
                                                                                                                                                                                              • +
                                                                                                                                                                                              • module
                                                                                                                                                                                              • +
                                                                                                                                                                                              • newtype
                                                                                                                                                                                              • +
                                                                                                                                                                                              • of
                                                                                                                                                                                              • +
                                                                                                                                                                                              • proc
                                                                                                                                                                                              • +
                                                                                                                                                                                              • qualified
                                                                                                                                                                                              • +
                                                                                                                                                                                              • rec
                                                                                                                                                                                              • +
                                                                                                                                                                                              • then
                                                                                                                                                                                              • +
                                                                                                                                                                                              • type
                                                                                                                                                                                              • +
                                                                                                                                                                                              • where
                                                                                                                                                                                              diff --git a/docs/generators/html.md b/docs/generators/html.md index f0e0d3fe22..d538d0f91d 100644 --- a/docs/generators/html.md +++ b/docs/generators/html.md @@ -5,21 +5,21 @@ sidebar_label: html | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|appName|short name of the application| |null| |appDescription|description of the application| |null| -|infoUrl|a URL where users can get more information about the application| |null| -|infoEmail|an email address to contact for inquiries about the application| |null| -|licenseInfo|a short description of the license| |null| -|licenseUrl|a URL pointing to the full license| |null| -|invokerPackage|root package for generated code| |null| -|groupId|groupId in generated pom.xml| |null| +|appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId in generated pom.xml| |null| +|infoEmail|an email address to contact for inquiries about the application| |null| +|infoUrl|a URL where users can get more information about the application| |null| +|invokerPackage|root package for generated code| |null| +|licenseInfo|a short description of the license| |null| +|licenseUrl|a URL pointing to the full license| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING diff --git a/docs/generators/html2.md b/docs/generators/html2.md index cc4f542562..82374353c4 100644 --- a/docs/generators/html2.md +++ b/docs/generators/html2.md @@ -5,25 +5,25 @@ sidebar_label: html2 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|appName|short name of the application| |null| |appDescription|description of the application| |null| -|infoUrl|a URL where users can get more information about the application| |null| -|infoEmail|an email address to contact for inquiries about the application| |null| -|licenseInfo|a short description of the license| |null| -|licenseUrl|a URL pointing to the full license| |null| -|invokerPackage|root package for generated code| |null| -|phpInvokerPackage|root package for generated php code| |null| -|perlModuleName|root module name for generated perl code| |null| -|pythonPackageName|package name for generated python code| |null| -|packageName|C# package name| |null| -|groupId|groupId in generated pom.xml| |null| +|appName|short name of the application| |null| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|groupId|groupId in generated pom.xml| |null| +|infoEmail|an email address to contact for inquiries about the application| |null| +|infoUrl|a URL where users can get more information about the application| |null| +|invokerPackage|root package for generated code| |null| +|licenseInfo|a short description of the license| |null| +|licenseUrl|a URL pointing to the full license| |null| +|packageName|C# package name| |null| +|perlModuleName|root module name for generated perl code| |null| +|phpInvokerPackage|root package for generated php code| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|pythonPackageName|package name for generated python code| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index fd9ecfa521..9a0da4b39a 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -5,64 +5,64 @@ sidebar_label: java-inflector | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.controllers| -|invokerPackage|root package for generated code| |org.openapitools.controllers| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-inflector-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-inflector-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                              **joda**
                                                                                                                                                                                              Joda (for legacy app only)
                                                                                                                                                                                              **legacy**
                                                                                                                                                                                              Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                              **java8-localdatetime**
                                                                                                                                                                                              Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                              **java8**
                                                                                                                                                                                              Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                              **threetenbp**
                                                                                                                                                                                              Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                              |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.controllers| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                              **true**
                                                                                                                                                                                              Use Java 8 classes such as Base64
                                                                                                                                                                                              **false**
                                                                                                                                                                                              Various third party libraries as needed
                                                                                                                                                                                              |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/gen/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                              **joda**
                                                                                                                                                                                              Joda (for legacy app only)
                                                                                                                                                                                              **legacy**
                                                                                                                                                                                              Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                              **java8-localdatetime**
                                                                                                                                                                                              Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                              **java8**
                                                                                                                                                                                              Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                              **threetenbp**
                                                                                                                                                                                              Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                              |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                              **true**
                                                                                                                                                                                              Use Java 8 classes such as Base64
                                                                                                                                                                                              **false**
                                                                                                                                                                                              Various third party libraries as needed
                                                                                                                                                                                              |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                              **true**
                                                                                                                                                                                              Use a SnapShot Version
                                                                                                                                                                                              **false**
                                                                                                                                                                                              Use a Release Version
                                                                                                                                                                                              |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/gen/java| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -75,87 +75,87 @@ sidebar_label: java-inflector ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                              • Integer
                                                                                                                                                                                              • -
                                                                                                                                                                                              • byte[]
                                                                                                                                                                                              • +
                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                • +
                                                                                                                                                                                                • Double
                                                                                                                                                                                                • Float
                                                                                                                                                                                                • -
                                                                                                                                                                                                • boolean
                                                                                                                                                                                                • +
                                                                                                                                                                                                • Integer
                                                                                                                                                                                                • Long
                                                                                                                                                                                                • Object
                                                                                                                                                                                                • String
                                                                                                                                                                                                • -
                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                • -
                                                                                                                                                                                                • Double
                                                                                                                                                                                                • +
                                                                                                                                                                                                • boolean
                                                                                                                                                                                                • +
                                                                                                                                                                                                • byte[]
                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                • localvaraccepts
                                                                                                                                                                                                • -
                                                                                                                                                                                                • synchronized
                                                                                                                                                                                                • -
                                                                                                                                                                                                • do
                                                                                                                                                                                                • -
                                                                                                                                                                                                • float
                                                                                                                                                                                                • -
                                                                                                                                                                                                • while
                                                                                                                                                                                                • -
                                                                                                                                                                                                • localvarpath
                                                                                                                                                                                                • -
                                                                                                                                                                                                • protected
                                                                                                                                                                                                • -
                                                                                                                                                                                                • continue
                                                                                                                                                                                                • -
                                                                                                                                                                                                • else
                                                                                                                                                                                                • +
                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                  • apiclient
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • localvarqueryparams
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • catch
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • if
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • case
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • new
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • package
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • static
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • void
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • localvaraccept
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • double
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • apiexception
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • apiresponse
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • assert
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • break
                                                                                                                                                                                                  • byte
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • finally
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • this
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • strictfp
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • throws
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • case
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • catch
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • char
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • class
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • configuration
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • const
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • continue
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • default
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • do
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • double
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • else
                                                                                                                                                                                                  • enum
                                                                                                                                                                                                  • extends
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • null
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • transient
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • apiexception
                                                                                                                                                                                                  • final
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • try
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • object
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • localvarcontenttypes
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • implements
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • private
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • import
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • const
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • configuration
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • finally
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • float
                                                                                                                                                                                                  • for
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • apiresponse
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • interface
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • long
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • switch
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • default
                                                                                                                                                                                                  • goto
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • public
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • localvarheaderparams
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • native
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • localvarcontenttype
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • assert
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • stringutil
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • class
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • localvarcollectionqueryparams
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • localvarcookieparams
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • localreturntype
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • localvarformparams
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • break
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • volatile
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • localvarauthnames
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • int
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • if
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • implements
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • import
                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • super
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • throw
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • int
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • interface
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localreturntype
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvaraccept
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvaraccepts
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvarauthnames
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvarcollectionqueryparams
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvarcontenttype
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvarcontenttypes
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvarcookieparams
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvarformparams
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvarheaderparams
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvarpath
                                                                                                                                                                                                  • localvarpostbody
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • char
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • short
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • localvarqueryparams
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • long
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • native
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • new
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • null
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • object
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • package
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • private
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • protected
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • public
                                                                                                                                                                                                  • return
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • short
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • static
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • strictfp
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • stringutil
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • super
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • switch
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • synchronized
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • this
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • throw
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • throws
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • transient
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • try
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • void
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • volatile
                                                                                                                                                                                                  • +
                                                                                                                                                                                                  • while
                                                                                                                                                                                                  diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 30f52f7ded..d0ecb290ff 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -5,69 +5,69 @@ sidebar_label: java-msf4j | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                  **joda**
                                                                                                                                                                                                  Joda (for legacy app only)
                                                                                                                                                                                                  **legacy**
                                                                                                                                                                                                  Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                  Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                  Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                  Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                  |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                  **true**
                                                                                                                                                                                                  Use Java 8 classes such as Base64
                                                                                                                                                                                                  **false**
                                                                                                                                                                                                  Various third party libraries as needed
                                                                                                                                                                                                  |false| +|library|library template (sub-template)|
                                                                                                                                                                                                  **jersey1**
                                                                                                                                                                                                  Jersey core 1.x
                                                                                                                                                                                                  **jersey2**
                                                                                                                                                                                                  Jersey core 2.x
                                                                                                                                                                                                  |jersey2| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                  **joda**
                                                                                                                                                                                                  Joda (for legacy app only)
                                                                                                                                                                                                  **legacy**
                                                                                                                                                                                                  Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                  Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                  Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                  Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                  |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                  **true**
                                                                                                                                                                                                  Use Java 8 classes such as Base64
                                                                                                                                                                                                  **false**
                                                                                                                                                                                                  Various third party libraries as needed
                                                                                                                                                                                                  |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                  **true**
                                                                                                                                                                                                  Use a SnapShot Version
                                                                                                                                                                                                  **false**
                                                                                                                                                                                                  Use a Release Version
                                                                                                                                                                                                  |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|library|library template (sub-template)|
                                                                                                                                                                                                  **jersey1**
                                                                                                                                                                                                  Jersey core 1.x
                                                                                                                                                                                                  **jersey2**
                                                                                                                                                                                                  Jersey core 2.x
                                                                                                                                                                                                  |jersey2| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -80,87 +80,87 @@ sidebar_label: java-msf4j ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                  • Integer
                                                                                                                                                                                                  • -
                                                                                                                                                                                                  • byte[]
                                                                                                                                                                                                  • +
                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • Double
                                                                                                                                                                                                    • Float
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • Integer
                                                                                                                                                                                                    • Long
                                                                                                                                                                                                    • Object
                                                                                                                                                                                                    • String
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • Double
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                    • +
                                                                                                                                                                                                    • byte[]
                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                    • localvaraccepts
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • synchronized
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • do
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • float
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • while
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • localvarpath
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • protected
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • continue
                                                                                                                                                                                                    • -
                                                                                                                                                                                                    • else
                                                                                                                                                                                                    • +
                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                      • apiclient
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • catch
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • if
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • case
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • new
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • package
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • static
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • void
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • double
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • apiexception
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • assert
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • break
                                                                                                                                                                                                      • byte
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • finally
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • this
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • strictfp
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • throws
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • case
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • catch
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • char
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • class
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • configuration
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • const
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • continue
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • default
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • do
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • double
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • else
                                                                                                                                                                                                      • enum
                                                                                                                                                                                                      • extends
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • null
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • transient
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • apiexception
                                                                                                                                                                                                      • final
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • try
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • object
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • implements
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • private
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • import
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • const
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • configuration
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • finally
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • float
                                                                                                                                                                                                      • for
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • interface
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • long
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • switch
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • default
                                                                                                                                                                                                      • goto
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • public
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • native
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • assert
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • stringutil
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • class
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • break
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • int
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • if
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • implements
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • import
                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • super
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • throw
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • int
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • interface
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvaraccepts
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvarpath
                                                                                                                                                                                                      • localvarpostbody
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • char
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • short
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • long
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • native
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • new
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • null
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • object
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • package
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • private
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • protected
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • public
                                                                                                                                                                                                      • return
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • short
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • static
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • strictfp
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • stringutil
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • super
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • switch
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • synchronized
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • this
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • throw
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • throws
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • transient
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • try
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • void
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                      • +
                                                                                                                                                                                                      • while
                                                                                                                                                                                                      diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index bb16e088e0..8ab96c097d 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -5,71 +5,71 @@ sidebar_label: java-pkmst | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |com.prokarma.pkmst.model| |apiPackage|package for generated api classes| |com.prokarma.pkmst.controller| -|invokerPackage|root package for generated code| |com.prokarma.pkmst.controller| -|groupId|groupId in generated pom.xml| |com.prokarma| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |pkmst-microservice| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |pkmst-microservice| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|basePackage|base package for java source code| |null| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                      **joda**
                                                                                                                                                                                                      Joda (for legacy app only)
                                                                                                                                                                                                      **legacy**
                                                                                                                                                                                                      Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                      **java8-localdatetime**
                                                                                                                                                                                                      Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                      **java8**
                                                                                                                                                                                                      Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                      **threetenbp**
                                                                                                                                                                                                      Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                      |threetenbp| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|eurekaUri|Eureka URI| |null| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |com.prokarma| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |com.prokarma.pkmst.controller| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                      **true**
                                                                                                                                                                                                      Use Java 8 classes such as Base64
                                                                                                                                                                                                      **false**
                                                                                                                                                                                                      Various third party libraries as needed
                                                                                                                                                                                                      |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |com.prokarma.pkmst.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|pkmstInterceptor|PKMST Interceptor| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                      **joda**
                                                                                                                                                                                                      Joda (for legacy app only)
                                                                                                                                                                                                      **legacy**
                                                                                                                                                                                                      Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                      **java8-localdatetime**
                                                                                                                                                                                                      Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                      **java8**
                                                                                                                                                                                                      Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                      **threetenbp**
                                                                                                                                                                                                      Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                      |threetenbp| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                      **true**
                                                                                                                                                                                                      Use Java 8 classes such as Base64
                                                                                                                                                                                                      **false**
                                                                                                                                                                                                      Various third party libraries as needed
                                                                                                                                                                                                      |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                      **true**
                                                                                                                                                                                                      Use a SnapShot Version
                                                                                                                                                                                                      **false**
                                                                                                                                                                                                      Use a Release Version
                                                                                                                                                                                                      |null| -|basePackage|base package for java source code| |null| |serviceName|Service Name| |null| -|title|server title name or client service name| |null| -|eurekaUri|Eureka URI| |null| -|zipkinUri|Zipkin URI| |null| +|snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                      **true**
                                                                                                                                                                                                      Use a SnapShot Version
                                                                                                                                                                                                      **false**
                                                                                                                                                                                                      Use a Release Version
                                                                                                                                                                                                      |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |springBootAdminUri|Spring-Boot URI| |null| -|pkmstInterceptor|PKMST Interceptor| |null| +|title|server title name or client service name| |null| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +|zipkinUri|Zipkin URI| |null| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -82,87 +82,87 @@ sidebar_label: java-pkmst ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                      • Integer
                                                                                                                                                                                                      • -
                                                                                                                                                                                                      • byte[]
                                                                                                                                                                                                      • +
                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                        • +
                                                                                                                                                                                                        • Double
                                                                                                                                                                                                        • Float
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                        • +
                                                                                                                                                                                                        • Integer
                                                                                                                                                                                                        • Long
                                                                                                                                                                                                        • Object
                                                                                                                                                                                                        • String
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • Double
                                                                                                                                                                                                        • +
                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                        • +
                                                                                                                                                                                                        • byte[]
                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                        • localvaraccepts
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • synchronized
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • do
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • float
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • while
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • localvarpath
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • protected
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • continue
                                                                                                                                                                                                        • -
                                                                                                                                                                                                        • else
                                                                                                                                                                                                        • +
                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                          • apiclient
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • localvarqueryparams
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • catch
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • if
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • case
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • new
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • package
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • static
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • void
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • localvaraccept
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • double
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • apiexception
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • apiresponse
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • assert
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • break
                                                                                                                                                                                                          • byte
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • finally
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • this
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • strictfp
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • throws
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • case
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • catch
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • char
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • class
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • const
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • continue
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • default
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • do
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • double
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • else
                                                                                                                                                                                                          • enum
                                                                                                                                                                                                          • extends
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • null
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • transient
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • apiexception
                                                                                                                                                                                                          • final
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • try
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • object
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • localvarcontenttypes
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • implements
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • private
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • import
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • const
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • finally
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • float
                                                                                                                                                                                                          • for
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • apiresponse
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • interface
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • long
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • switch
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • default
                                                                                                                                                                                                          • goto
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • public
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • localvarheaderparams
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • native
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • localvarcontenttype
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • assert
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • stringutil
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • class
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • localvarcollectionqueryparams
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • localvarcookieparams
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • localreturntype
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • localvarformparams
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • break
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • localvarauthnames
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • int
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • if
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • implements
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • import
                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • super
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • throw
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • int
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • interface
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localreturntype
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvaraccept
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvaraccepts
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvarauthnames
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvarcollectionqueryparams
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvarcontenttype
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvarcontenttypes
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvarcookieparams
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvarformparams
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvarheaderparams
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvarpath
                                                                                                                                                                                                          • localvarpostbody
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • char
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • short
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • localvarqueryparams
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • long
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • native
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • new
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • null
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • object
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • package
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • private
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • protected
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • public
                                                                                                                                                                                                          • return
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • short
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • static
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • strictfp
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • stringutil
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • super
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • switch
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • synchronized
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • this
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • throw
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • throws
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • transient
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • try
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • void
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • while
                                                                                                                                                                                                          diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 0cf0804b36..c087518409 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -5,73 +5,73 @@ sidebar_label: java-play-framework | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |apimodels| |apiPackage|package for generated api classes| |controllers| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-playframework| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-playframework| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|basePackage|base package for generated code| |org.openapitools| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|configPackage|configuration package for generated code| |org.openapitools.configuration| +|controllerOnly|Whether to generate only API interface stubs without the server files.| |false| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                          **joda**
                                                                                                                                                                                                          Joda (for legacy app only)
                                                                                                                                                                                                          **legacy**
                                                                                                                                                                                                          Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                          **java8-localdatetime**
                                                                                                                                                                                                          Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                          **java8**
                                                                                                                                                                                                          Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                          **threetenbp**
                                                                                                                                                                                                          Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                          |threetenbp| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|handleExceptions|Add a 'throw exception' to each controller function. Add also a custom error handler where you can put your custom logic| |true| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                          **true**
                                                                                                                                                                                                          Use Java 8 classes such as Base64
                                                                                                                                                                                                          **false**
                                                                                                                                                                                                          Various third party libraries as needed
                                                                                                                                                                                                          |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |apimodels| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |/app| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                          **joda**
                                                                                                                                                                                                          Joda (for legacy app only)
                                                                                                                                                                                                          **legacy**
                                                                                                                                                                                                          Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                          **java8-localdatetime**
                                                                                                                                                                                                          Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                          **java8**
                                                                                                                                                                                                          Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                          **threetenbp**
                                                                                                                                                                                                          Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                          |threetenbp| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                          **true**
                                                                                                                                                                                                          Use Java 8 classes such as Base64
                                                                                                                                                                                                          **false**
                                                                                                                                                                                                          Various third party libraries as needed
                                                                                                                                                                                                          |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                          **true**
                                                                                                                                                                                                          Use a SnapShot Version
                                                                                                                                                                                                          **false**
                                                                                                                                                                                                          Use a Release Version
                                                                                                                                                                                                          |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |/app| |title|server title name or client service name| |openapi-java-playframework| -|configPackage|configuration package for generated code| |org.openapitools.configuration| -|basePackage|base package for generated code| |org.openapitools| -|controllerOnly|Whether to generate only API interface stubs without the server files.| |false| |useBeanValidation|Use BeanValidation API annotations| |true| |useInterfaces|Makes the controllerImp implements an interface to facilitate automatic completion when updating from version x to y of your spec| |true| -|handleExceptions|Add a 'throw exception' to each controller function. Add also a custom error handler where you can put your custom logic| |true| -|wrapCalls|Add a wrapper to each controller function to handle things like metrics, response modification, etc..| |true| |useSwaggerUI|Add a route to /api which show your documentation in swagger-ui. Will also import needed dependencies| |true| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| +|wrapCalls|Add a wrapper to each controller function to handle things like metrics, response modification, etc..| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -84,87 +84,87 @@ sidebar_label: java-play-framework ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                          • Integer
                                                                                                                                                                                                          • -
                                                                                                                                                                                                          • byte[]
                                                                                                                                                                                                          • +
                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            • Double
                                                                                                                                                                                                            • Float
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            • Integer
                                                                                                                                                                                                            • Long
                                                                                                                                                                                                            • Object
                                                                                                                                                                                                            • String
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • Double
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                            • +
                                                                                                                                                                                                            • byte[]
                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                            • localvaraccepts
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • synchronized
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • do
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • float
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • while
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • localvarpath
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • protected
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • continue
                                                                                                                                                                                                            • -
                                                                                                                                                                                                            • else
                                                                                                                                                                                                            • +
                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                              • apiclient
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • localvarqueryparams
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • catch
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • if
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • case
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • new
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • package
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • static
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • void
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • localvaraccept
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • double
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • apiexception
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • apiresponse
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • assert
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • break
                                                                                                                                                                                                              • byte
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • finally
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • this
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • strictfp
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • throws
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • case
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • catch
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • char
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • class
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • configuration
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • const
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • continue
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • default
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • do
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • double
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • else
                                                                                                                                                                                                              • enum
                                                                                                                                                                                                              • extends
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • null
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • transient
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • apiexception
                                                                                                                                                                                                              • final
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • try
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • object
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • localvarcontenttypes
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • implements
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • private
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • import
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • const
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • configuration
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • finally
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • float
                                                                                                                                                                                                              • for
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • apiresponse
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • interface
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • long
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • switch
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • default
                                                                                                                                                                                                              • goto
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • public
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • localvarheaderparams
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • native
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • localvarcontenttype
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • assert
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • stringutil
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • class
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • localvarcollectionqueryparams
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • localvarcookieparams
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • localreturntype
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • localvarformparams
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • break
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • localvarauthnames
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • int
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • if
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • implements
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • import
                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • super
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • throw
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • int
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • interface
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localreturntype
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvaraccept
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvaraccepts
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvarauthnames
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvarcollectionqueryparams
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvarcontenttype
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvarcontenttypes
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvarcookieparams
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvarformparams
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvarheaderparams
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvarpath
                                                                                                                                                                                                              • localvarpostbody
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • char
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • short
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • localvarqueryparams
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • long
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • native
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • new
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • null
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • object
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • package
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • private
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • protected
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • public
                                                                                                                                                                                                              • return
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • short
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • static
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • strictfp
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • stringutil
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • super
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • switch
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • synchronized
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • this
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • throw
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • throws
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • transient
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • try
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • void
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                              • +
                                                                                                                                                                                                              • while
                                                                                                                                                                                                              diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 1325b002fe..3e13225d8d 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -5,64 +5,64 @@ sidebar_label: java-undertow-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|invokerPackage|root package for generated code| |org.openapitools.handler| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-undertow-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-undertow-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                              **joda**
                                                                                                                                                                                                              Joda (for legacy app only)
                                                                                                                                                                                                              **legacy**
                                                                                                                                                                                                              Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                              **java8-localdatetime**
                                                                                                                                                                                                              Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                              **java8**
                                                                                                                                                                                                              Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                              **threetenbp**
                                                                                                                                                                                                              Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                              |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.handler| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                              **true**
                                                                                                                                                                                                              Use Java 8 classes such as Base64
                                                                                                                                                                                                              **false**
                                                                                                                                                                                                              Various third party libraries as needed
                                                                                                                                                                                                              |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |null| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                              **joda**
                                                                                                                                                                                                              Joda (for legacy app only)
                                                                                                                                                                                                              **legacy**
                                                                                                                                                                                                              Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                              **java8-localdatetime**
                                                                                                                                                                                                              Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                              **java8**
                                                                                                                                                                                                              Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                              **threetenbp**
                                                                                                                                                                                                              Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                              |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                              **true**
                                                                                                                                                                                                              Use Java 8 classes such as Base64
                                                                                                                                                                                                              **false**
                                                                                                                                                                                                              Various third party libraries as needed
                                                                                                                                                                                                              |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                              **true**
                                                                                                                                                                                                              Use a SnapShot Version
                                                                                                                                                                                                              **false**
                                                                                                                                                                                                              Use a Release Version
                                                                                                                                                                                                              |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -75,87 +75,87 @@ sidebar_label: java-undertow-server ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                              • Integer
                                                                                                                                                                                                              • -
                                                                                                                                                                                                              • byte[]
                                                                                                                                                                                                              • +
                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • Integer
                                                                                                                                                                                                                • Long
                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                • String
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                • byte[]
                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                • localvaraccepts
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • synchronized
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • do
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • float
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • while
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • localvarpath
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • protected
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                • -
                                                                                                                                                                                                                • else
                                                                                                                                                                                                                • +
                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                  • apiclient
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • localvarqueryparams
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • localvaraccept
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • double
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • apiexception
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • apiresponse
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • assert
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                  • byte
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • strictfp
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • throws
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • configuration
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • double
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                  • enum
                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • apiexception
                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • localvarcontenttypes
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • configuration
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • float
                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • apiresponse
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • long
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                  • goto
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • localvarheaderparams
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • native
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • localvarcontenttype
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • assert
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • stringutil
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • localvarcollectionqueryparams
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • localvarcookieparams
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • localreturntype
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • localvarformparams
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • volatile
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • localvarauthnames
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localreturntype
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvaraccept
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvaraccepts
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvarauthnames
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvarcollectionqueryparams
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvarcontenttype
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvarcontenttypes
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvarcookieparams
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvarformparams
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvarheaderparams
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvarpath
                                                                                                                                                                                                                  • localvarpostbody
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • localvarqueryparams
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • long
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • native
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • strictfp
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • stringutil
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • synchronized
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • throws
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • volatile
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                  diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 4c40dfc2a8..584fae2dc2 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -5,64 +5,64 @@ sidebar_label: java-vertx-web | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.vertxweb.server.model| |apiPackage|package for generated api classes| |org.openapitools.vertxweb.server.api| -|invokerPackage|root package for generated code| |org.openapitools.vertxweb.server| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-web-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-web-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                  **joda**
                                                                                                                                                                                                                  Joda (for legacy app only)
                                                                                                                                                                                                                  **legacy**
                                                                                                                                                                                                                  Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                                  Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                                  Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                                  Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                  |java8| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.vertxweb.server| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                  Use Java 8 classes such as Base64
                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                  Various third party libraries as needed
                                                                                                                                                                                                                  |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.vertxweb.server.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                  **joda**
                                                                                                                                                                                                                  Joda (for legacy app only)
                                                                                                                                                                                                                  **legacy**
                                                                                                                                                                                                                  Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                                  Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                                  Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                                  Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                  |java8| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                  Use Java 8 classes such as Base64
                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                  Various third party libraries as needed
                                                                                                                                                                                                                  |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                  Use a SnapShot Version
                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                  Use a Release Version
                                                                                                                                                                                                                  |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -75,87 +75,87 @@ sidebar_label: java-vertx-web ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                  • Integer
                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                  • byte[]
                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    • Integer
                                                                                                                                                                                                                    • Long
                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                    • byte[]
                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                    • localvaraccepts
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • synchronized
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • float
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • localvarpath
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • protected
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                      • apiclient
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • apiexception
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • assert
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                      • byte
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • strictfp
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • configuration
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                      • enum
                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • apiexception
                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • configuration
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • float
                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • assert
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • stringutil
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvaraccepts
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvarpath
                                                                                                                                                                                                                      • localvarpostbody
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • strictfp
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • stringutil
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • synchronized
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                      diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 4ad79ef3cf..ea93520b0b 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -5,67 +5,67 @@ sidebar_label: java-vertx | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.server.api.model| |apiPackage|package for generated api classes| |org.openapitools.server.api.verticle| -|invokerPackage|root package for generated code| |org.openapitools| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-vertx-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0-SNAPSHOT| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                      **joda**
                                                                                                                                                                                                                      Joda (for legacy app only)
                                                                                                                                                                                                                      **legacy**
                                                                                                                                                                                                                      Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                      **java8-localdatetime**
                                                                                                                                                                                                                      Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                      **java8**
                                                                                                                                                                                                                      Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                      **threetenbp**
                                                                                                                                                                                                                      Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                      |java8| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                      **true**
                                                                                                                                                                                                                      Use Java 8 classes such as Base64
                                                                                                                                                                                                                      **false**
                                                                                                                                                                                                                      Various third party libraries as needed
                                                                                                                                                                                                                      |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.server.api.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|rxInterface|When specified, API interfaces are generated with RX and methods return Single<> and Comparable.| |false| +|rxVersion2|When specified in combination with rxInterface, API interfaces are generated with RxJava2.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                      **joda**
                                                                                                                                                                                                                      Joda (for legacy app only)
                                                                                                                                                                                                                      **legacy**
                                                                                                                                                                                                                      Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                      **java8-localdatetime**
                                                                                                                                                                                                                      Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                      **java8**
                                                                                                                                                                                                                      Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                      **threetenbp**
                                                                                                                                                                                                                      Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                      |java8| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                      **true**
                                                                                                                                                                                                                      Use Java 8 classes such as Base64
                                                                                                                                                                                                                      **false**
                                                                                                                                                                                                                      Various third party libraries as needed
                                                                                                                                                                                                                      |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                      **true**
                                                                                                                                                                                                                      Use a SnapShot Version
                                                                                                                                                                                                                      **false**
                                                                                                                                                                                                                      Use a Release Version
                                                                                                                                                                                                                      |null| -|rxInterface|When specified, API interfaces are generated with RX and methods return Single<> and Comparable.| |false| -|rxVersion2|When specified in combination with rxInterface, API interfaces are generated with RxJava2.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -78,87 +78,87 @@ sidebar_label: java-vertx ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                      • Integer
                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                      • byte[]
                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                        • Integer
                                                                                                                                                                                                                        • Long
                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                        • byte[]
                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                        • localvaraccepts
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • synchronized
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • do
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • while
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • localvarpath
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • protected
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • continue
                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                        • else
                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                          • apiclient
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • localvarqueryparams
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • localvaraccept
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • apiexception
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • apiresponse
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • assert
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • strictfp
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • throws
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • apiexception
                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • localvarcontenttypes
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • apiresponse
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • localvarheaderparams
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • localvarcontenttype
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • assert
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • stringutil
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • localvarcollectionqueryparams
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • localvarcookieparams
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • localreturntype
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • localvarformparams
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • localvarauthnames
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localreturntype
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvaraccept
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvaraccepts
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvarauthnames
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvarcollectionqueryparams
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvarcontenttype
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvarcontenttypes
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvarcookieparams
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvarformparams
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvarheaderparams
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvarpath
                                                                                                                                                                                                                          • localvarpostbody
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • localvarqueryparams
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • strictfp
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • stringutil
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • synchronized
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • throws
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                          diff --git a/docs/generators/java.md b/docs/generators/java.md index 9f8e768824..fddd7ba9ff 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -5,79 +5,79 @@ sidebar_label: java | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.client.model| |apiPackage|package for generated api classes| |org.openapitools.client.api| -|invokerPackage|root package for generated code| |org.openapitools.client| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-java-client| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive. Available on okhttp-gson, jersey2 libraries| |false| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                          **joda**
                                                                                                                                                                                                                          Joda (for legacy app only)
                                                                                                                                                                                                                          **legacy**
                                                                                                                                                                                                                          Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                          **java8-localdatetime**
                                                                                                                                                                                                                          Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                          **java8**
                                                                                                                                                                                                                          Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                          **threetenbp**
                                                                                                                                                                                                                          Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                          |threetenbp| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|feignVersion|Version of OpenFeign: '10.x', '9.x' (default)| |false| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.client| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                          **true**
                                                                                                                                                                                                                          Use Java 8 classes such as Base64
                                                                                                                                                                                                                          **false**
                                                                                                                                                                                                                          Various third party libraries as needed
                                                                                                                                                                                                                          |false| +|library|library template (sub-template) to use|
                                                                                                                                                                                                                          **jersey1**
                                                                                                                                                                                                                          HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
                                                                                                                                                                                                                          **jersey2**
                                                                                                                                                                                                                          HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **feign**
                                                                                                                                                                                                                          HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.9.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'
                                                                                                                                                                                                                          **okhttp-gson**
                                                                                                                                                                                                                          [DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
                                                                                                                                                                                                                          **retrofit**
                                                                                                                                                                                                                          HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
                                                                                                                                                                                                                          **retrofit2**
                                                                                                                                                                                                                          HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
                                                                                                                                                                                                                          **resttemplate**
                                                                                                                                                                                                                          HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **webclient**
                                                                                                                                                                                                                          HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **resteasy**
                                                                                                                                                                                                                          HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **vertx**
                                                                                                                                                                                                                          HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **google-api-client**
                                                                                                                                                                                                                          HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **rest-assured**
                                                                                                                                                                                                                          HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.9.x. Only for Java8
                                                                                                                                                                                                                          **native**
                                                                                                                                                                                                                          HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
                                                                                                                                                                                                                          **microprofile**
                                                                                                                                                                                                                          HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          |okhttp-gson| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.client.model| +|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|performBeanValidation|Perform BeanValidation| |false| +|playVersion|Version of Play! Framework (possible values "play24", "play25" (default), "play26")| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                          **joda**
                                                                                                                                                                                                                          Joda (for legacy app only)
                                                                                                                                                                                                                          **legacy**
                                                                                                                                                                                                                          Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                          **java8-localdatetime**
                                                                                                                                                                                                                          Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                          **java8**
                                                                                                                                                                                                                          Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                          **threetenbp**
                                                                                                                                                                                                                          Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                          |threetenbp| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                          **true**
                                                                                                                                                                                                                          Use Java 8 classes such as Base64
                                                                                                                                                                                                                          **false**
                                                                                                                                                                                                                          Various third party libraries as needed
                                                                                                                                                                                                                          |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serializationLibrary|Serialization library, default depends from the library|
                                                                                                                                                                                                                          **jackson**
                                                                                                                                                                                                                          Use Jackson as serialization library
                                                                                                                                                                                                                          **gson**
                                                                                                                                                                                                                          Use Gson as serialization library
                                                                                                                                                                                                                          |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                          **true**
                                                                                                                                                                                                                          Use a SnapShot Version
                                                                                                                                                                                                                          **false**
                                                                                                                                                                                                                          Use a Release Version
                                                                                                                                                                                                                          |null| -|useRxJava|Whether to use the RxJava adapter with the retrofit2 library.| |false| -|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library.| |false| -|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false| -|usePlayWS|Use Play! Async HTTP client (Play WS API)| |false| -|playVersion|Version of Play! Framework (possible values "play24", "play25" (default), "play26")| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |supportJava6|Whether to support Java6 with the Jersey1 library.| |false| |useBeanValidation|Use BeanValidation API annotations| |false| -|performBeanValidation|Perform BeanValidation| |false| |useGzipFeature|Send gzip-encoded requests| |false| -|useRuntimeException|Use RuntimeException instead of Exception| |false| -|feignVersion|Version of OpenFeign: '10.x', '9.x' (default)| |false| +|usePlayWS|Use Play! Async HTTP client (Play WS API)| |false| |useReflectionEqualsHashCode|Use org.apache.commons.lang3.builder for equals and hashCode in the models. WARNING: This will fail under a security manager, unless the appropriate permissions are set up correctly and also there's potential performance impact.| |false| -|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive. Available on okhttp-gson, jersey2 libraries| |false| -|library|library template (sub-template) to use|
                                                                                                                                                                                                                          **jersey1**
                                                                                                                                                                                                                          HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.
                                                                                                                                                                                                                          **jersey2**
                                                                                                                                                                                                                          HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **feign**
                                                                                                                                                                                                                          HTTP client: OpenFeign 9.x or 10.x. JSON processing: Jackson 2.9.x. To enable OpenFeign 10.x, set the 'feignVersion' option to '10.x'
                                                                                                                                                                                                                          **okhttp-gson**
                                                                                                                                                                                                                          [DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
                                                                                                                                                                                                                          **retrofit**
                                                                                                                                                                                                                          HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.
                                                                                                                                                                                                                          **retrofit2**
                                                                                                                                                                                                                          HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)
                                                                                                                                                                                                                          **resttemplate**
                                                                                                                                                                                                                          HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **webclient**
                                                                                                                                                                                                                          HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **resteasy**
                                                                                                                                                                                                                          HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **vertx**
                                                                                                                                                                                                                          HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **google-api-client**
                                                                                                                                                                                                                          HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          **rest-assured**
                                                                                                                                                                                                                          HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.9.x. Only for Java8
                                                                                                                                                                                                                          **native**
                                                                                                                                                                                                                          HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
                                                                                                                                                                                                                          **microprofile**
                                                                                                                                                                                                                          HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x
                                                                                                                                                                                                                          |okhttp-gson| -|serializationLibrary|Serialization library, default depends from the library|
                                                                                                                                                                                                                          **jackson**
                                                                                                                                                                                                                          Use Jackson as serialization library
                                                                                                                                                                                                                          **gson**
                                                                                                                                                                                                                          Use Gson as serialization library
                                                                                                                                                                                                                          |null| +|useRuntimeException|Use RuntimeException instead of Exception| |false| +|useRxJava|Whether to use the RxJava adapter with the retrofit2 library.| |false| +|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library.| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -90,87 +90,87 @@ sidebar_label: java ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                          • Integer
                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                          • byte[]
                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • Integer
                                                                                                                                                                                                                            • Long
                                                                                                                                                                                                                            • Object
                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                            • byte[]
                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                            • localvaraccepts
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • synchronized
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • localvarpath
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • protected
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                              • apiclient
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • localvarqueryparams
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • localvaraccept
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • apiexception
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • apiresponse
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • assert
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                              • byte
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • strictfp
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • throws
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • configuration
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                              • enum
                                                                                                                                                                                                                              • extends
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • apiexception
                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • localvarcontenttypes
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • configuration
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • float
                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • apiresponse
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • localvarheaderparams
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • localvarcontenttype
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • assert
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • stringutil
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • localvarcollectionqueryparams
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • localvarcookieparams
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • localreturntype
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • localvarformparams
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • localvarauthnames
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localreturntype
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvaraccept
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvaraccepts
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvarauthnames
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvarcollectionqueryparams
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvarcontenttype
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvarcontenttypes
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvarcookieparams
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvarformparams
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvarheaderparams
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvarpath
                                                                                                                                                                                                                              • localvarpostbody
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • localvarqueryparams
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • strictfp
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • stringutil
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • synchronized
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • throws
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                              diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md index 33cb0cde47..0308a0a824 100644 --- a/docs/generators/javascript-closure-angular.md +++ b/docs/generators/javascript-closure-angular.md @@ -5,12 +5,12 @@ sidebar_label: javascript-closure-angular | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |useEs6|use ES6 templates| |false| ## IMPORT MAPPING @@ -28,58 +28,58 @@ sidebar_label: javascript-closure-angular ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                              • number
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • Blob
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • string
                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                              • Object
                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                • Blob
                                                                                                                                                                                                                                • Date
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • number
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                • string
                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                • implements
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • synchronized
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • private
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • import
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • const
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • for
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • do
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • interface
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • switch
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • default
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • goto
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • protected
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • public
                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                  • assert
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • byte
                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • double
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • enum
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • goto
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • double
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • byte
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • throws
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • enum
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • synchronized
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • throws
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                  diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 653f03e948..0946f51912 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -5,17 +5,17 @@ sidebar_label: javascript-flowtyped | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| ## IMPORT MAPPING @@ -35,101 +35,101 @@ sidebar_label: javascript-flowtyped ## LANGUAGE PRIMITIVES
                                                                                                                                                                                                                                  • Array
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • number
                                                                                                                                                                                                                                  • Blob
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • string
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • Object
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • File
                                                                                                                                                                                                                                  • Date
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • File
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • Object
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • number
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                  • string
                                                                                                                                                                                                                                  ## RESERVED WORDS -
                                                                                                                                                                                                                                  • date
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • synchronized
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • requestoptions
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • debugger
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • isfinite
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • float
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • hasownproperty
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • number
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • function
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • let
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • nan
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • export
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                  • in
                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                    • abstract
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • arguments
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • array
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • break
                                                                                                                                                                                                                                    • byte
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • case
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • catch
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • char
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • class
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • const
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • date
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • debugger
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • default
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • delete
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                    • double
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • var
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • finally
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • this
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • isprototypeof
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • throws
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • formparams
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                    • enum
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • headerparams
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • varlocaldeferred
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • useformdata
                                                                                                                                                                                                                                    • eval
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • export
                                                                                                                                                                                                                                    • extends
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • null
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • transient
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • false
                                                                                                                                                                                                                                    • final
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • finally
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • float
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • for
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • formparams
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • function
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • goto
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • hasownproperty
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • headerparams
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • if
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • implements
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • import
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • in
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • infinity
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • instanceof
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • int
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • interface
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • isfinite
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • isnan
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • isprototypeof
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • let
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • long
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • math
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • nan
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • native
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • new
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • null
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • number
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • object
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • package
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • private
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • protected
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • prototype
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • public
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • queryparameters
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • requestoptions
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • return
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • short
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • static
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • string
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • super
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • switch
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • synchronized
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • this
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • throw
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • throws
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • tostring
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • transient
                                                                                                                                                                                                                                    • true
                                                                                                                                                                                                                                    • try
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • math
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • varlocalpath
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • object
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • implements
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • private
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • const
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • import
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • string
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • queryparameters
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • valueof
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • for
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • interface
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • isnan
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • delete
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • long
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • switch
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • undefined
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • default
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • goto
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • public
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • native
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • array
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • yield
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • class
                                                                                                                                                                                                                                    • typeof
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • break
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • false
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • undefined
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • useformdata
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • valueof
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • var
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • varlocaldeferred
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • varlocalpath
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • void
                                                                                                                                                                                                                                    • volatile
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • abstract
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • prototype
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • int
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • instanceof
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • super
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                    • with
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • throw
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • char
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • short
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • arguments
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • infinity
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • tostring
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • return
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • yield
                                                                                                                                                                                                                                    diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md index d591782d5d..7064b4a287 100644 --- a/docs/generators/javascript.md +++ b/docs/generators/javascript.md @@ -5,28 +5,28 @@ sidebar_label: javascript | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|sourceFolder|source folder for generated code| |src| -|invokerPackage|root package for generated code| |null| |apiPackage|package for generated api classes| |null| -|modelPackage|package for generated models| |null| -|projectName|name of the project (Default: generated from info.title or "openapi-js-client")| |null| -|moduleName|module name for AMD, Node or globals (Default: generated from <projectName>)| |null| -|projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null| -|projectVersion|version of the project (Default: using info.version or "1.0.0")| |null| -|licenseName|name of the license the project uses (Default: using info.license.name)| |null| -|usePromises|use Promises as return values from the client API, instead of superagent callbacks| |false| -|emitModelMethods|generate getters and setters for model properties| |false| |emitJSDoc|generate JSDoc comments| |true| -|useInheritance|use JavaScript prototype chains & delegation for inheritance| |true| +|emitModelMethods|generate getters and setters for model properties| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|useES6|use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.| |true| +|invokerPackage|root package for generated code| |null| +|licenseName|name of the license the project uses (Default: using info.license.name)| |null| +|modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|moduleName|module name for AMD, Node or globals (Default: generated from <projectName>)| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|projectDescription|description of the project (Default: using info.description or "Client library of <projectName>")| |null| +|projectName|name of the project (Default: generated from info.title or "openapi-js-client")| |null| +|projectVersion|version of the project (Default: using info.version or "1.0.0")| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src| +|useES6|use JavaScript ES6 (ECMAScript 6) (beta). Default is ES6.| |true| +|useInheritance|use JavaScript prototype chains & delegation for inheritance| |true| +|usePromises|use Promises as return values from the client API, instead of superagent callbacks| |false| ## IMPORT MAPPING @@ -47,93 +47,93 @@ sidebar_label: javascript
                                                                                                                                                                                                                                    • Array
                                                                                                                                                                                                                                    • Blob
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • Date
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                    • File
                                                                                                                                                                                                                                    • Number
                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • File
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • Date
                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                    • date
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • synchronized
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • debugger
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • isfinite
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • float
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • hasownproperty
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • number
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • protected
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • function
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • let
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • nan
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • catch
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • export
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • if
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • case
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • new
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • package
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • static
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • void
                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                    • in
                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • arguments
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • array
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                      • byte
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • date
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • debugger
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • delete
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • isprototypeof
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                      • enum
                                                                                                                                                                                                                                      • eval
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • export
                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • float
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • function
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • hasownproperty
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • in
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • infinity
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • isfinite
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • isnan
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • isprototypeof
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • let
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • math
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • nan
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • number
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • prototype
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • string
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • synchronized
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • tostring
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • math
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • string
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • valueof
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • isnan
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • delete
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • undefined
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • array
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                      • typeof
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • undefined
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • valueof
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • prototype
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                      • with
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • arguments
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • infinity
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • tostring
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                      diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index d9cad8eca2..0842a00cce 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -5,75 +5,74 @@ sidebar_label: jaxrs-cxf-cdi | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-cxf-cdi-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-cxf-cdi-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                      **joda**
                                                                                                                                                                                                                                      Joda (for legacy app only)
                                                                                                                                                                                                                                      **legacy**
                                                                                                                                                                                                                                      Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                      **java8-localdatetime**
                                                                                                                                                                                                                                      Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                      **java8**
                                                                                                                                                                                                                                      Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                      **threetenbp**
                                                                                                                                                                                                                                      Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                      |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generatePom|Whether to generate pom.xml if the file does not already exist.| |true| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                      **true**
                                                                                                                                                                                                                                      Use Java 8 classes such as Base64
                                                                                                                                                                                                                                      **false**
                                                                                                                                                                                                                                      Various third party libraries as needed
                                                                                                                                                                                                                                      |false| +|library|library template (sub-template)|
                                                                                                                                                                                                                                      **<default>**
                                                                                                                                                                                                                                      JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
                                                                                                                                                                                                                                      **quarkus**
                                                                                                                                                                                                                                      Server using Quarkus
                                                                                                                                                                                                                                      **thorntail**
                                                                                                                                                                                                                                      Server using Thorntail
                                                                                                                                                                                                                                      **openliberty**
                                                                                                                                                                                                                                      Server using Open Liberty
                                                                                                                                                                                                                                      **helidon**
                                                                                                                                                                                                                                      Server using Helidon
                                                                                                                                                                                                                                      |<default>| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/gen/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                      **joda**
                                                                                                                                                                                                                                      Joda (for legacy app only)
                                                                                                                                                                                                                                      **legacy**
                                                                                                                                                                                                                                      Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                      **java8-localdatetime**
                                                                                                                                                                                                                                      Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                      **java8**
                                                                                                                                                                                                                                      Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                      **threetenbp**
                                                                                                                                                                                                                                      Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                      |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                      **true**
                                                                                                                                                                                                                                      Use Java 8 classes such as Base64
                                                                                                                                                                                                                                      **false**
                                                                                                                                                                                                                                      Various third party libraries as needed
                                                                                                                                                                                                                                      |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                      **true**
                                                                                                                                                                                                                                      Use a SnapShot Version
                                                                                                                                                                                                                                      **false**
                                                                                                                                                                                                                                      Use a Release Version
                                                                                                                                                                                                                                      |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/gen/java| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|library|library template (sub-template)|
                                                                                                                                                                                                                                      **<default>**
                                                                                                                                                                                                                                      JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
                                                                                                                                                                                                                                      **quarkus**
                                                                                                                                                                                                                                      Server using Quarkus
                                                                                                                                                                                                                                      **thorntail**
                                                                                                                                                                                                                                      Server using Thorntail
                                                                                                                                                                                                                                      **openliberty**
                                                                                                                                                                                                                                      Server using Open Liberty
                                                                                                                                                                                                                                      **helidon**
                                                                                                                                                                                                                                      Server using Helidon
                                                                                                                                                                                                                                      |<default>| -|generatePom|Whether to generate pom.xml if the file does not already exist.| |true| -|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| -|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| -|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null| -|useBeanValidation|Use BeanValidation API annotations| |true| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -86,87 +85,87 @@ sidebar_label: jaxrs-cxf-cdi ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                      • Integer
                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                      • byte[]
                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                        • Integer
                                                                                                                                                                                                                                        • Long
                                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                        • byte[]
                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                        • localvaraccepts
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • synchronized
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • do
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • while
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • localvarpath
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • protected
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • continue
                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                        • else
                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                          • apiclient
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • localvarqueryparams
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • localvaraccept
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • apiexception
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • apiresponse
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • assert
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • strictfp
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • throws
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • apiexception
                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • localvarcontenttypes
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • apiresponse
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • localvarheaderparams
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • localvarcontenttype
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • assert
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • stringutil
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • localvarcollectionqueryparams
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • localvarcookieparams
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • localreturntype
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • localvarformparams
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • localvarauthnames
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localreturntype
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvaraccept
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvaraccepts
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvarauthnames
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvarcollectionqueryparams
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvarcontenttype
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvarcontenttypes
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvarcookieparams
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvarformparams
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvarheaderparams
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvarpath
                                                                                                                                                                                                                                          • localvarpostbody
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • localvarqueryparams
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • strictfp
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • stringutil
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • synchronized
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • throws
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                          diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 05d97cd950..713ef85478 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -5,68 +5,68 @@ sidebar_label: jaxrs-cxf-client | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-client| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-client| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                          **joda**
                                                                                                                                                                                                                                          Joda (for legacy app only)
                                                                                                                                                                                                                                          **legacy**
                                                                                                                                                                                                                                          Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                          **java8-localdatetime**
                                                                                                                                                                                                                                          Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                          **java8**
                                                                                                                                                                                                                                          Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                          **threetenbp**
                                                                                                                                                                                                                                          Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                          |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                          **true**
                                                                                                                                                                                                                                          Use Java 8 classes such as Base64
                                                                                                                                                                                                                                          **false**
                                                                                                                                                                                                                                          Various third party libraries as needed
                                                                                                                                                                                                                                          |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/gen/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                          **joda**
                                                                                                                                                                                                                                          Joda (for legacy app only)
                                                                                                                                                                                                                                          **legacy**
                                                                                                                                                                                                                                          Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                          **java8-localdatetime**
                                                                                                                                                                                                                                          Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                          **java8**
                                                                                                                                                                                                                                          Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                          **threetenbp**
                                                                                                                                                                                                                                          Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                          |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                          **true**
                                                                                                                                                                                                                                          Use Java 8 classes such as Base64
                                                                                                                                                                                                                                          **false**
                                                                                                                                                                                                                                          Various third party libraries as needed
                                                                                                                                                                                                                                          |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                          **true**
                                                                                                                                                                                                                                          Use a SnapShot Version
                                                                                                                                                                                                                                          **false**
                                                                                                                                                                                                                                          Use a Release Version
                                                                                                                                                                                                                                          |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/gen/java| |useBeanValidation|Use BeanValidation API annotations| |false| +|useGenericResponse|Use generic response| |false| |useGzipFeatureForTests|Use Gzip Feature for tests| |false| |useLoggingFeatureForTests|Use Logging Feature for tests| |false| -|useGenericResponse|Use generic response| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -79,87 +79,87 @@ sidebar_label: jaxrs-cxf-client ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                          • Integer
                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                          • byte[]
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            • Integer
                                                                                                                                                                                                                                            • Long
                                                                                                                                                                                                                                            • Object
                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                            • byte[]
                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                            • localvaraccepts
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • synchronized
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • localvarpath
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • protected
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                              • apiclient
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • localvarqueryparams
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • localvaraccept
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • apiexception
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • apiresponse
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • assert
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                              • byte
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • strictfp
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • throws
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • configuration
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                              • enum
                                                                                                                                                                                                                                              • extends
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • apiexception
                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • localvarcontenttypes
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • configuration
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • float
                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • apiresponse
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • localvarheaderparams
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • localvarcontenttype
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • assert
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • stringutil
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • localvarcollectionqueryparams
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • localvarcookieparams
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • localreturntype
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • localvarformparams
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • localvarauthnames
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localreturntype
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvaraccept
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvaraccepts
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvarauthnames
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvarcollectionqueryparams
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvarcontenttype
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvarcontenttypes
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvarcookieparams
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvarformparams
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvarheaderparams
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvarpath
                                                                                                                                                                                                                                              • localvarpostbody
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • localvarqueryparams
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • strictfp
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • stringutil
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • synchronized
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • throws
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                              diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 6811098135..14e8995141 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -5,90 +5,90 @@ sidebar_label: jaxrs-cxf-extended | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                              **joda**
                                                                                                                                                                                                                                              Joda (for legacy app only)
                                                                                                                                                                                                                                              **legacy**
                                                                                                                                                                                                                                              Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                              **java8-localdatetime**
                                                                                                                                                                                                                                              Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                              **java8**
                                                                                                                                                                                                                                              Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                              **threetenbp**
                                                                                                                                                                                                                                              Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                              |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| +|generateNonSpringApplication|Generate non-Spring application| |false| +|generateOperationBody|Generate fully functional operation bodies| |false| +|generateSpringApplication|Generate Spring application| |false| +|generateSpringBootApplication|Generate Spring Boot application| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                              **true**
                                                                                                                                                                                                                                              Use Java 8 classes such as Base64
                                                                                                                                                                                                                                              **false**
                                                                                                                                                                                                                                              Various third party libraries as needed
                                                                                                                                                                                                                                              |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|loadTestDataFromFile|Load test data from a generated JSON file| |false| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                              **joda**
                                                                                                                                                                                                                                              Joda (for legacy app only)
                                                                                                                                                                                                                                              **legacy**
                                                                                                                                                                                                                                              Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                              **java8-localdatetime**
                                                                                                                                                                                                                                              Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                              **java8**
                                                                                                                                                                                                                                              Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                              **threetenbp**
                                                                                                                                                                                                                                              Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                              |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                              **true**
                                                                                                                                                                                                                                              Use Java 8 classes such as Base64
                                                                                                                                                                                                                                              **false**
                                                                                                                                                                                                                                              Various third party libraries as needed
                                                                                                                                                                                                                                              |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                              **true**
                                                                                                                                                                                                                                              Use a SnapShot Version
                                                                                                                                                                                                                                              **false**
                                                                                                                                                                                                                                              Use a Release Version
                                                                                                                                                                                                                                              |null| -|implFolder|folder for generated implementation code| |src/main/java| -|title|a title describing the application| |OpenAPI Server| -|useBeanValidation|Use BeanValidation API annotations| |true| |serverPort|The port on which the server should be started| |8080| -|generateSpringApplication|Generate Spring application| |false| +|snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                              **true**
                                                                                                                                                                                                                                              Use a SnapShot Version
                                                                                                                                                                                                                                              **false**
                                                                                                                                                                                                                                              Use a Release Version
                                                                                                                                                                                                                                              |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| +|supportMultipleSpringServices|Support generation of Spring services from multiple specifications| |false| +|testDataControlFile|JSON file to control test data generation| |null| +|testDataFile|JSON file to contain generated test data| |null| +|title|a title describing the application| |OpenAPI Server| +|useAnnotatedBasePath|Use @Path annotations for basePath| |false| +|useBeanValidation|Use BeanValidation API annotations| |true| +|useBeanValidationFeature|Use BeanValidation Feature| |false| +|useGenericResponse|Use generic response| |false| +|useGzipFeature|Use Gzip Feature| |false| +|useGzipFeatureForTests|Use Gzip Feature for tests| |false| +|useLoggingFeature|Use Logging Feature| |false| +|useLoggingFeatureForTests|Use Logging Feature for tests| |false| +|useMultipartFeature|Use Multipart Feature| |false| |useSpringAnnotationConfig|Use Spring Annotation Config| |false| |useSwaggerFeature|Use Swagger Feature| |false| |useSwaggerUI|Use Swagger UI| |false| |useWadlFeature|Use WADL Feature| |false| -|useMultipartFeature|Use Multipart Feature| |false| -|useGzipFeature|Use Gzip Feature| |false| -|useGzipFeatureForTests|Use Gzip Feature for tests| |false| -|useBeanValidationFeature|Use BeanValidation Feature| |false| -|useLoggingFeature|Use Logging Feature| |false| -|useLoggingFeatureForTests|Use Logging Feature for tests| |false| -|generateSpringBootApplication|Generate Spring Boot application| |false| -|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| -|addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| -|useAnnotatedBasePath|Use @Path annotations for basePath| |false| -|generateNonSpringApplication|Generate non-Spring application| |false| -|useGenericResponse|Use generic response| |false| -|supportMultipleSpringServices|Support generation of Spring services from multiple specifications| |false| -|generateOperationBody|Generate fully functional operation bodies| |false| -|loadTestDataFromFile|Load test data from a generated JSON file| |false| -|testDataFile|JSON file to contain generated test data| |null| -|testDataControlFile|JSON file to control test data generation| |null| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -101,87 +101,87 @@ sidebar_label: jaxrs-cxf-extended ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                              • Integer
                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                              • byte[]
                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                • Integer
                                                                                                                                                                                                                                                • Long
                                                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                                                • String
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                • byte[]
                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                • localvaraccepts
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • synchronized
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • do
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • float
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • localvarpath
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • protected
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                • else
                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                  • apiclient
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • localvarqueryparams
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • localvaraccept
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • double
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • apiexception
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • apiresponse
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • assert
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                  • byte
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • strictfp
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • throws
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • configuration
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • double
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                  • enum
                                                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • apiexception
                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • localvarcontenttypes
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • configuration
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • float
                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • apiresponse
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • long
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                  • goto
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • localvarheaderparams
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • native
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • localvarcontenttype
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • assert
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • stringutil
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • localvarcollectionqueryparams
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • localvarcookieparams
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • localreturntype
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • localvarformparams
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • volatile
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • localvarauthnames
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localreturntype
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvaraccept
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvaraccepts
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvarauthnames
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvarcollectionqueryparams
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvarcontenttype
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvarcontenttypes
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvarcookieparams
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvarformparams
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvarheaderparams
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvarpath
                                                                                                                                                                                                                                                  • localvarpostbody
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • localvarqueryparams
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • long
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • native
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • strictfp
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • stringutil
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • synchronized
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • throws
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • volatile
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                  diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 515319a26e..1fc41f7b17 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -5,85 +5,85 @@ sidebar_label: jaxrs-cxf | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-cxf-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                  **joda**
                                                                                                                                                                                                                                                  Joda (for legacy app only)
                                                                                                                                                                                                                                                  **legacy**
                                                                                                                                                                                                                                                  Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                                                                  Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                                                                  Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                                                                  Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                  |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| +|generateNonSpringApplication|Generate non-Spring application| |false| +|generateSpringApplication|Generate Spring application| |false| +|generateSpringBootApplication|Generate Spring Boot application| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                  Use Java 8 classes such as Base64
                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                  Various third party libraries as needed
                                                                                                                                                                                                                                                  |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                  **joda**
                                                                                                                                                                                                                                                  Joda (for legacy app only)
                                                                                                                                                                                                                                                  **legacy**
                                                                                                                                                                                                                                                  Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                                                                  Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                                                                  Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                                                                  Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                  |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                  Use Java 8 classes such as Base64
                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                  Various third party libraries as needed
                                                                                                                                                                                                                                                  |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                  Use a SnapShot Version
                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                  Use a Release Version
                                                                                                                                                                                                                                                  |null| -|implFolder|folder for generated implementation code| |src/main/java| -|title|a title describing the application| |OpenAPI Server| -|useBeanValidation|Use BeanValidation API annotations| |true| |serverPort|The port on which the server should be started| |8080| -|generateSpringApplication|Generate Spring application| |false| +|snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                  Use a SnapShot Version
                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                  Use a Release Version
                                                                                                                                                                                                                                                  |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| +|title|a title describing the application| |OpenAPI Server| +|useAnnotatedBasePath|Use @Path annotations for basePath| |false| +|useBeanValidation|Use BeanValidation API annotations| |true| +|useBeanValidationFeature|Use BeanValidation Feature| |false| +|useGenericResponse|Use generic response| |false| +|useGzipFeature|Use Gzip Feature| |false| +|useGzipFeatureForTests|Use Gzip Feature for tests| |false| +|useLoggingFeature|Use Logging Feature| |false| +|useLoggingFeatureForTests|Use Logging Feature for tests| |false| +|useMultipartFeature|Use Multipart Feature| |false| |useSpringAnnotationConfig|Use Spring Annotation Config| |false| |useSwaggerFeature|Use Swagger Feature| |false| |useSwaggerUI|Use Swagger UI| |false| |useWadlFeature|Use WADL Feature| |false| -|useMultipartFeature|Use Multipart Feature| |false| -|useGzipFeature|Use Gzip Feature| |false| -|useGzipFeatureForTests|Use Gzip Feature for tests| |false| -|useBeanValidationFeature|Use BeanValidation Feature| |false| -|useLoggingFeature|Use Logging Feature| |false| -|useLoggingFeatureForTests|Use Logging Feature for tests| |false| -|generateSpringBootApplication|Generate Spring Boot application| |false| -|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| -|addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| -|useAnnotatedBasePath|Use @Path annotations for basePath| |false| -|generateNonSpringApplication|Generate non-Spring application| |false| -|useGenericResponse|Use generic response| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -96,87 +96,87 @@ sidebar_label: jaxrs-cxf ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                  • Integer
                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                  • byte[]
                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • Integer
                                                                                                                                                                                                                                                    • Long
                                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                    • byte[]
                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                    • localvaraccepts
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • synchronized
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • float
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • localvarpath
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • protected
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                      • apiclient
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • apiexception
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • assert
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                      • byte
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • strictfp
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • configuration
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                      • enum
                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • apiexception
                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • configuration
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • float
                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • assert
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • stringutil
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvaraccepts
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvarpath
                                                                                                                                                                                                                                                      • localvarpostbody
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • strictfp
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • stringutil
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • synchronized
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                      diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index d930e4c079..d1851341f6 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -5,71 +5,71 @@ sidebar_label: jaxrs-jersey | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                      **joda**
                                                                                                                                                                                                                                                      Joda (for legacy app only)
                                                                                                                                                                                                                                                      **legacy**
                                                                                                                                                                                                                                                      Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                      **java8-localdatetime**
                                                                                                                                                                                                                                                      Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                      **java8**
                                                                                                                                                                                                                                                      Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                      **threetenbp**
                                                                                                                                                                                                                                                      Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                      |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                      **true**
                                                                                                                                                                                                                                                      Use Java 8 classes such as Base64
                                                                                                                                                                                                                                                      **false**
                                                                                                                                                                                                                                                      Various third party libraries as needed
                                                                                                                                                                                                                                                      |false| +|library|library template (sub-template)|
                                                                                                                                                                                                                                                      **jersey1**
                                                                                                                                                                                                                                                      Jersey core 1.x
                                                                                                                                                                                                                                                      **jersey2**
                                                                                                                                                                                                                                                      Jersey core 2.x
                                                                                                                                                                                                                                                      |jersey2| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                      **joda**
                                                                                                                                                                                                                                                      Joda (for legacy app only)
                                                                                                                                                                                                                                                      **legacy**
                                                                                                                                                                                                                                                      Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                      **java8-localdatetime**
                                                                                                                                                                                                                                                      Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                      **java8**
                                                                                                                                                                                                                                                      Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                      **threetenbp**
                                                                                                                                                                                                                                                      Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                      |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                      **true**
                                                                                                                                                                                                                                                      Use Java 8 classes such as Base64
                                                                                                                                                                                                                                                      **false**
                                                                                                                                                                                                                                                      Various third party libraries as needed
                                                                                                                                                                                                                                                      |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                                      **true**
                                                                                                                                                                                                                                                      Use a SnapShot Version
                                                                                                                                                                                                                                                      **false**
                                                                                                                                                                                                                                                      Use a Release Version
                                                                                                                                                                                                                                                      |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| +|supportJava6|Whether to support Java6 with the Jersey1/2 library.| |false| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|library|library template (sub-template)|
                                                                                                                                                                                                                                                      **jersey1**
                                                                                                                                                                                                                                                      Jersey core 1.x
                                                                                                                                                                                                                                                      **jersey2**
                                                                                                                                                                                                                                                      Jersey core 2.x
                                                                                                                                                                                                                                                      |jersey2| -|supportJava6|Whether to support Java6 with the Jersey1/2 library.| |false| |useTags|use tags for creating interface and controller classnames| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -82,87 +82,87 @@ sidebar_label: jaxrs-jersey ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                      • Integer
                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                      • byte[]
                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • Integer
                                                                                                                                                                                                                                                        • Long
                                                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                        • byte[]
                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                        • localvaraccepts
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • synchronized
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • do
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • while
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • localvarpath
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • protected
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • continue
                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                        • else
                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                          • apiclient
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • localvarqueryparams
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • localvaraccept
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • apiexception
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • apiresponse
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • assert
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • strictfp
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • throws
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • apiexception
                                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • localvarcontenttypes
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • apiresponse
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • localvarheaderparams
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • localvarcontenttype
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • assert
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • stringutil
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • localvarcollectionqueryparams
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • localvarcookieparams
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • localreturntype
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • localvarformparams
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • localvarauthnames
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localreturntype
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvaraccept
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvaraccepts
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvarauthnames
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvarcollectionqueryparams
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvarcontenttype
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvarcontenttypes
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvarcookieparams
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvarformparams
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvarheaderparams
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvarpath
                                                                                                                                                                                                                                                          • localvarpostbody
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • localvarqueryparams
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • strictfp
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • stringutil
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • synchronized
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • throws
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                          diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 905c30e52f..378769bd75 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -5,71 +5,70 @@ sidebar_label: jaxrs-resteasy-eap | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-eap-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-eap-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                          **joda**
                                                                                                                                                                                                                                                          Joda (for legacy app only)
                                                                                                                                                                                                                                                          **legacy**
                                                                                                                                                                                                                                                          Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                          **java8-localdatetime**
                                                                                                                                                                                                                                                          Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                          **java8**
                                                                                                                                                                                                                                                          Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                          **threetenbp**
                                                                                                                                                                                                                                                          Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                          |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |true| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                          **true**
                                                                                                                                                                                                                                                          Use Java 8 classes such as Base64
                                                                                                                                                                                                                                                          **false**
                                                                                                                                                                                                                                                          Various third party libraries as needed
                                                                                                                                                                                                                                                          |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                          **joda**
                                                                                                                                                                                                                                                          Joda (for legacy app only)
                                                                                                                                                                                                                                                          **legacy**
                                                                                                                                                                                                                                                          Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                          **java8-localdatetime**
                                                                                                                                                                                                                                                          Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                          **java8**
                                                                                                                                                                                                                                                          Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                          **threetenbp**
                                                                                                                                                                                                                                                          Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                          |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                          **true**
                                                                                                                                                                                                                                                          Use Java 8 classes such as Base64
                                                                                                                                                                                                                                                          **false**
                                                                                                                                                                                                                                                          Various third party libraries as needed
                                                                                                                                                                                                                                                          |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                                          **true**
                                                                                                                                                                                                                                                          Use a SnapShot Version
                                                                                                                                                                                                                                                          **false**
                                                                                                                                                                                                                                                          Use a Release Version
                                                                                                                                                                                                                                                          |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|useBeanValidation|Use BeanValidation API annotations| |true| -|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |true| |useSwaggerFeature|Use dynamic Swagger generator| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -82,87 +81,87 @@ sidebar_label: jaxrs-resteasy-eap ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                          • Integer
                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                          • byte[]
                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                            • Integer
                                                                                                                                                                                                                                                            • Long
                                                                                                                                                                                                                                                            • Object
                                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                            • byte[]
                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                            • localvaraccepts
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • synchronized
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • localvarpath
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • protected
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                              • apiclient
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • localvarqueryparams
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • localvaraccept
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • apiexception
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • apiresponse
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • assert
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                              • byte
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • strictfp
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • throws
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • configuration
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                              • enum
                                                                                                                                                                                                                                                              • extends
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • apiexception
                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • localvarcontenttypes
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • configuration
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • float
                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • apiresponse
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • localvarheaderparams
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • localvarcontenttype
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • assert
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • stringutil
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • localvarcollectionqueryparams
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • localvarcookieparams
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • localreturntype
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • localvarformparams
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • localvarauthnames
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localreturntype
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvaraccept
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvaraccepts
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvarauthnames
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvarcollectionqueryparams
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvarcontenttype
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvarcontenttypes
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvarcookieparams
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvarformparams
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvarheaderparams
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvarpath
                                                                                                                                                                                                                                                              • localvarpostbody
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • localvarqueryparams
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • strictfp
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • stringutil
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • synchronized
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • throws
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                              diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index cec7263ce5..9b85ad5e17 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -5,69 +5,69 @@ sidebar_label: jaxrs-resteasy | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-resteasy-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                              **joda**
                                                                                                                                                                                                                                                              Joda (for legacy app only)
                                                                                                                                                                                                                                                              **legacy**
                                                                                                                                                                                                                                                              Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                              **java8-localdatetime**
                                                                                                                                                                                                                                                              Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                              **java8**
                                                                                                                                                                                                                                                              Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                              **threetenbp**
                                                                                                                                                                                                                                                              Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                              |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                              **true**
                                                                                                                                                                                                                                                              Use Java 8 classes such as Base64
                                                                                                                                                                                                                                                              **false**
                                                                                                                                                                                                                                                              Various third party libraries as needed
                                                                                                                                                                                                                                                              |false| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                              **joda**
                                                                                                                                                                                                                                                              Joda (for legacy app only)
                                                                                                                                                                                                                                                              **legacy**
                                                                                                                                                                                                                                                              Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                              **java8-localdatetime**
                                                                                                                                                                                                                                                              Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                              **java8**
                                                                                                                                                                                                                                                              Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                              **threetenbp**
                                                                                                                                                                                                                                                              Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                              |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                              **true**
                                                                                                                                                                                                                                                              Use Java 8 classes such as Base64
                                                                                                                                                                                                                                                              **false**
                                                                                                                                                                                                                                                              Various third party libraries as needed
                                                                                                                                                                                                                                                              |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                                              **true**
                                                                                                                                                                                                                                                              Use a SnapShot Version
                                                                                                                                                                                                                                                              **false**
                                                                                                                                                                                                                                                              Use a Release Version
                                                                                                                                                                                                                                                              |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|generateJbossDeploymentDescriptor|Generate Jboss Deployment Descriptor| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -80,87 +80,87 @@ sidebar_label: jaxrs-resteasy ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                              • Integer
                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                              • byte[]
                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • Integer
                                                                                                                                                                                                                                                                • Long
                                                                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                                                                • String
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                • byte[]
                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                • localvaraccepts
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • synchronized
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • do
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • float
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • localvarpath
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • protected
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                • else
                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                  • apiclient
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • localvarqueryparams
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • localvaraccept
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • double
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • apiexception
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • apiresponse
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • assert
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                  • byte
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • strictfp
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • throws
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • configuration
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • double
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                  • enum
                                                                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • apiexception
                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • localvarcontenttypes
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • configuration
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • float
                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • apiresponse
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • long
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                  • goto
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • localvarheaderparams
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • native
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • localvarcontenttype
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • assert
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • stringutil
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • localvarcollectionqueryparams
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • localvarcookieparams
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • localreturntype
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • localvarformparams
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • volatile
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • localvarauthnames
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localreturntype
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvaraccept
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvaraccepts
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvarauthnames
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvarcollectionqueryparams
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvarcontenttype
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvarcontenttypes
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvarcookieparams
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvarformparams
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvarheaderparams
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvarpath
                                                                                                                                                                                                                                                                  • localvarpostbody
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • localvarqueryparams
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • long
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • native
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • strictfp
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • stringutil
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • synchronized
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • throws
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • volatile
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                  diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 6804b06c4a..d9c32ce88a 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -5,74 +5,74 @@ sidebar_label: jaxrs-spec | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-jaxrs-server| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                                  **joda**
                                                                                                                                                                                                                                                                  Joda (for legacy app only)
                                                                                                                                                                                                                                                                  **legacy**
                                                                                                                                                                                                                                                                  Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                                                                                  Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                                                                                  Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                                                                                  Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                                  |legacy| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|generatePom|Whether to generate pom.xml if the file does not already exist.| |true| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implFolder|folder for generated implementation code| |src/main/java| +|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                                  Use Java 8 classes such as Base64
                                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                                  Various third party libraries as needed
                                                                                                                                                                                                                                                                  |false| +|library|library template (sub-template)|
                                                                                                                                                                                                                                                                  **<default>**
                                                                                                                                                                                                                                                                  JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
                                                                                                                                                                                                                                                                  **quarkus**
                                                                                                                                                                                                                                                                  Server using Quarkus
                                                                                                                                                                                                                                                                  **thorntail**
                                                                                                                                                                                                                                                                  Server using Thorntail
                                                                                                                                                                                                                                                                  **openliberty**
                                                                                                                                                                                                                                                                  Server using Open Liberty
                                                                                                                                                                                                                                                                  **helidon**
                                                                                                                                                                                                                                                                  Server using Helidon
                                                                                                                                                                                                                                                                  |<default>| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                                  **joda**
                                                                                                                                                                                                                                                                  Joda (for legacy app only)
                                                                                                                                                                                                                                                                  **legacy**
                                                                                                                                                                                                                                                                  Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                                                                                  Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                                                                                  Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                                                                                  Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                                  |legacy| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                                  Use Java 8 classes such as Base64
                                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                                  Various third party libraries as needed
                                                                                                                                                                                                                                                                  |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|serverPort|The port on which the server should be started| |8080| |snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                                  Use a SnapShot Version
                                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                                  Use a Release Version
                                                                                                                                                                                                                                                                  |null| -|implFolder|folder for generated implementation code| |src/main/java| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |title|a title describing the application| |OpenAPI Server| |useBeanValidation|Use BeanValidation API annotations| |true| -|serverPort|The port on which the server should be started| |8080| -|library|library template (sub-template)|
                                                                                                                                                                                                                                                                  **<default>**
                                                                                                                                                                                                                                                                  JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
                                                                                                                                                                                                                                                                  **quarkus**
                                                                                                                                                                                                                                                                  Server using Quarkus
                                                                                                                                                                                                                                                                  **thorntail**
                                                                                                                                                                                                                                                                  Server using Thorntail
                                                                                                                                                                                                                                                                  **openliberty**
                                                                                                                                                                                                                                                                  Server using Open Liberty
                                                                                                                                                                                                                                                                  **helidon**
                                                                                                                                                                                                                                                                  Server using Helidon
                                                                                                                                                                                                                                                                  |<default>| -|generatePom|Whether to generate pom.xml if the file does not already exist.| |true| -|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| -|returnResponse|Whether generate API interface should return javax.ws.rs.core.Response instead of a deserialized entity. Only useful if interfaceOnly is true.| |false| |useSwaggerAnnotations|Whether to generate Swagger annotations.| |true| -|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -85,87 +85,87 @@ sidebar_label: jaxrs-spec ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                  • Integer
                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                  • byte[]
                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • Integer
                                                                                                                                                                                                                                                                    • Long
                                                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                    • byte[]
                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                    • localvaraccepts
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • synchronized
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • float
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • localvarpath
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • protected
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                      • apiclient
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • apiexception
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • assert
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                      • byte
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • strictfp
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • configuration
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                      • enum
                                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • apiexception
                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • configuration
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • float
                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • assert
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • stringutil
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvaraccepts
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvarpath
                                                                                                                                                                                                                                                                      • localvarpostbody
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • strictfp
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • stringutil
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • synchronized
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                      diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 823e0a59a1..2aff0efbb2 100644 --- a/docs/generators/jmeter.md +++ b/docs/generators/jmeter.md @@ -5,32 +5,32 @@ sidebar_label: jmeter | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md index f4fdcf2a41..cffcda881f 100644 --- a/docs/generators/kotlin-server.md +++ b/docs/generators/kotlin-server.md @@ -5,40 +5,40 @@ sidebar_label: kotlin-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sourceFolder|source folder for generated code| |src/main/kotlin| -|packageName|Generated artifact package name.| |org.openapitools.server| |apiSuffix|suffix for api classes| |Api| -|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |artifactId|Generated artifact id (name of jar).| |kotlin-server| |artifactVersion|Generated artifact's package version.| |1.0.0| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| -|parcelizeModels|toggle "@Parcelize" for generated models| |null| -|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| -|modelMutable|Create mutable models| |false| -|library|library template (sub-template)|
                                                                                                                                                                                                                                                                      **ktor**
                                                                                                                                                                                                                                                                      ktor framework
                                                                                                                                                                                                                                                                      |ktor| |featureAutoHead|Automatically provide responses to HEAD requests for existing routes that have the GET verb defined.| |true| -|featureConditionalHeaders|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |false| -|featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true| |featureCORS|Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org.| |false| |featureCompression|Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response.| |true| +|featureConditionalHeaders|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |false| +|featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true| +|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| +|library|library template (sub-template)|
                                                                                                                                                                                                                                                                      **ktor**
                                                                                                                                                                                                                                                                      ktor framework
                                                                                                                                                                                                                                                                      |ktor| +|modelMutable|Create mutable models| |false| +|packageName|Generated artifact package name.| |org.openapitools.server| +|parcelizeModels|toggle "@Parcelize" for generated models| |null| +|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| +|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|sourceFolder|source folder for generated code| |src/main/kotlin| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|java.time.LocalDateTime| -|LocalTime|java.time.LocalTime| -|UUID|java.util.UUID| -|URI|java.net.URI| -|File|java.io.File| -|Timestamp|java.sql.Timestamp| -|LocalDate|java.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|java.time.LocalDateTime| +|File|java.io.File| +|LocalDate|java.time.LocalDate| +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -52,50 +52,50 @@ sidebar_label: kotlin-server ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                      • kotlin.collections.List
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • kotlin.Float
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • kotlin.Double
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • kotlin.String
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • kotlin.Array
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • kotlin.Byte
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • kotlin.collections.Map
                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                      • kotlin.Short
                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                        • kotlin.Array
                                                                                                                                                                                                                                                                        • kotlin.Boolean
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • kotlin.Long
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • kotlin.Char
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • kotlin.Byte
                                                                                                                                                                                                                                                                        • kotlin.ByteArray
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • kotlin.Char
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • kotlin.Double
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • kotlin.Float
                                                                                                                                                                                                                                                                        • kotlin.Int
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • kotlin.Long
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • kotlin.Short
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • kotlin.String
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • kotlin.collections.List
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                        • kotlin.collections.Map
                                                                                                                                                                                                                                                                        • kotlin.collections.Set
                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                        • for
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • do
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • interface
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • while
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • when
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • continue
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • else
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • typealias
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • class
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • if
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • typeof
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • val
                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                        • package
                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                          • as
                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • fun
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                          • is
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • as
                                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • fun
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • typealias
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • typeof
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • val
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • when
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                          diff --git a/docs/generators/kotlin-spring.md b/docs/generators/kotlin-spring.md index b89ee519a5..11d7a924b2 100644 --- a/docs/generators/kotlin-spring.md +++ b/docs/generators/kotlin-spring.md @@ -5,49 +5,49 @@ sidebar_label: kotlin-spring | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sourceFolder|source folder for generated code| |src/main/kotlin| -|packageName|Generated artifact package name.| |org.openapitools| +|apiPackage|api package for generated code| |org.openapitools.api| |apiSuffix|suffix for api classes| |Api| -|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |artifactId|Generated artifact id (name of jar).| |openapi-spring| |artifactVersion|Generated artifact's package version.| |1.0.0| -|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| -|parcelizeModels|toggle "@Parcelize" for generated models| |null| -|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| -|modelMutable|Create mutable models| |false| -|title|server title name or client service name| |OpenAPI Kotlin Spring| |basePackage|base package (invokerPackage) for generated code| |org.openapitools| -|serverPort|configuration the port in which the sever is to run on| |8080| -|modelPackage|model package for generated code| |org.openapitools.model| -|apiPackage|api package for generated code| |org.openapitools.api| +|delegatePattern|Whether to generate the server files using the delegate pattern| |false| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| |exceptionHandler|generate default global exception handlers (not compatible with reactive. enabling reactive will disable exceptionHandler )| |true| |gradleBuildFile|generate a gradle build file using the Kotlin DSL| |true| -|swaggerAnnotations|generate swagger annotations to go alongside controllers and models| |false| -|serviceInterface|generate service interfaces to go alongside controllers. In most cases this option would be used to update an existing project, so not to override implementations. Useful to help facilitate the generation gap pattern| |false| -|serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false| -|useBeanValidation|Use BeanValidation API annotations to validate data types| |true| -|reactive|use coroutines for reactive behavior| |false| +|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| -|delegatePattern|Whether to generate the server files using the delegate pattern| |false| |library|library template (sub-template)|
                                                                                                                                                                                                                                                                          **spring-boot**
                                                                                                                                                                                                                                                                          Spring-boot Server application.
                                                                                                                                                                                                                                                                          |spring-boot| +|modelMutable|Create mutable models| |false| +|modelPackage|model package for generated code| |org.openapitools.model| +|packageName|Generated artifact package name.| |org.openapitools| +|parcelizeModels|toggle "@Parcelize" for generated models| |null| +|reactive|use coroutines for reactive behavior| |false| +|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| +|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| +|serverPort|configuration the port in which the sever is to run on| |8080| +|serviceImplementation|generate stub service implementations that extends service interfaces. If this is set to true service interfaces will also be generated| |false| +|serviceInterface|generate service interfaces to go alongside controllers. In most cases this option would be used to update an existing project, so not to override implementations. Useful to help facilitate the generation gap pattern| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|sourceFolder|source folder for generated code| |src/main/kotlin| +|swaggerAnnotations|generate swagger annotations to go alongside controllers and models| |false| +|title|server title name or client service name| |OpenAPI Kotlin Spring| +|useBeanValidation|Use BeanValidation API annotations to validate data types| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|java.time.LocalDateTime| -|LocalTime|java.time.LocalTime| -|UUID|java.util.UUID| -|URI|java.net.URI| -|File|java.io.File| -|Timestamp|java.sql.Timestamp| -|LocalDate|java.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.time.LocalDate| |DateTime|java.time.OffsetDateTime| +|File|java.io.File| +|LocalDate|java.time.LocalDate| +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -61,53 +61,53 @@ sidebar_label: kotlin-spring ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                          • kotlin.collections.List
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • kotlin.Float
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • kotlin.Double
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • kotlin.String
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • kotlin.Array
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • kotlin.Byte
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • kotlin.collections.Map
                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                          • kotlin.Short
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                            • kotlin.Array
                                                                                                                                                                                                                                                                            • kotlin.Boolean
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • kotlin.Long
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • kotlin.Char
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • kotlin.Byte
                                                                                                                                                                                                                                                                            • kotlin.ByteArray
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • kotlin.Char
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • kotlin.Double
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • kotlin.Float
                                                                                                                                                                                                                                                                            • kotlin.Int
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • kotlin.Long
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • kotlin.Short
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • kotlin.String
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • kotlin.collections.List
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                            • kotlin.collections.Map
                                                                                                                                                                                                                                                                            • kotlin.collections.Set
                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                            • for
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • interface
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                            • when
                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                              • ApiClient
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • ApiException
                                                                                                                                                                                                                                                                              • ApiResponse
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • typealias
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • typeof
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • val
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • is
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • ApiClient
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                              • as
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • fun
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • is
                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • fun
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • ApiException
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • typealias
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • typeof
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • val
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • when
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                              diff --git a/docs/generators/kotlin-vertx.md b/docs/generators/kotlin-vertx.md index 07d1b61ef1..20a85045d0 100644 --- a/docs/generators/kotlin-vertx.md +++ b/docs/generators/kotlin-vertx.md @@ -5,34 +5,34 @@ sidebar_label: kotlin-vertx | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sourceFolder|source folder for generated code| |src/main/kotlin| -|packageName|Generated artifact package name.| |org.openapitools| |apiSuffix|suffix for api classes| |Api| -|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |artifactId|Generated artifact id (name of jar).| |null| |artifactVersion|Generated artifact's package version.| |1.0.0| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| +|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| +|modelMutable|Create mutable models| |false| +|packageName|Generated artifact package name.| |org.openapitools| |parcelizeModels|toggle "@Parcelize" for generated models| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| -|modelMutable|Create mutable models| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|sourceFolder|source folder for generated code| |src/main/kotlin| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|java.time.LocalDateTime| -|LocalTime|java.time.LocalTime| -|UUID|java.util.UUID| -|URI|java.net.URI| -|File|java.io.File| -|Timestamp|java.sql.Timestamp| -|LocalDate|java.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|java.time.LocalDateTime| +|File|java.io.File| +|LocalDate|java.time.LocalDate| +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -46,50 +46,50 @@ sidebar_label: kotlin-vertx ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                              • kotlin.collections.List
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • kotlin.Float
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • kotlin.Double
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • kotlin.String
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • kotlin.Array
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • kotlin.Byte
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • kotlin.collections.Map
                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                              • kotlin.Short
                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                • kotlin.Array
                                                                                                                                                                                                                                                                                • kotlin.Boolean
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • kotlin.Long
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • kotlin.Char
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • kotlin.Byte
                                                                                                                                                                                                                                                                                • kotlin.ByteArray
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • kotlin.Char
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • kotlin.Double
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • kotlin.Float
                                                                                                                                                                                                                                                                                • kotlin.Int
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • kotlin.Long
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • kotlin.Short
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • kotlin.String
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • kotlin.collections.List
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                • kotlin.collections.Map
                                                                                                                                                                                                                                                                                • kotlin.collections.Set
                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                • for
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • do
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • interface
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • when
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • else
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • typealias
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • class
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • if
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • typeof
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • val
                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                • package
                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                  • as
                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • in
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • fun
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • in
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                                  • is
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • as
                                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • fun
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • typealias
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • typeof
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • val
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • when
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/kotlin.md b/docs/generators/kotlin.md index 27b430a29d..2ef38896fd 100644 --- a/docs/generators/kotlin.md +++ b/docs/generators/kotlin.md @@ -5,38 +5,38 @@ sidebar_label: kotlin | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sourceFolder|source folder for generated code| |src/main/kotlin| -|packageName|Generated artifact package name.| |org.openapitools.client| |apiSuffix|suffix for api classes| |Api| -|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |artifactId|Generated artifact id (name of jar).| |kotlin-client| |artifactVersion|Generated artifact's package version.| |1.0.0| -|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| -|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| -|parcelizeModels|toggle "@Parcelize" for generated models| |null| -|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| -|modelMutable|Create mutable models| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                                                  **threetenbp-localdatetime**
                                                                                                                                                                                                                                                                                  Threetenbp - Backport of JSR310 (jvm only, for legacy app only)
                                                                                                                                                                                                                                                                                  **string**
                                                                                                                                                                                                                                                                                  String
                                                                                                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                                                                                                  Java 8 native JSR310 (jvm only, for legacy app only)
                                                                                                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                                                                                                  Java 8 native JSR310 (jvm only, preferred for jdk 1.8+)
                                                                                                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                                                                                                  Threetenbp - Backport of JSR310 (jvm only, preferred for jdk < 1.8)
                                                                                                                                                                                                                                                                                  |java8| |collectionType|Option. Collection type to use|
                                                                                                                                                                                                                                                                                  **array**
                                                                                                                                                                                                                                                                                  kotlin.Array
                                                                                                                                                                                                                                                                                  **list**
                                                                                                                                                                                                                                                                                  kotlin.collections.List
                                                                                                                                                                                                                                                                                  |array| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                                                  **threetenbp-localdatetime**
                                                                                                                                                                                                                                                                                  Threetenbp - Backport of JSR310 (jvm only, for legacy app only)
                                                                                                                                                                                                                                                                                  **string**
                                                                                                                                                                                                                                                                                  String
                                                                                                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                                                                                                  Java 8 native JSR310 (jvm only, for legacy app only)
                                                                                                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                                                                                                  Java 8 native JSR310 (jvm only, preferred for jdk 1.8+)
                                                                                                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                                                                                                  Threetenbp - Backport of JSR310 (jvm only, preferred for jdk < 1.8)
                                                                                                                                                                                                                                                                                  |java8| +|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase| +|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools| |library|Library template (sub-template) to use|
                                                                                                                                                                                                                                                                                  **jvm-okhttp4**
                                                                                                                                                                                                                                                                                  [DEFAULT] Platform: Java Virtual Machine. HTTP client: OkHttp 4.2.0 (Android 5.0+ and Java 8+). JSON processing: Moshi 1.8.0.
                                                                                                                                                                                                                                                                                  **jvm-okhttp3**
                                                                                                                                                                                                                                                                                  Platform: Java Virtual Machine. HTTP client: OkHttp 3.12.4 (Android 2.3+ and Java 7+). JSON processing: Moshi 1.8.0.
                                                                                                                                                                                                                                                                                  **jvm-retrofit2**
                                                                                                                                                                                                                                                                                  Platform: Java Virtual Machine. HTTP client: Retrofit 2.6.2.
                                                                                                                                                                                                                                                                                  **multiplatform**
                                                                                                                                                                                                                                                                                  Platform: Kotlin multiplatform. HTTP client: Ktor 1.2.4. JSON processing: Kotlinx Serialization: 0.12.0.
                                                                                                                                                                                                                                                                                  |jvm-okhttp4| +|modelMutable|Create mutable models| |false| +|packageName|Generated artifact package name.| |org.openapitools.client| +|parcelizeModels|toggle "@Parcelize" for generated models| |null| |requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|
                                                                                                                                                                                                                                                                                  **toJson**
                                                                                                                                                                                                                                                                                  Date formater option using a json converter.
                                                                                                                                                                                                                                                                                  **toString**
                                                                                                                                                                                                                                                                                  [DEFAULT] Use the 'toString'-method of the date-time object to retrieve the related string representation.
                                                                                                                                                                                                                                                                                  |toString| +|serializableModel|boolean - toggle "implements Serializable" for generated models| |null| +|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson'| |moshi| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| +|sourceFolder|source folder for generated code| |src/main/kotlin| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|java.time.LocalDateTime| -|LocalTime|java.time.LocalTime| -|UUID|java.util.UUID| -|URI|java.net.URI| -|File|java.io.File| -|Timestamp|java.sql.Timestamp| -|LocalDate|java.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|java.time.LocalDateTime| +|File|java.io.File| +|LocalDate|java.time.LocalDate| +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -50,50 +50,50 @@ sidebar_label: kotlin ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                  • kotlin.collections.List
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • kotlin.Float
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • kotlin.Double
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • kotlin.String
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • kotlin.Array
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • kotlin.Byte
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • kotlin.collections.Map
                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                  • kotlin.Short
                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                    • kotlin.Array
                                                                                                                                                                                                                                                                                    • kotlin.Boolean
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • kotlin.Long
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • kotlin.Char
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • kotlin.Byte
                                                                                                                                                                                                                                                                                    • kotlin.ByteArray
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • kotlin.Char
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • kotlin.Double
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • kotlin.Float
                                                                                                                                                                                                                                                                                    • kotlin.Int
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • kotlin.Long
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • kotlin.Short
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • kotlin.String
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • kotlin.collections.List
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                    • kotlin.collections.Map
                                                                                                                                                                                                                                                                                    • kotlin.collections.Set
                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                    • for
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • interface
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • when
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • typealias
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • class
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • if
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • typeof
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • val
                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                    • package
                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                      • as
                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • in
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • fun
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • in
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                      • is
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • as
                                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • fun
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • typealias
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • typeof
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • val
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • when
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/lua.md b/docs/generators/lua.md index a7d814198f..4062270334 100644 --- a/docs/generators/lua.md +++ b/docs/generators/lua.md @@ -5,17 +5,17 @@ sidebar_label: lua | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|Lua package name (convention: single word).| |openapiclient| |packageVersion|Lua package version.| |1.0.0-1| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|time.Time|time| -|os|io/ioutil| |*os.File|os| +|os|io/ioutil| +|time.Time|time| ## INSTANTIATION TYPES @@ -26,39 +26,39 @@ sidebar_label: lua ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                      • nil
                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                        • nil
                                                                                                                                                                                                                                                                                        • number
                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                        • for
                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                          • and
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • local
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • nil
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • number
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • userdata
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • not
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • and
                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                          • elseif
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • repeat
                                                                                                                                                                                                                                                                                          • end
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • table
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • or
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • thread
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • local
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • nil
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • not
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • number
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • or
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • repeat
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • string
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • table
                                                                                                                                                                                                                                                                                          • then
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • thread
                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                          • until
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • userdata
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md index 561bfa1cf2..3c7777b2a9 100644 --- a/docs/generators/markdown.md +++ b/docs/generators/markdown.md @@ -5,32 +5,32 @@ sidebar_label: markdown | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES diff --git a/docs/generators/mysql-schema.md b/docs/generators/mysql-schema.md index 5ed0960101..67e235168b 100644 --- a/docs/generators/mysql-schema.md +++ b/docs/generators/mysql-schema.md @@ -6,8 +6,8 @@ sidebar_label: mysql-schema | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |defaultDatabaseName|Default database name for all MySQL queries| || -|jsonDataTypeEnabled|Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled| |true| |identifierNamingConvention|Naming convention of MySQL identifiers(table names and column names). This is not related to database name which is defined by defaultDatabaseName option|
                                                                                                                                                                                                                                                                                          **original**
                                                                                                                                                                                                                                                                                          Do not transform original names
                                                                                                                                                                                                                                                                                          **snake_case**
                                                                                                                                                                                                                                                                                          Use snake_case names
                                                                                                                                                                                                                                                                                          |original| +|jsonDataTypeEnabled|Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled| |true| ## IMPORT MAPPING @@ -23,294 +23,294 @@ sidebar_label: mysql-schema ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                          • date
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • bool
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • string
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • mixed
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • integer
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • URI
                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                            • BigDecimal
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • ByteArray
                                                                                                                                                                                                                                                                                            • Date
                                                                                                                                                                                                                                                                                            • DateTime
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • long
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • BigDecimal
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • number
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • file
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • binary
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • char
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • short
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • ByteArray
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • URI
                                                                                                                                                                                                                                                                                            • UUID
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • binary
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • bool
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • byte
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • char
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • date
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • double
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • file
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • int
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • integer
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • long
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • mixed
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • number
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • short
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • string
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                            • void
                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                            • dec
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • low_priority
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • references
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • leading
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • insensitive
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • ssl
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • character
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • int2
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • int1
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • io_after_gtids
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • trailing
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • int4
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • int3
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • utc_time
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • int8
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • optimizer_costs
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • rank
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • cube
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • databases
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • using
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • outer
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • require
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • then
                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                            • each
                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                              • accessible
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • add
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • all
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • alter
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • analyze
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • and
                                                                                                                                                                                                                                                                                              • as
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • left
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • unique
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • except
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • starting
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • schema
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • accessible
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • role
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • deterministic
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • into
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • smallint
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • dual
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • partition
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • varying
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • by
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • ntile
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • where
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • xor
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • persist
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • current_time
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • key
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • iterate
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • set
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • column
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • minute_microsecond
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • procedure
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • right
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • union
                                                                                                                                                                                                                                                                                              • asc
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • asensitive
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • before
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • between
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • bigint
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • binary
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • blob
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • both
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • by
                                                                                                                                                                                                                                                                                              • call
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • varbinary
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • longblob
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • describe
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • to
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • localtime
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • sql_big_result
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • cascade
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • change
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • character
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • check
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • collate
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • column
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • condition
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • constraint
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • convert
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • create
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • cross
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • cube
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • cume_dist
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • current_date
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • current_time
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • current_timestamp
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • current_user
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • cursor
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • database
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • databases
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • day_hour
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • day_microsecond
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • day_minute
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • day_second
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • dec
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • decimal
                                                                                                                                                                                                                                                                                              • declare
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • delayed
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • delete
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • dense_rank
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • desc
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • describe
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • deterministic
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • distinct
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • distinctrow
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • div
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • drop
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • dual
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • each
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • elseif
                                                                                                                                                                                                                                                                                              • empty
                                                                                                                                                                                                                                                                                              • enclosed
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • div
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • generated
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • leave
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • loop
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • elseif
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • hour_second
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • row_number
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • signal
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • add
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • percent_rank
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • unlock
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • last_value
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • mediumtext
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • check
                                                                                                                                                                                                                                                                                              • escaped
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • collate
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • schemas
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • persist_only
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • decimal
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • desc
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • cursor
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • drop
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • virtual
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • asensitive
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • show
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • revoke
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • update
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • purge
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • not
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • undo
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • zerofill
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • json_table
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • load
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • straight_join
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • ignore
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • lines
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • over
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • mediumint
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • varchar
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • dense_rank
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • mediumblob
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • with
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • window
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • grant
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • day_second
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • explain
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • maxvalue
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • mod
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • select
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • release
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • usage
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • optionally
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • middleint
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • delayed
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • convert
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • localtimestamp
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • sql_small_result
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • when
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • cume_dist
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • lock
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • join
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • spatial
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • write
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • between
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • sqlstate
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • order
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • year_month
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • read_write
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • having
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • natural
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • tinytext
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • index
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • tinyint
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • is
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • sensitive
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • grouping
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • exit
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • current_date
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • system
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • analyze
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • binary
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • sqlwarning
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • force
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • interval
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • master_bind
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • minute_second
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • primary
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • regexp
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • range
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • sqlexception
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • infile
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • restrict
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • recursive
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • foreign
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • hour_microsecond
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • out
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • distinctrow
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • get
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • fulltext
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • table
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • current_user
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • linear
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • second_microsecond
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • change
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • utc_timestamp
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • float8
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • io_before_gtids
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • trigger
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • float4
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • kill
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • lead
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • day_minute
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • rlike
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • rename
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • hour_minute
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • fetch
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • stored
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • except
                                                                                                                                                                                                                                                                                              • exists
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • constraint
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • high_priority
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • no_write_to_binlog
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • sql_calc_found_rows
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • before
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • use
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • precision
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • modifies
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • replace
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • integer
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • float
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • lag
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • optimize
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • nth_value
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • limit
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • varcharacter
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • create
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • from
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • tinyblob
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • alter
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • group
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • all
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • read
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • like
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • cascade
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • real
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • inner
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • separator
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • both
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • day_microsecond
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • condition
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • blob
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • day_hour
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • option
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • longtext
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • keys
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • outfile
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • values
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • distinct
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • insert
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • numeric
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • resignal
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • delete
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • sql
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • database
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • master_ssl_verify_server_cert
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • and
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • current_timestamp
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • of
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • repeat
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • exit
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • explain
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • fetch
                                                                                                                                                                                                                                                                                              • first_value
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • row
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • bigint
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • terminated
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • on
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • or
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • cross
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • match
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • reads
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • float
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • float4
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • float8
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • force
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • foreign
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • from
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • fulltext
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • generated
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • get
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • grant
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • group
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • grouping
                                                                                                                                                                                                                                                                                              • groups
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • rows
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • specific
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • having
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • high_priority
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • hour_microsecond
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • hour_minute
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • hour_second
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • ignore
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • index
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • infile
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • inner
                                                                                                                                                                                                                                                                                              • inout
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • insensitive
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • insert
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • int1
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • int2
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • int3
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • int4
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • int8
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • integer
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • interval
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • into
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • io_after_gtids
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • io_before_gtids
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • is
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • iterate
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • join
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • json_table
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • key
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • keys
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • kill
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • lag
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • last_value
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • lead
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • leading
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • leave
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • left
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • like
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • limit
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • linear
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • lines
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • load
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • localtime
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • localtimestamp
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • lock
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • longblob
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • longtext
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • loop
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • low_priority
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • master_bind
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • master_ssl_verify_server_cert
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • match
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • maxvalue
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • mediumblob
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • mediumint
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • mediumtext
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • middleint
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • minute_microsecond
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • minute_second
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • mod
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • modifies
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • natural
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • no_write_to_binlog
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • not
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • nth_value
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • ntile
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • numeric
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • of
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • on
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • optimize
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • optimizer_costs
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • option
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • optionally
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • or
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • order
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • out
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • outer
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • outfile
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • over
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • partition
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • percent_rank
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • persist
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • persist_only
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • precision
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • primary
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • procedure
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • purge
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • range
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • rank
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • read
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • read_write
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • reads
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • real
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • recursive
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • references
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • regexp
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • release
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • rename
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • repeat
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • replace
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • require
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • resignal
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • restrict
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • revoke
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • right
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • rlike
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • role
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • row
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • row_number
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • rows
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • schema
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • schemas
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • second_microsecond
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • select
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • sensitive
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • separator
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • set
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • show
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • signal
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • smallint
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • spatial
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • specific
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • sql
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • sql_big_result
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • sql_calc_found_rows
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • sql_small_result
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • sqlexception
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • sqlstate
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • sqlwarning
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • ssl
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • starting
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • stored
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • straight_join
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • system
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • table
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • terminated
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • then
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • tinyblob
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • tinyint
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • tinytext
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • to
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • trailing
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • trigger
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • undo
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • union
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • unique
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • unlock
                                                                                                                                                                                                                                                                                              • unsigned
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • update
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • usage
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • use
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • using
                                                                                                                                                                                                                                                                                              • utc_date
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • utc_time
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • utc_timestamp
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • values
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • varbinary
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • varchar
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • varcharacter
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • varying
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • virtual
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • when
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • where
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • window
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • with
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • write
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • xor
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • year_month
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                              • zerofill
                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/nim.md b/docs/generators/nim.md index 25ba0b6422..946669ccbe 100644 --- a/docs/generators/nim.md +++ b/docs/generators/nim.md @@ -5,32 +5,32 @@ sidebar_label: nim | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -41,92 +41,92 @@ sidebar_label: nim ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                              • pointer
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • bool
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • string
                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                              • float32
                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                • bool
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • char
                                                                                                                                                                                                                                                                                                • cstring
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • float64
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • uint
                                                                                                                                                                                                                                                                                                • float
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • float32
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • float64
                                                                                                                                                                                                                                                                                                • int
                                                                                                                                                                                                                                                                                                • int16
                                                                                                                                                                                                                                                                                                • int32
                                                                                                                                                                                                                                                                                                • int64
                                                                                                                                                                                                                                                                                                • int8
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • char
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • uint64
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • uint32
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • uint8
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • pointer
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • string
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • uint
                                                                                                                                                                                                                                                                                                • uint16
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • uint32
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • uint64
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                • uint8
                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                • discard
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • mod
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • converter
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • do
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • type
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • when
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • div
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • nil
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • cast
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • iterator
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • ref
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • bind
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • isnot
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • else
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • raise
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • block
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • from
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • let
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • export
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • if
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • case
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • using
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • static
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • method
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • in
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • var
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • finally
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • is
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • elif
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • enum
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • mixin
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • as
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • shl
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • except
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • try
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • shr
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • object
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • template
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • defer
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • const
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • import
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • concept
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • for
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • distinct
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • interface
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • out
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • tuple
                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                • not
                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                  • addr
                                                                                                                                                                                                                                                                                                  • and
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • of
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • end
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • xor
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • addr
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • include
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • macro
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • proc
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • or
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • ptr
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • func
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • as
                                                                                                                                                                                                                                                                                                  • asm
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • bind
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • block
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • cast
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • concept
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • converter
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • defer
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • discard
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • distinct
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • div
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • elif
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • end
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • enum
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • except
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • export
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • from
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • func
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • in
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • include
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • is
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • isnot
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • iterator
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • let
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • macro
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • method
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • mixin
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • mod
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • nil
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • not
                                                                                                                                                                                                                                                                                                  • notin
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • of
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • or
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • out
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • proc
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • ptr
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • raise
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • ref
                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • shl
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • shr
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • template
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • tuple
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • type
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • using
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • when
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • xor
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md index d37832876b..b0a8db1c49 100644 --- a/docs/generators/nodejs-express-server.md +++ b/docs/generators/nodejs-express-server.md @@ -5,33 +5,33 @@ sidebar_label: nodejs-express-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen on.| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -46,38 +46,38 @@ sidebar_label: nodejs-express-server ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • debugger
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • delete
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • function
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                  • let
                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                    • break
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • case
                                                                                                                                                                                                                                                                                                    • catch
                                                                                                                                                                                                                                                                                                    • class
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • const
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • debugger
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • default
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • delete
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                                                                    • export
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • if
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • case
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • typeof
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • new
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • void
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • break
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • in
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • var
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • finally
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • this
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • instanceof
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • super
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • with
                                                                                                                                                                                                                                                                                                    • extends
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • finally
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • for
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • function
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • if
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • import
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • in
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • instanceof
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • let
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • new
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • return
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • super
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • switch
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • this
                                                                                                                                                                                                                                                                                                    • throw
                                                                                                                                                                                                                                                                                                    • try
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • return
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • typeof
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • var
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • void
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • with
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                    • yield
                                                                                                                                                                                                                                                                                                    diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md index c74a324950..0967505e68 100644 --- a/docs/generators/nodejs-server-deprecated.md +++ b/docs/generators/nodejs-server-deprecated.md @@ -5,35 +5,35 @@ sidebar_label: nodejs-server-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null| +|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen on.| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -48,38 +48,38 @@ sidebar_label: nodejs-server-deprecated ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                    • const
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • import
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • debugger
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • for
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • delete
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • switch
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • default
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • function
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • yield
                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                    • let
                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • debugger
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • delete
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                      • export
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • typeof
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • in
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • with
                                                                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • function
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • in
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • let
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • typeof
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • with
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/nodejs-server.md b/docs/generators/nodejs-server.md deleted file mode 100644 index d66e4e4f01..0000000000 --- a/docs/generators/nodejs-server.md +++ /dev/null @@ -1,16 +0,0 @@ - ---- -id: generator-opts-server-nodejs-server -title: Config Options for nodejs-server -sidebar_label: nodejs-server ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false| -|exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null| -|serverPort|TCP port to listen on.| |null| diff --git a/docs/generators/objc.md b/docs/generators/objc.md index b185b4614b..49148761b6 100644 --- a/docs/generators/objc.md +++ b/docs/generators/objc.md @@ -5,14 +5,14 @@ sidebar_label: objc | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|coreData|Should generate core data models| |false| -|classPrefix|prefix for generated classes (convention: Abbreviation of pod name e.g. `HN` for `HackerNews`).`| |OAI| -|podName|cocoapods package name (convention: CameCase).| |OpenAPIClient| -|podVersion|cocoapods package version.| |1.0.0| -|authorName|Name to use in the podspec file.| |OpenAPI| |authorEmail|Email to use in the podspec file.| |team@openapitools.org| +|authorName|Name to use in the podspec file.| |OpenAPI| +|classPrefix|prefix for generated classes (convention: Abbreviation of pod name e.g. `HN` for `HackerNews`).`| |OAI| +|coreData|Should generate core data models| |false| |gitRepoURL|URL for the git repo where this podspec should point to.| |https://github.com/openapitools/openapi-generator| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|podName|cocoapods package name (convention: CameCase).| |OpenAPIClient| +|podVersion|cocoapods package version.| |1.0.0| ## IMPORT MAPPING @@ -30,77 +30,77 @@ sidebar_label: objc ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                      • NSNumber
                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                      • NSObject
                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                        • BOOL
                                                                                                                                                                                                                                                                                                        • NSData
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                        • bool
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                        • BOOL
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                        • NSURL
                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                        • NSString
                                                                                                                                                                                                                                                                                                        • NSDate
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • NSNumber
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • NSObject
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • NSString
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • NSURL
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                        • bool
                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                        • struct
                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                          • _packed
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • authsettings
                                                                                                                                                                                                                                                                                                          • auto
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • _packed
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • queryparams
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • extern
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • resourcepath
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • protocol
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • readonly
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • bodyparam
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • cgfloat
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • unsafe_unretained
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • property
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • requestcontenttype
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • description
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • extern
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • formparams
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • headerparams
                                                                                                                                                                                                                                                                                                          • id
                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • nsinteger
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • responsecontenttype
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • pathparams
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • sizeof
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • authsettings
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • signed
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • nonatomic
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • formparams
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • typedef
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • headerparams
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • bodyparam
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • strong
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • nsnumber
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • retain
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • description
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • weak
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • localvarfiles
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • cgfloat
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                          • implementation
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • nsobject
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • union
                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • unsigned
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • localvarfiles
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • nonatomic
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • nsinteger
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • nsnumber
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • nsobject
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • pathparams
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • property
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • protocol
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • queryparams
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • readonly
                                                                                                                                                                                                                                                                                                          • readwrite
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                          • register
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • requestcontenttype
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • resourcepath
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • responsecontenttype
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • retain
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • signed
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • sizeof
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • strong
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • struct
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • typedef
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • union
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • unsafe_unretained
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • unsigned
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • weak
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/ocaml-client.md b/docs/generators/ocaml-client.md deleted file mode 100644 index 52874232c1..0000000000 --- a/docs/generators/ocaml-client.md +++ /dev/null @@ -1,13 +0,0 @@ - ---- -id: generator-opts-client-ocaml-client -title: Config Options for ocaml-client -sidebar_label: ocaml-client ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md index 28bae3fd5f..87721f5984 100644 --- a/docs/generators/ocaml.md +++ b/docs/generators/ocaml.md @@ -5,31 +5,31 @@ sidebar_label: ocaml | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| +|HashMap|java.util.HashMap| |List|java.util.*| -|UUID|java.util.UUID| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -40,75 +40,75 @@ sidebar_label: ocaml ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                          • bool
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • string
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • int32
                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                          • int64
                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                            • Yojson.Safe.t
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • bool
                                                                                                                                                                                                                                                                                                            • bytes
                                                                                                                                                                                                                                                                                                            • char
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • Yojson.Safe.t
                                                                                                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • list
                                                                                                                                                                                                                                                                                                            • int
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • int32
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • int64
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • list
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • string
                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                            • exception
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • struct
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • asr
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • mod
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • functor
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • type
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • when
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • rec
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • function
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • mutable
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • let
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • if
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • val
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • new
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • method
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • in
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • module
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • nonrec
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • then
                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                            • done
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                              • and
                                                                                                                                                                                                                                                                                                              • as
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • asr
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • assert
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • begin
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • constraint
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • done
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • downto
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • end
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • exception
                                                                                                                                                                                                                                                                                                              • external
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • fun
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • functor
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • include
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • inherit
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • initializer
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • land
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • lazy
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • let
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • lor
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • lsl
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • lsr
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • lxor
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • match
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • method
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • mod
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • module
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • mutable
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • nonrec
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • of
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • open
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • or
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • rec
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • result
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • sig
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • struct
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • then
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • to
                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • begin
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • type
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • val
                                                                                                                                                                                                                                                                                                              • virtual
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • lsl
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • lazy
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • lsr
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • lor
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • sig
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • result
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • and
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • assert
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • of
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • land
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • end
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • lxor
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • include
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • or
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • downto
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • match
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • initializer
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • when
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                              • with
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • inherit
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • constraint
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • to
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • fun
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • open
                                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md index 19833475e7..96021a3a3e 100644 --- a/docs/generators/openapi-yaml.md +++ b/docs/generators/openapi-yaml.md @@ -5,33 +5,33 @@ sidebar_label: openapi-yaml | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |outputFile|Output filename| |openapi/openapi.yaml| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md index aaa05565e8..95b8fd6ace 100644 --- a/docs/generators/openapi.md +++ b/docs/generators/openapi.md @@ -5,32 +5,32 @@ sidebar_label: openapi | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES diff --git a/docs/generators/perl.md b/docs/generators/perl.md index 3bda8004d8..3a65f291a4 100644 --- a/docs/generators/perl.md +++ b/docs/generators/perl.md @@ -5,12 +5,12 @@ sidebar_label: perl | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|moduleName|Perl module name (convention: CamelCase or Long::Module).| |OpenAPIClient| -|moduleVersion|Perl module version.| |1.0.0| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|moduleName|Perl module name (convention: CamelCase or Long::Module).| |OpenAPIClient| +|moduleVersion|Perl module version.| |1.0.0| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -26,56 +26,56 @@ sidebar_label: perl ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • ARRAY
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • string
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                • ARRAY
                                                                                                                                                                                                                                                                                                                • DateTime
                                                                                                                                                                                                                                                                                                                • HASH
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • double
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • int
                                                                                                                                                                                                                                                                                                                • object
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                • string
                                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                • sub
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • no
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • cmp
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • lt
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • for
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • elsif
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • do
                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                  • __end__
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • __file__
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • __line__
                                                                                                                                                                                                                                                                                                                  • __package__
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • foreach
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • __end__
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • unless
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                  • and
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • cmp
                                                                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • lock
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • xor
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • core
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • elsif
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • eq
                                                                                                                                                                                                                                                                                                                  • exp
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • foreach
                                                                                                                                                                                                                                                                                                                  • ge
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • qq
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • qr
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • gt
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • le
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • lock
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • lt
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • m
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • ne
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • no
                                                                                                                                                                                                                                                                                                                  • or
                                                                                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • q
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • qq
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • qr
                                                                                                                                                                                                                                                                                                                  • qw
                                                                                                                                                                                                                                                                                                                  • qx
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • eq
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • m
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • gt
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • q
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • core
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • __line__
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • s
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • __file__
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • ne
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • le
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • y
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • until
                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                  • tr
                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • s
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • sub
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • tr
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • unless
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • until
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • xor
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                  • y
                                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md index c2ed698421..a0b7443d87 100644 --- a/docs/generators/php-laravel.md +++ b/docs/generators/php-laravel.md @@ -5,39 +5,39 @@ sidebar_label: php-laravel | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -50,93 +50,93 @@ sidebar_label: php-laravel ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                    • DateTime
                                                                                                                                                                                                                                                                                                                    • bool
                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                    • string
                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                    • double
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                    • byte
                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                    • mixed
                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                    • integer
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • double
                                                                                                                                                                                                                                                                                                                    • float
                                                                                                                                                                                                                                                                                                                    • int
                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                    • DateTime
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • integer
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • mixed
                                                                                                                                                                                                                                                                                                                    • number
                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                    • object
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • string
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                    • void
                                                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                    • die
                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                      • __halt_compiler
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • _header_accept
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • _tempbody
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • and
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • array
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • as
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                      • callable
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • declare
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • isset
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • use
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • queryparams
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • echo
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • unset
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • empty
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • resourcepath
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • endwhile
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • clone
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • declare
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • die
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • echo
                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                      • elseif
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • function
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • empty
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • enddeclare
                                                                                                                                                                                                                                                                                                                      • endfor
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • trait
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • require
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • require_once
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • list
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • formparams
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • headerparams
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • _header_accept
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • include_once
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • exit
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • as
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • endforeach
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • endif
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • endswitch
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • endwhile
                                                                                                                                                                                                                                                                                                                      • eval
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • exit
                                                                                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • httpbody
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • global
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • __halt_compiler
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • _tempbody
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                      • foreach
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • formparams
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • function
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • global
                                                                                                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • array
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • and
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • xor
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • headerparams
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • httpbody
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                                                                      • include
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • or
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • endswitch
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • enddeclare
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • include_once
                                                                                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • print
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                      • insteadof
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • clone
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • isset
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • list
                                                                                                                                                                                                                                                                                                                      • namespace
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • endif
                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                      • endforeach
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • or
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • print
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • queryparams
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • require
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • require_once
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • resourcepath
                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • trait
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • unset
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • use
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                      • xor
                                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md index 768a8489a8..4a33196eca 100644 --- a/docs/generators/php-lumen.md +++ b/docs/generators/php-lumen.md @@ -5,39 +5,39 @@ sidebar_label: php-lumen | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -50,93 +50,93 @@ sidebar_label: php-lumen ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                        • DateTime
                                                                                                                                                                                                                                                                                                                        • bool
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • double
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                                                                                        • byte
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • mixed
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • integer
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • double
                                                                                                                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                                                                                                                        • int
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • DateTime
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • integer
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • mixed
                                                                                                                                                                                                                                                                                                                        • number
                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                                                                                        • object
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                        • void
                                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                        • die
                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                          • __halt_compiler
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • _header_accept
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • _tempbody
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • and
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • array
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • as
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                          • callable
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • declare
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • isset
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • use
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • queryparams
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • echo
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • unset
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • empty
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • resourcepath
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • endwhile
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • clone
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • declare
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • die
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • echo
                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                          • elseif
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • empty
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • enddeclare
                                                                                                                                                                                                                                                                                                                          • endfor
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • trait
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • require
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • require_once
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • list
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • formparams
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • headerparams
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • _header_accept
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • include_once
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • exit
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • as
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • endforeach
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • endif
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • endswitch
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • endwhile
                                                                                                                                                                                                                                                                                                                          • eval
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • exit
                                                                                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • httpbody
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • global
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • __halt_compiler
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • _tempbody
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                          • foreach
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • formparams
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • global
                                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • array
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • and
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • xor
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • headerparams
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • httpbody
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                          • include
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • or
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • endswitch
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • enddeclare
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • include_once
                                                                                                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • print
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                          • insteadof
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • clone
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • isset
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • list
                                                                                                                                                                                                                                                                                                                          • namespace
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • endif
                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                          • endforeach
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • or
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • print
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • queryparams
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • require
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • require_once
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • resourcepath
                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • trait
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • unset
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • use
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                          • xor
                                                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/php-silex.md b/docs/generators/php-silex.md index 3057c53c8b..7c515f135e 100644 --- a/docs/generators/php-silex.md +++ b/docs/generators/php-silex.md @@ -5,32 +5,32 @@ sidebar_label: php-silex | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -43,83 +43,83 @@ sidebar_label: php-silex ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                          • number
                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                            • DateTime
                                                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                            • string
                                                                                                                                                                                                                                                                                                                            • double
                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                            • mixed
                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                            • integer
                                                                                                                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                                                                                                                            • int
                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                            • DateTime
                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                            • integer
                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                            • mixed
                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                            • number
                                                                                                                                                                                                                                                                                                                            • object
                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                            • string
                                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                            • die
                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                              • __halt_compiler
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • and
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • array
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • as
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                              • callable
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • declare
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • isset
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • use
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • echo
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • unset
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • empty
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • endwhile
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • clone
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • declare
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • die
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • echo
                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                              • elseif
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • empty
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • enddeclare
                                                                                                                                                                                                                                                                                                                              • endfor
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • trait
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • require
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • require_once
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • list
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • include_once
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • exit
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • as
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • endforeach
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • endif
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • endswitch
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • endwhile
                                                                                                                                                                                                                                                                                                                              • eval
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • exit
                                                                                                                                                                                                                                                                                                                              • extends
                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • global
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • __halt_compiler
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                              • foreach
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • global
                                                                                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • array
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • and
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • xor
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                              • include
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • or
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • endswitch
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • enddeclare
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • include_once
                                                                                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • print
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                              • insteadof
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • clone
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • isset
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • list
                                                                                                                                                                                                                                                                                                                              • namespace
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • endif
                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                              • endforeach
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • or
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • print
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • require
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • require_once
                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • trait
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • unset
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • use
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                              • xor
                                                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md index 98b4234e6b..7e6cd21fdb 100644 --- a/docs/generators/php-slim-deprecated.md +++ b/docs/generators/php-slim-deprecated.md @@ -5,18 +5,18 @@ sidebar_label: php-slim-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| ## IMPORT MAPPING @@ -34,93 +34,93 @@ sidebar_label: php-slim-deprecated ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                • DateTime
                                                                                                                                                                                                                                                                                                                                • bool
                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                • string
                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                • double
                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                                • byte
                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                • mixed
                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                • integer
                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                • double
                                                                                                                                                                                                                                                                                                                                • float
                                                                                                                                                                                                                                                                                                                                • int
                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                • DateTime
                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                • integer
                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                • mixed
                                                                                                                                                                                                                                                                                                                                • number
                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                                • object
                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                • string
                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                • void
                                                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                • die
                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                  • __halt_compiler
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • _header_accept
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • _tempbody
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • and
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • array
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • as
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                  • callable
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • declare
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • isset
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • use
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • queryparams
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • echo
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • unset
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • empty
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • resourcepath
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • endwhile
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • clone
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • declare
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • die
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • echo
                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                  • elseif
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • function
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • empty
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • enddeclare
                                                                                                                                                                                                                                                                                                                                  • endfor
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • trait
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • require
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • require_once
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • list
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • formparams
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • headerparams
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • _header_accept
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • include_once
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • exit
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • as
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • endforeach
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • endif
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • endswitch
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • endwhile
                                                                                                                                                                                                                                                                                                                                  • eval
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • exit
                                                                                                                                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • httpbody
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • global
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • __halt_compiler
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • _tempbody
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                                                  • foreach
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • formparams
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • function
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • global
                                                                                                                                                                                                                                                                                                                                  • goto
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • array
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • and
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • xor
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • headerparams
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • httpbody
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                                                                                                  • include
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • or
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • endswitch
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • enddeclare
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • include_once
                                                                                                                                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • print
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                  • insteadof
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • clone
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • isset
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • list
                                                                                                                                                                                                                                                                                                                                  • namespace
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • endif
                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                  • endforeach
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • or
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • print
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • queryparams
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • require
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • require_once
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • resourcepath
                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • trait
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • unset
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • use
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                  • xor
                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/php-slim.md b/docs/generators/php-slim.md deleted file mode 100644 index d9e188a425..0000000000 --- a/docs/generators/php-slim.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Config Options for php-slim -sidebar_label: php-slim ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| -|apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| -|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md index eb3ad79302..1e96ca09b3 100644 --- a/docs/generators/php-slim4.md +++ b/docs/generators/php-slim4.md @@ -5,19 +5,19 @@ sidebar_label: php-slim4 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |psr7Implementation|Slim 4 provides its own PSR-7 implementation so that it works out of the box. However, you are free to replace Slim’s default PSR-7 objects with a third-party implementation. Ref: https://www.slimframework.com/docs/v4/concepts/value-objects.html|
                                                                                                                                                                                                                                                                                                                                  **slim-psr7**
                                                                                                                                                                                                                                                                                                                                  Slim PSR-7 Message implementation
                                                                                                                                                                                                                                                                                                                                  **nyholm-psr7**
                                                                                                                                                                                                                                                                                                                                  Nyholm PSR-7 Message implementation
                                                                                                                                                                                                                                                                                                                                  **guzzle-psr7**
                                                                                                                                                                                                                                                                                                                                  Guzzle PSR-7 Message implementation
                                                                                                                                                                                                                                                                                                                                  **zend-diactoros**
                                                                                                                                                                                                                                                                                                                                  Zend Diactoros PSR-7 Message implementation
                                                                                                                                                                                                                                                                                                                                  |slim-psr7| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |camelCase| ## IMPORT MAPPING @@ -35,93 +35,93 @@ sidebar_label: php-slim4 ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                    • DateTime
                                                                                                                                                                                                                                                                                                                                    • bool
                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                    • string
                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                    • double
                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                                    • byte
                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                    • mixed
                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                    • integer
                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                    • double
                                                                                                                                                                                                                                                                                                                                    • float
                                                                                                                                                                                                                                                                                                                                    • int
                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                    • DateTime
                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                    • integer
                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                    • mixed
                                                                                                                                                                                                                                                                                                                                    • number
                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                                    • object
                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                    • string
                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                    • void
                                                                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                    • die
                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                      • __halt_compiler
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • _header_accept
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • _tempbody
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • and
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • array
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • as
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                      • callable
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • declare
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • isset
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • use
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • queryparams
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • echo
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • unset
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • empty
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • resourcepath
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • endwhile
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • clone
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • declare
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • die
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • echo
                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                      • elseif
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • function
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • empty
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • enddeclare
                                                                                                                                                                                                                                                                                                                                      • endfor
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • trait
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • require
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • require_once
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • list
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • formparams
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • headerparams
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • _header_accept
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • include_once
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • exit
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • as
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • endforeach
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • endif
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • endswitch
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • endwhile
                                                                                                                                                                                                                                                                                                                                      • eval
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • exit
                                                                                                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • httpbody
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • global
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • __halt_compiler
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • _tempbody
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                                      • foreach
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • formparams
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • function
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • global
                                                                                                                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • array
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • and
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • xor
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • headerparams
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • httpbody
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                                                                                      • include
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • or
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • endswitch
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • enddeclare
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • include_once
                                                                                                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • print
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                      • insteadof
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • clone
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • isset
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • list
                                                                                                                                                                                                                                                                                                                                      • namespace
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • endif
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • endforeach
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • or
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • print
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • queryparams
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • require
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • require_once
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • resourcepath
                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • trait
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • unset
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • use
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                      • xor
                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md index 7a58951090..a6fbd33e45 100644 --- a/docs/generators/php-symfony.md +++ b/docs/generators/php-symfony.md @@ -5,24 +5,24 @@ sidebar_label: php-symfony | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| -|composerVendorName|The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets| |null| -|bundleName|The name of the Symfony bundle. The template uses {{bundleName}}| |null| |bundleAlias|The alias of the Symfony bundle. The template uses {{aliasName}}| |null| +|bundleName|The name of the Symfony bundle. The template uses {{bundleName}}| |null| |composerProjectName|The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client| |null| +|composerVendorName|The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| |phpLegacySupport|Should the generated code be compatible with PHP 5.x?| |true| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| ## IMPORT MAPPING @@ -40,91 +40,91 @@ sidebar_label: php-symfony ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                      • number
                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                        • array
                                                                                                                                                                                                                                                                                                                                        • bool
                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                        • array
                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                        • double
                                                                                                                                                                                                                                                                                                                                        • byte
                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                        • mixed
                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                        • double
                                                                                                                                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                                                                                                                                        • int
                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                        • mixed
                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                        • number
                                                                                                                                                                                                                                                                                                                                        • object
                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                        • void
                                                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                        • die
                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                          • __halt_compiler
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • _header_accept
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • _tempbody
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • and
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • array
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • as
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                          • callable
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • declare
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • isset
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • use
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • queryparams
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • echo
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • unset
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • empty
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • resourcepath
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • endwhile
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • clone
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • declare
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • die
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • echo
                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                          • elseif
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • empty
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • enddeclare
                                                                                                                                                                                                                                                                                                                                          • endfor
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • trait
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • require
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • require_once
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • list
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • formparams
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • headerparams
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • _header_accept
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • include_once
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • exit
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • as
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • endforeach
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • endif
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • endswitch
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • endwhile
                                                                                                                                                                                                                                                                                                                                          • eval
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • exit
                                                                                                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • httpbody
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • global
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • __halt_compiler
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • _tempbody
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                          • foreach
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • formparams
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • global
                                                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • array
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • and
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • xor
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • headerparams
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • httpbody
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                                          • include
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • or
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • endswitch
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • enddeclare
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • include_once
                                                                                                                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • print
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                          • insteadof
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • clone
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • isset
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • list
                                                                                                                                                                                                                                                                                                                                          • namespace
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • endif
                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                          • endforeach
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • or
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • print
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • queryparams
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • require
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • require_once
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • resourcepath
                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • trait
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • unset
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • use
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                          • xor
                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md index f11bf4f5d9..99bf251414 100644 --- a/docs/generators/php-ze-ph.md +++ b/docs/generators/php-ze-ph.md @@ -5,39 +5,39 @@ sidebar_label: php-ze-ph | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -50,93 +50,93 @@ sidebar_label: php-ze-ph ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                            • DateTime
                                                                                                                                                                                                                                                                                                                                            • bool
                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                            • string
                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                            • double
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                                                                            • byte
                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                            • mixed
                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                            • integer
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                            • double
                                                                                                                                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                                                                                                                                            • int
                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                            • DateTime
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                            • integer
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                            • mixed
                                                                                                                                                                                                                                                                                                                                            • number
                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                                                                            • object
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                            • string
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                            • void
                                                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                            • die
                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                              • __halt_compiler
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • _header_accept
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • _tempbody
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • and
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • array
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • as
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                              • callable
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • declare
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • isset
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • use
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • queryparams
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • echo
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • unset
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • empty
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • resourcepath
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • endwhile
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • clone
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • declare
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • die
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • echo
                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                              • elseif
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • empty
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • enddeclare
                                                                                                                                                                                                                                                                                                                                              • endfor
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • trait
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • require
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • require_once
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • list
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • formparams
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • headerparams
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • _header_accept
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • include_once
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • exit
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • as
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • endforeach
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • endif
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • endswitch
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • endwhile
                                                                                                                                                                                                                                                                                                                                              • eval
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • exit
                                                                                                                                                                                                                                                                                                                                              • extends
                                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • httpbody
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • global
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • __halt_compiler
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • _tempbody
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                              • foreach
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • formparams
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • global
                                                                                                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • array
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • and
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • xor
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • headerparams
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • httpbody
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                                              • include
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • or
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • endswitch
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • enddeclare
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • include_once
                                                                                                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • print
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                              • insteadof
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • clone
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • isset
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • list
                                                                                                                                                                                                                                                                                                                                              • namespace
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • endif
                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                              • endforeach
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • or
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • print
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • queryparams
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • require
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • require_once
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • resourcepath
                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • trait
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • unset
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • use
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                              • xor
                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/php.md b/docs/generators/php.md index 3306fbc557..b8de32ff81 100644 --- a/docs/generators/php.md +++ b/docs/generators/php.md @@ -5,19 +5,19 @@ sidebar_label: php | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| -|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| -|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| -|srcBasePath|The directory to serve as source root.| |null| |artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |true| +|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null| +|modelPackage|package for generated models| |null| +|packageName|The main package name for classes. e.g. GeneratedPetstore| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|srcBasePath|The directory to serve as source root.| |null| +|variableNamingConvention|naming convention of variable name, e.g. camelCase.| |snake_case| ## IMPORT MAPPING @@ -35,93 +35,93 @@ sidebar_label: php ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                • DateTime
                                                                                                                                                                                                                                                                                                                                                • bool
                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                • string
                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                • double
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                                                • byte
                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                • mixed
                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                • integer
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                • double
                                                                                                                                                                                                                                                                                                                                                • float
                                                                                                                                                                                                                                                                                                                                                • int
                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                • DateTime
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                • integer
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                • mixed
                                                                                                                                                                                                                                                                                                                                                • number
                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                                                • object
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                • string
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                • void
                                                                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                • die
                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                  • __halt_compiler
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • _header_accept
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • _tempbody
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • and
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • array
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • as
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                  • callable
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • declare
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • isset
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • use
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • queryparams
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • echo
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • unset
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • empty
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • resourcepath
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • endwhile
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • clone
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • declare
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • die
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • echo
                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                  • elseif
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • function
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • empty
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • enddeclare
                                                                                                                                                                                                                                                                                                                                                  • endfor
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • trait
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • require
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • require_once
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • list
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • formparams
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • headerparams
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • _header_accept
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • include_once
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • exit
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • as
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • endforeach
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • endif
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • endswitch
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • endwhile
                                                                                                                                                                                                                                                                                                                                                  • eval
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • exit
                                                                                                                                                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • httpbody
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • global
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • __halt_compiler
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • _tempbody
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                                                                  • foreach
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • formparams
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • function
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • global
                                                                                                                                                                                                                                                                                                                                                  • goto
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • array
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • and
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • xor
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • headerparams
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • httpbody
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                                                                                                                  • include
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • or
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • endswitch
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • enddeclare
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • include_once
                                                                                                                                                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • print
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                  • insteadof
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • clone
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • isset
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • list
                                                                                                                                                                                                                                                                                                                                                  • namespace
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • endif
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • endforeach
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • or
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • print
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • queryparams
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • require
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • require_once
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • resourcepath
                                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • trait
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • unset
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • use
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                  • xor
                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/powershell.md b/docs/generators/powershell.md index f4d5daaf73..e8fcfaf8af 100644 --- a/docs/generators/powershell.md +++ b/docs/generators/powershell.md @@ -5,30 +5,30 @@ sidebar_label: powershell | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Client package name (e.g. org.openapitools.client).| |Org.OpenAPITools| -|packageGuid|GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default.| |null| |csharpClientPath|Path to the C# API client generated by OpenAPI Generator, e.g. $ScriptDir\..\csharp\OpenAPIClient where $ScriptDir is the current directory. NOTE: you will need to generate the C# API client separately.| |$ScriptDir\csharp\OpenAPIClient| +|packageGuid|GUID for PowerShell module (e.g. a27b908d-2a20-467f-bc32-af6f3a654ac5). A random GUID will be generated by default.| |null| +|packageName|Client package name (e.g. org.openapitools.client).| |Org.OpenAPITools| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -39,62 +39,62 @@ sidebar_label: powershell ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                  • System.DateTime
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • SByte
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • XmlDocument
                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                  • String
                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • Byte
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • Byte[]
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • Char
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • Decimal
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                                                                                                    • Guid
                                                                                                                                                                                                                                                                                                                                                    • Int16
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Uri
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • TimeSpan
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Decimal
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Byte[]
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Int64
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Single
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Version
                                                                                                                                                                                                                                                                                                                                                    • Int32
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Char
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Byte
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • UInt16
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • Int64
                                                                                                                                                                                                                                                                                                                                                    • ProgressRecord
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • UInt64
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • UInt32
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • SByte
                                                                                                                                                                                                                                                                                                                                                    • SecureString
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • Single
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • System.DateTime
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • TimeSpan
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • UInt16
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • UInt32
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • UInt64
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • Uri
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • Version
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                    • XmlDocument
                                                                                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                    • In
                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                    • Catch
                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                      • Begin
                                                                                                                                                                                                                                                                                                                                                      • Break
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Process
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Catch
                                                                                                                                                                                                                                                                                                                                                      • Continue
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Elseif
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Function
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Dynamicparam
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Throw
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Begin
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Try
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Private
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Exit
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Until
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Return
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • For
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Local
                                                                                                                                                                                                                                                                                                                                                      • Data
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Trap
                                                                                                                                                                                                                                                                                                                                                      • Do
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • From
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • While
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Switch
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Filter
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Dynamicparam
                                                                                                                                                                                                                                                                                                                                                      • Else
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Param
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Foreach
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Elseif
                                                                                                                                                                                                                                                                                                                                                      • End
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • If
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • Where
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Exit
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Filter
                                                                                                                                                                                                                                                                                                                                                      • Finally
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • For
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Foreach
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • From
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Function
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • If
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • In
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Local
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Param
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Private
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Process
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Return
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Switch
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Throw
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Trap
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Try
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Until
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • Where
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                      • While
                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/protobuf-schema.md b/docs/generators/protobuf-schema.md index e12611217f..71b97282c3 100644 --- a/docs/generators/protobuf-schema.md +++ b/docs/generators/protobuf-schema.md @@ -21,23 +21,23 @@ sidebar_label: protobuf-schema ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                      • fixed64
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • fixed32
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • sint64
                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                      • sint32
                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                        • array
                                                                                                                                                                                                                                                                                                                                                        • bool
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • sfixed64
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • double
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • array
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • int32
                                                                                                                                                                                                                                                                                                                                                        • bytes
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • double
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • fixed32
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • fixed64
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • int32
                                                                                                                                                                                                                                                                                                                                                        • int64
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • uint64
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • sfixed32
                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                        • uint32
                                                                                                                                                                                                                                                                                                                                                        • map
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • sfixed32
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • sfixed64
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • sint32
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • sint64
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • uint32
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                        • uint64
                                                                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md index c6c59087e7..3fa24defa3 100644 --- a/docs/generators/python-aiohttp.md +++ b/docs/generators/python-aiohttp.md @@ -5,39 +5,39 @@ sidebar_label: python-aiohttp | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|packageName|python package name (convention: snake_case).| |openapi_server| -|packageVersion|python package version.| |1.0.0| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| -|supportPython2|support python2| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|packageName|python package name (convention: snake_case).| |openapi_server| +|packageVersion|python package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen to in app.run| |8080| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportPython2|support python2| |false| |useNose|use the nose test framework| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -48,57 +48,57 @@ sidebar_label: python-aiohttp ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                        • str
                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                          • Dict
                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                          • List
                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                          • bool
                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                          • bytearray
                                                                                                                                                                                                                                                                                                                                                          • date
                                                                                                                                                                                                                                                                                                                                                          • datetime
                                                                                                                                                                                                                                                                                                                                                          • file
                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                          • bool
                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                          • Dict
                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                          • bytearray
                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                          • List
                                                                                                                                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                          • str
                                                                                                                                                                                                                                                                                                                                                          ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                            • and
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • as
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • assert
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • break
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • class
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                                                                                                                                                            • def
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • for
                                                                                                                                                                                                                                                                                                                                                            • del
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • elif
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • except
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • exec
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • false
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • finally
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • for
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • from
                                                                                                                                                                                                                                                                                                                                                            • global
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • if
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • import
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • in
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • is
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • lambda
                                                                                                                                                                                                                                                                                                                                                            • none
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                                                                            • nonlocal
                                                                                                                                                                                                                                                                                                                                                            • not
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • lambda
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • and
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • assert
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • yield
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • property
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • raise
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • from
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • if
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • class
                                                                                                                                                                                                                                                                                                                                                            • or
                                                                                                                                                                                                                                                                                                                                                            • pass
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • break
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • in
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • finally
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • false
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • is
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • elif
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • with
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • as
                                                                                                                                                                                                                                                                                                                                                            • print
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • true
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • self
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • except
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • try
                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                            • exec
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • property
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • raise
                                                                                                                                                                                                                                                                                                                                                            • return
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • self
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • true
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • try
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • with
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                            • yield
                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md index cb290b83ed..6acfe09100 100644 --- a/docs/generators/python-blueplanet.md +++ b/docs/generators/python-blueplanet.md @@ -5,39 +5,39 @@ sidebar_label: python-blueplanet | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|packageName|python package name (convention: snake_case).| |openapi_server| -|packageVersion|python package version.| |1.0.0| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| -|supportPython2|support python2| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|packageName|python package name (convention: snake_case).| |openapi_server| +|packageVersion|python package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen to in app.run| |8080| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportPython2|support python2| |false| |useNose|use the nose test framework| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -48,57 +48,57 @@ sidebar_label: python-blueplanet ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                            • str
                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                              • Dict
                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                              • List
                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                              • bool
                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                              • byte
                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                              • bytearray
                                                                                                                                                                                                                                                                                                                                                              • date
                                                                                                                                                                                                                                                                                                                                                              • datetime
                                                                                                                                                                                                                                                                                                                                                              • file
                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                              • bool
                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                              • Dict
                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                              • byte
                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                              • bytearray
                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                              • List
                                                                                                                                                                                                                                                                                                                                                              • float
                                                                                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                              • str
                                                                                                                                                                                                                                                                                                                                                              ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                • and
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • as
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • assert
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • break
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • class
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                                                                                                                                                • def
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • for
                                                                                                                                                                                                                                                                                                                                                                • del
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • elif
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • else
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • except
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • exec
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • false
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • finally
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • for
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • from
                                                                                                                                                                                                                                                                                                                                                                • global
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • if
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • import
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • in
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • is
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • lambda
                                                                                                                                                                                                                                                                                                                                                                • none
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                                                                                                                                • nonlocal
                                                                                                                                                                                                                                                                                                                                                                • not
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • lambda
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • and
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • assert
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • else
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • yield
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • property
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • raise
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • from
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • if
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • class
                                                                                                                                                                                                                                                                                                                                                                • or
                                                                                                                                                                                                                                                                                                                                                                • pass
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • break
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • in
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • finally
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • false
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • is
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • elif
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • with
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • as
                                                                                                                                                                                                                                                                                                                                                                • print
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • true
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • self
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • except
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • try
                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                • exec
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • property
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • raise
                                                                                                                                                                                                                                                                                                                                                                • return
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • self
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • true
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • try
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • with
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                • yield
                                                                                                                                                                                                                                                                                                                                                                diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md index a45c61e616..1c42e76919 100644 --- a/docs/generators/python-experimental.md +++ b/docs/generators/python-experimental.md @@ -5,15 +5,15 @@ sidebar_label: python-experimental | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|python package name (convention: snake_case).| |openapi_client| -|projectName|python project name in setup.py (e.g. petstore-api).| |null| -|packageVersion|python package version.| |1.0.0| -|packageUrl|python package URL.| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false| -|useNose|use the nose test framework| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3| +|packageName|python package name (convention: snake_case).| |openapi_client| +|packageUrl|python package URL.| |null| +|packageVersion|python package version.| |1.0.0| +|projectName|python project name in setup.py (e.g. petstore-api).| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|useNose|use the nose test framework| |false| ## IMPORT MAPPING @@ -30,68 +30,68 @@ sidebar_label: python-experimental ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                • str
                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                  • bool
                                                                                                                                                                                                                                                                                                                                                                  • date
                                                                                                                                                                                                                                                                                                                                                                  • datetime
                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                  • file
                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                  • none_type
                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                  • bool
                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                  • file_type
                                                                                                                                                                                                                                                                                                                                                                  • dict
                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                  • file
                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                  • file_type
                                                                                                                                                                                                                                                                                                                                                                  • float
                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                  • list
                                                                                                                                                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                  • list
                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                  • none_type
                                                                                                                                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                  • str
                                                                                                                                                                                                                                                                                                                                                                  ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                    • all_params
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • and
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • as
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • assert
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • async
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • auth_settings
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • await
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • body_params
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • break
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • class
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                                                                                                                                    • def
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • del
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • elif
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • except
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • exec
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • false
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • finally
                                                                                                                                                                                                                                                                                                                                                                    • for
                                                                                                                                                                                                                                                                                                                                                                    • form_params
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • local_var_files
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • del
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • from
                                                                                                                                                                                                                                                                                                                                                                    • global
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • header_params
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • if
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • import
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • in
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • is
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • lambda
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • local_var_files
                                                                                                                                                                                                                                                                                                                                                                    • none
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                                                                                                                                    • nonlocal
                                                                                                                                                                                                                                                                                                                                                                    • not
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • lambda
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • and
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • assert
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • resource_path
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • yield
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • property
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • raise
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • await
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • path_params
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • from
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • if
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • class
                                                                                                                                                                                                                                                                                                                                                                    • or
                                                                                                                                                                                                                                                                                                                                                                    • pass
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • break
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • in
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • finally
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • all_params
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • false
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • body_params
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • is
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • elif
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • auth_settings
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • header_params
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • with
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • async
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • as
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • path_params
                                                                                                                                                                                                                                                                                                                                                                    • print
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • property
                                                                                                                                                                                                                                                                                                                                                                    • query_params
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • true
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • self
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • except
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • try
                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                    • exec
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • raise
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • resource_path
                                                                                                                                                                                                                                                                                                                                                                    • return
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • self
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • true
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • try
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • with
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                    • yield
                                                                                                                                                                                                                                                                                                                                                                    diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md index c09d7d993a..1f76e43466 100644 --- a/docs/generators/python-flask.md +++ b/docs/generators/python-flask.md @@ -5,39 +5,39 @@ sidebar_label: python-flask | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|packageName|python package name (convention: snake_case).| |openapi_server| -|packageVersion|python package version.| |1.0.0| |controllerPackage|controller package| |controllers| |defaultController|default controller| |default_controller| -|supportPython2|support python2| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|packageName|python package name (convention: snake_case).| |openapi_server| +|packageVersion|python package version.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |serverPort|TCP port to listen to in app.run| |8080| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportPython2|support python2| |false| |useNose|use the nose test framework| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -48,57 +48,57 @@ sidebar_label: python-flask ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                    • str
                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                      • Dict
                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                      • List
                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                      • bool
                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                      • byte
                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                      • bytearray
                                                                                                                                                                                                                                                                                                                                                                      • date
                                                                                                                                                                                                                                                                                                                                                                      • datetime
                                                                                                                                                                                                                                                                                                                                                                      • file
                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                      • bool
                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                      • Dict
                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                      • byte
                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                      • bytearray
                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                      • List
                                                                                                                                                                                                                                                                                                                                                                      • float
                                                                                                                                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                      • str
                                                                                                                                                                                                                                                                                                                                                                      ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                        • and
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • as
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • assert
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • break
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • class
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • continue
                                                                                                                                                                                                                                                                                                                                                                        • def
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • for
                                                                                                                                                                                                                                                                                                                                                                        • del
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • elif
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • else
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • except
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • exec
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • false
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • finally
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • for
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • from
                                                                                                                                                                                                                                                                                                                                                                        • global
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • if
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • import
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • in
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • is
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • lambda
                                                                                                                                                                                                                                                                                                                                                                        • none
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • while
                                                                                                                                                                                                                                                                                                                                                                        • nonlocal
                                                                                                                                                                                                                                                                                                                                                                        • not
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • lambda
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • and
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • assert
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • else
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • continue
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • yield
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • property
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • raise
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • from
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • if
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • class
                                                                                                                                                                                                                                                                                                                                                                        • or
                                                                                                                                                                                                                                                                                                                                                                        • pass
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • break
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • in
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • finally
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • false
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • is
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • elif
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • with
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • as
                                                                                                                                                                                                                                                                                                                                                                        • print
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • true
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • self
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • except
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • try
                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                        • exec
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • property
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • raise
                                                                                                                                                                                                                                                                                                                                                                        • return
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • self
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • true
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • try
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • while
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • with
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                        • yield
                                                                                                                                                                                                                                                                                                                                                                        diff --git a/docs/generators/python.md b/docs/generators/python.md index 2a394af036..19e268b90d 100644 --- a/docs/generators/python.md +++ b/docs/generators/python.md @@ -5,15 +5,15 @@ sidebar_label: python | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|python package name (convention: snake_case).| |openapi_client| -|projectName|python project name in setup.py (e.g. petstore-api).| |null| -|packageVersion|python package version.| |1.0.0| -|packageUrl|python package URL.| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false| -|useNose|use the nose test framework| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3| +|packageName|python package name (convention: snake_case).| |openapi_client| +|packageUrl|python package URL.| |null| +|packageVersion|python package version.| |1.0.0| +|projectName|python project name in setup.py (e.g. petstore-api).| |null| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|useNose|use the nose test framework| |false| ## IMPORT MAPPING @@ -29,66 +29,66 @@ sidebar_label: python ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                        • str
                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                          • bool
                                                                                                                                                                                                                                                                                                                                                                          • date
                                                                                                                                                                                                                                                                                                                                                                          • datetime
                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                          • file
                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                          • bool
                                                                                                                                                                                                                                                                                                                                                                          • dict
                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                          • file
                                                                                                                                                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                          • list
                                                                                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                          • list
                                                                                                                                                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                          • str
                                                                                                                                                                                                                                                                                                                                                                          ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                            • all_params
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • and
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • as
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • assert
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • async
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • auth_settings
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • await
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • body_params
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • break
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • class
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                                                                                                                                                                            • def
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • del
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • elif
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • except
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • exec
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • false
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • finally
                                                                                                                                                                                                                                                                                                                                                                            • for
                                                                                                                                                                                                                                                                                                                                                                            • form_params
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • local_var_files
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • del
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • from
                                                                                                                                                                                                                                                                                                                                                                            • global
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • header_params
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • if
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • import
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • in
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • is
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • lambda
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • local_var_files
                                                                                                                                                                                                                                                                                                                                                                            • none
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                                                                                            • nonlocal
                                                                                                                                                                                                                                                                                                                                                                            • not
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • lambda
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • and
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • assert
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • resource_path
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • yield
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • property
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • raise
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • await
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • path_params
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • from
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • if
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • class
                                                                                                                                                                                                                                                                                                                                                                            • or
                                                                                                                                                                                                                                                                                                                                                                            • pass
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • break
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • in
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • finally
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • all_params
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • false
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • body_params
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • is
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • elif
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • auth_settings
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • header_params
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • with
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • async
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • as
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • path_params
                                                                                                                                                                                                                                                                                                                                                                            • print
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • property
                                                                                                                                                                                                                                                                                                                                                                            • query_params
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • true
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • self
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • except
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • try
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • exec
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • raise
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • resource_path
                                                                                                                                                                                                                                                                                                                                                                            • return
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • self
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • true
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • try
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • with
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • yield
                                                                                                                                                                                                                                                                                                                                                                            diff --git a/docs/generators/r.md b/docs/generators/r.md index e304948fdc..8d71a39a69 100644 --- a/docs/generators/r.md +++ b/docs/generators/r.md @@ -5,11 +5,11 @@ sidebar_label: r | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|exceptionPackage|Specify the exception handling package|
                                                                                                                                                                                                                                                                                                                                                                            **default**
                                                                                                                                                                                                                                                                                                                                                                            Use stop() for raising exceptions.
                                                                                                                                                                                                                                                                                                                                                                            **rlang**
                                                                                                                                                                                                                                                                                                                                                                            Use rlang package for exceptions.
                                                                                                                                                                                                                                                                                                                                                                            |default| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |packageName|R package name (convention: lowercase).| |openapi| |packageVersion|R package version.| |1.0.0| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |returnExceptionOnFailure|Throw an exception on non success response codes| |false| -|exceptionPackage|Specify the exception handling package|
                                                                                                                                                                                                                                                                                                                                                                            **default**
                                                                                                                                                                                                                                                                                                                                                                            Use stop() for raising exceptions.
                                                                                                                                                                                                                                                                                                                                                                            **rlang**
                                                                                                                                                                                                                                                                                                                                                                            Use rlang package for exceptions.
                                                                                                                                                                                                                                                                                                                                                                            |default| ## IMPORT MAPPING @@ -26,32 +26,32 @@ sidebar_label: r ## LANGUAGE PRIMITIVES
                                                                                                                                                                                                                                                                                                                                                                            • character
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • numeric
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • integer
                                                                                                                                                                                                                                                                                                                                                                            • data.frame
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • integer
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                            • numeric
                                                                                                                                                                                                                                                                                                                                                                            • object
                                                                                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                            • next
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • inf
                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                            • in
                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                              • apiresponse
                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • apiresponse
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • na
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • na_character_
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • na_integer_
                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • repeat
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • na_complex_
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • nan
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • na_real_
                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • inf
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • na
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • na_character_
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • na_complex_
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • na_integer_
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • na_real_
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • nan
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • next
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • repeat
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/ruby-on-rails.md b/docs/generators/ruby-on-rails.md index 07e9f93fb2..82d9f33bb3 100644 --- a/docs/generators/ruby-on-rails.md +++ b/docs/generators/ruby-on-rails.md @@ -11,22 +11,22 @@ sidebar_label: ruby-on-rails | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -37,56 +37,56 @@ sidebar_label: ruby-on-rails ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                              • Integer
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • Array
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • Float
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • Object
                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                              • String
                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                • Array
                                                                                                                                                                                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                • Hash
                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                • File
                                                                                                                                                                                                                                                                                                                                                                                • Date
                                                                                                                                                                                                                                                                                                                                                                                • DateTime
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                • File
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                • Hash
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                • Integer
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                • String
                                                                                                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                • next
                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                • defined?
                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                  • __file__
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • __line__
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • alias
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • and
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • begin
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                  • def
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • redo
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • defined?
                                                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                                                  • elsif
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • when
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • end
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • ensure
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • in
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • module
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • next
                                                                                                                                                                                                                                                                                                                                                                                  • nil
                                                                                                                                                                                                                                                                                                                                                                                  • not
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • unless
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • and
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • alias
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • end
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • rescue
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • retry
                                                                                                                                                                                                                                                                                                                                                                                  • or
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • ensure
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • in
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • module
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • undef
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • then
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • __line__
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • __file__
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • self
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • until
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • begin
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • redo
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • rescue
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • retry
                                                                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • self
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • then
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • undef
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • unless
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • until
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • when
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/ruby-sinatra.md b/docs/generators/ruby-sinatra.md index 6d6af85c58..b759489632 100644 --- a/docs/generators/ruby-sinatra.md +++ b/docs/generators/ruby-sinatra.md @@ -10,22 +10,22 @@ sidebar_label: ruby-sinatra | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -36,56 +36,56 @@ sidebar_label: ruby-sinatra ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                  • Integer
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • Array
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • Float
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • Object
                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                  • String
                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                    • Array
                                                                                                                                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                    • Hash
                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                    • File
                                                                                                                                                                                                                                                                                                                                                                                    • Date
                                                                                                                                                                                                                                                                                                                                                                                    • DateTime
                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                    • File
                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                    • Hash
                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                    • Integer
                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                    • next
                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                    • defined?
                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                      • __file__
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • __line__
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • alias
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • and
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • begin
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                      • def
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • redo
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • defined?
                                                                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                                                                      • elsif
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • when
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • end
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • ensure
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • in
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • module
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • next
                                                                                                                                                                                                                                                                                                                                                                                      • nil
                                                                                                                                                                                                                                                                                                                                                                                      • not
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • unless
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • and
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • alias
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • end
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • rescue
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • retry
                                                                                                                                                                                                                                                                                                                                                                                      • or
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • ensure
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • in
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • module
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • undef
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • then
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • __line__
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • __file__
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • self
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • until
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • begin
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • redo
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • rescue
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • retry
                                                                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • self
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • then
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • undef
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • unless
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • until
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • when
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 15d27a0fd1..f749fa9667 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -5,23 +5,23 @@ sidebar_label: ruby | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|gemName|gem name (convention: underscore_case).| |openapi_client| -|moduleName|top module name (convention: CamelCase, usually corresponding to gem name).| |OpenAPIClient| -|gemVersion|gem version.| |1.0.0| -|gemLicense|gem license. | |unlicense| -|gemRequiredRubyVersion|gem required Ruby version. | |>= 1.9| -|gemHomepage|gem homepage. | |http://org.openapitools| -|gemSummary|gem summary. | |A ruby wrapper for the REST APIs| -|gemDescription|gem description. | |This gem maps to a REST API| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |gemAuthor|gem author (only one is supported).| |null| |gemAuthorEmail|gem author email (only one is supported).| |null| +|gemDescription|gem description. | |This gem maps to a REST API| +|gemHomepage|gem homepage. | |http://org.openapitools| +|gemLicense|gem license. | |unlicense| +|gemName|gem name (convention: underscore_case).| |openapi_client| +|gemRequiredRubyVersion|gem required Ruby version. | |>= 1.9| +|gemSummary|gem summary. | |A ruby wrapper for the REST APIs| +|gemVersion|gem version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|HTTP library template (sub-template) to use|
                                                                                                                                                                                                                                                                                                                                                                                      **faraday**
                                                                                                                                                                                                                                                                                                                                                                                      Faraday (https://github.com/lostisland/faraday) (Beta support)
                                                                                                                                                                                                                                                                                                                                                                                      **typhoeus**
                                                                                                                                                                                                                                                                                                                                                                                      Typhoeus >= 1.0.1 (https://github.com/typhoeus/typhoeus)
                                                                                                                                                                                                                                                                                                                                                                                      |typhoeus| +|moduleName|top module name (convention: CamelCase, usually corresponding to gem name).| |OpenAPIClient| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| ## IMPORT MAPPING @@ -37,70 +37,70 @@ sidebar_label: ruby ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                      • string
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • String
                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                      • Hash
                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                        • Array
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                                                                                                                                                                        • Date
                                                                                                                                                                                                                                                                                                                                                                                        • DateTime
                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                        • int
                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                        • Integer
                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                        • Array
                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                        • array
                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                                                                                                                                                                        • File
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                        • Hash
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                        • Integer
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                        • array
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                        • int
                                                                                                                                                                                                                                                                                                                                                                                        • map
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                        • next
                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                        • defined?
                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                        • def
                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                          • __file__
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • __line__
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • _header_accept
                                                                                                                                                                                                                                                                                                                                                                                          • _header_accept_result
                                                                                                                                                                                                                                                                                                                                                                                          • _header_content_type
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • local_var_path
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • form_params
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • redo
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • alias
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • and
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • auth_names
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • begin
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • def
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • defined?
                                                                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                          • elsif
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • when
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • end
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • ensure
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • form_params
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • header_params
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • local_var_path
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • module
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • next
                                                                                                                                                                                                                                                                                                                                                                                          • nil
                                                                                                                                                                                                                                                                                                                                                                                          • not
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • unless
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • and
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • alias
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • end
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • rescue
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • retry
                                                                                                                                                                                                                                                                                                                                                                                          • or
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • ensure
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • module
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • undef
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • then
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • _header_accept
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • header_params
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • __line__
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • auth_names
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • __file__
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • query_params
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • self
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • until
                                                                                                                                                                                                                                                                                                                                                                                          • post_body
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • begin
                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                          • send
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • query_params
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • redo
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • rescue
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • retry
                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • self
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • send
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • then
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • undef
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • unless
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • until
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • when
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/rust-server.md b/docs/generators/rust-server.md index c17eb0390f..50551fa841 100644 --- a/docs/generators/rust-server.md +++ b/docs/generators/rust-server.md @@ -24,75 +24,75 @@ sidebar_label: rust-server ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                          • u8
                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                                                                                                                                                                            • bool
                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                            • char
                                                                                                                                                                                                                                                                                                                                                                                            • f32
                                                                                                                                                                                                                                                                                                                                                                                            • f64
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • i64
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • i32
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • i8
                                                                                                                                                                                                                                                                                                                                                                                            • i16
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • usize
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • str
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • u64
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • u32
                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                            • i32
                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                            • i64
                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                            • i8
                                                                                                                                                                                                                                                                                                                                                                                            • isize
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • char
                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                            • str
                                                                                                                                                                                                                                                                                                                                                                                            • u16
                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                            • u32
                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                            • u64
                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                            • u8
                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                            • usize
                                                                                                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                            • struct
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • mod
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • use
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • extern
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • type
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • impl
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • ref
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • loop
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • trait
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • let
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • priv
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • if
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • static
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • in
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • sizeof
                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                            • enum
                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • alignof
                                                                                                                                                                                                                                                                                                                                                                                              • as
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                                              • become
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • virtual
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • box
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • crate
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • enum
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • extern
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                                                                                              • fn
                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • box
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • pure
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • unsafe
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • mut
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • yield
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • offsetof
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • where
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • override
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • typeof
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • impl
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • let
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • loop
                                                                                                                                                                                                                                                                                                                                                                                              • macro
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • move
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • proc
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • alignof
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                              • match
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • crate
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • self
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • mod
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • move
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • mut
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • offsetof
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • override
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • priv
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • proc
                                                                                                                                                                                                                                                                                                                                                                                              • pub
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • pure
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • ref
                                                                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • self
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • sizeof
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • struct
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • trait
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • type
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • typeof
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • unsafe
                                                                                                                                                                                                                                                                                                                                                                                              • unsized
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • use
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • virtual
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • where
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                              • yield
                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/rust.md b/docs/generators/rust.md index 42c924301a..9dfff407df 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -5,31 +5,31 @@ sidebar_label: rust | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Rust package name (convention: lowercase).| |openapi| -|packageVersion|Rust package version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |library|library template (sub-template) to use.|
                                                                                                                                                                                                                                                                                                                                                                                              **hyper**
                                                                                                                                                                                                                                                                                                                                                                                              HTTP client: Hyper.
                                                                                                                                                                                                                                                                                                                                                                                              **reqwest**
                                                                                                                                                                                                                                                                                                                                                                                              HTTP client: Reqwest.
                                                                                                                                                                                                                                                                                                                                                                                              |hyper| +|packageName|Rust package name (convention: lowercase).| |openapi| +|packageVersion|Rust package version.| |1.0.0| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -40,74 +40,74 @@ sidebar_label: rust ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                              • u8
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • f32
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • bool
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • f64
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • i64
                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                              • i32
                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                • File
                                                                                                                                                                                                                                                                                                                                                                                                • String
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • i8
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • i16
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • u64
                                                                                                                                                                                                                                                                                                                                                                                                • Vec<u8>
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • u32
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                • bool
                                                                                                                                                                                                                                                                                                                                                                                                • char
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                • f32
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                • f64
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                • i16
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                • i32
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                • i64
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                • i8
                                                                                                                                                                                                                                                                                                                                                                                                • u16
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • File
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                • u32
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                • u64
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                • u8
                                                                                                                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                • struct
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • mod
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • use
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • extern
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • do
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • type
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • impl
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • ref
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • else
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • loop
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • trait
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • let
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • priv
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • if
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • static
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • in
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • sizeof
                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                • enum
                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • alignof
                                                                                                                                                                                                                                                                                                                                                                                                  • as
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                                  • become
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • virtual
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • box
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • crate
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • enum
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • extern
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                                                                                                                                                  • fn
                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • box
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • pure
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • unsafe
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • mut
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • offsetof
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • where
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • override
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • typeof
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • impl
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • in
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • let
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • loop
                                                                                                                                                                                                                                                                                                                                                                                                  • macro
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • move
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • proc
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • alignof
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                  • match
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • crate
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • self
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • mod
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • move
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • mut
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • offsetof
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • override
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • priv
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • proc
                                                                                                                                                                                                                                                                                                                                                                                                  • pub
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • pure
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • ref
                                                                                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • self
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • sizeof
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • struct
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • trait
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • type
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • typeof
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • unsafe
                                                                                                                                                                                                                                                                                                                                                                                                  • unsized
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • use
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • virtual
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • where
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md index e24f0977b4..3ad7d16a08 100644 --- a/docs/generators/scala-akka.md +++ b/docs/generators/scala-akka.md @@ -5,102 +5,102 @@ sidebar_label: scala-akka | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| -|ListBuffer|scala.collection.mutable.ListBuffer| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.DateTime| -|Array|java.util.List| -|ListSet|scala.collection.immutable.ListSet| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES | Type/Alias | Instantiated By | | ---------- | --------------- | -|set|Set| |array|ListBuffer| |map|Map| +|set|Set| ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                  • String
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • Double
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • Any
                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                  • Int
                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                    • Any
                                                                                                                                                                                                                                                                                                                                                                                                    • Array
                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                    • Long
                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                    • List
                                                                                                                                                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                    • Int
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                    • List
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                    • Long
                                                                                                                                                                                                                                                                                                                                                                                                    • Map
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                                                                                                                                                                                    • Seq
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                    • implicit
                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                    • private
                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                      • def
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • forsome
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • implicit
                                                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                                                      • lazy
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • type
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • trait
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • override
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • forsome
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • val
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • sealed
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                                      • match
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • with
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • override
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • sealed
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • trait
                                                                                                                                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • type
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • val
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • with
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/scala-finch.md b/docs/generators/scala-finch.md index 7a286005eb..764ea5fd71 100644 --- a/docs/generators/scala-finch.md +++ b/docs/generators/scala-finch.md @@ -5,29 +5,29 @@ sidebar_label: scala-finch | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|packageName|Finch package name (e.g. org.openapitools).| |org.openapitools| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| +|modelPackage|package for generated models| |null| +|packageName|Finch package name (e.g. org.openapitools).| |org.openapitools| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|java.time.LocalDateTime| -|LocalTime|java.time.LocalTime| -|HashMap|scala.collection.immutable.HashMap| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|java.time.LocalDate| +|ArrayBuffer|scala.collection.mutable.ArrayBuffer| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|java.time.LocalDateTime| -|ZonedDateTime|java.time.ZonedDateTime| -|ArrayBuffer|scala.collection.mutable.ArrayBuffer| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|scala.collection.immutable.HashMap| +|LocalDate|java.time.LocalDate| +|LocalDateTime|java.time.LocalDateTime| +|LocalTime|java.time.LocalTime| |Map|scala.collection.immutable.Map| |Seq|scala.collection.immutable.Seq| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| +|ZonedDateTime|java.time.ZonedDateTime| ## INSTANTIATION TYPES @@ -40,85 +40,85 @@ sidebar_label: scala-finch ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                      • Integer
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • Float
                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                      • AnyVal
                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                        • Any
                                                                                                                                                                                                                                                                                                                                                                                                        • AnyRef
                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                        • AnyVal
                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                        • Int
                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                        • Integer
                                                                                                                                                                                                                                                                                                                                                                                                        • Long
                                                                                                                                                                                                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • Any
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • Int
                                                                                                                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                        • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • def
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • do
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • type
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • while
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • protected
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • else
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • continue
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • trait
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • catch
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • forsome
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • if
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • case
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • val
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • new
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • package
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • static
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • void
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • sealed
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • var
                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                        • double
                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • assert
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • strictfp
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • throws
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • def
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • forsome
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                                                                                                          • implicit
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • lazy
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • assert
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • override
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • match
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • with
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • lazy
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • match
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • override
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • sealed
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • strictfp
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • throws
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • trait
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • type
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • val
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • with
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md index 810d1887c4..3354299227 100644 --- a/docs/generators/scala-gatling.md +++ b/docs/generators/scala-gatling.md @@ -5,112 +5,112 @@ sidebar_label: scala-gatling | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |null| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| -|ListBuffer|scala.collection.mutable.ListBuffer| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|ListSet|scala.collection.immutable.ListSet| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Seq|scala.collection.immutable.Seq| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES | Type/Alias | Instantiated By | | ---------- | --------------- | -|set|Set| |array|ListBuffer| |map|HashMap| +|set|Set| ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                          • String
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • Double
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • Any
                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                          • Int
                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                            • Any
                                                                                                                                                                                                                                                                                                                                                                                                            • Array
                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                            • Long
                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                            • Object
                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                            • List
                                                                                                                                                                                                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                            • Int
                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                            • List
                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                            • Long
                                                                                                                                                                                                                                                                                                                                                                                                            • Map
                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                            • Object
                                                                                                                                                                                                                                                                                                                                                                                                            • Seq
                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                            • def
                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • apiinvoker
                                                                                                                                                                                                                                                                                                                                                                                                              • basepath
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • queryparams
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • type
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • path
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • trait
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • forsome
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • contenttype
                                                                                                                                                                                                                                                                                                                                                                                                              • contenttypes
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • val
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • mp
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • sealed
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • formparams
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • headerparams
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • def
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                                                              • extends
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • formparams
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • forsome
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • headerparams
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                                                              • implicit
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                              • lazy
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • apiinvoker
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • yield
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • override
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • postbody
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                                              • match
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • contenttype
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • with
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • mp
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • object
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • override
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • path
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • postbody
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • queryparams
                                                                                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • sealed
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • trait
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • type
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • val
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • with
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                              • yield
                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md index f9ff403756..4fa157bcd7 100644 --- a/docs/generators/scala-httpclient-deprecated.md +++ b/docs/generators/scala-httpclient-deprecated.md @@ -5,113 +5,113 @@ sidebar_label: scala-httpclient-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| -|ListBuffer|scala.collection.mutable.ListBuffer| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|ListSet|scala.collection.immutable.ListSet| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Seq|scala.collection.immutable.Seq| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES | Type/Alias | Instantiated By | | ---------- | --------------- | -|set|Set| |array|ListBuffer| |map|HashMap| +|set|Set| ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                              • String
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • Double
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • Any
                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                              • Int
                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                • Any
                                                                                                                                                                                                                                                                                                                                                                                                                • Array
                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                • Long
                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                • List
                                                                                                                                                                                                                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                • Int
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                • List
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                • Long
                                                                                                                                                                                                                                                                                                                                                                                                                • Map
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                                                                                                                                                                                                                • Seq
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                • String
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                • def
                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • apiinvoker
                                                                                                                                                                                                                                                                                                                                                                                                                  • basepath
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • queryparams
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • type
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • path
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • trait
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • forsome
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • contenttype
                                                                                                                                                                                                                                                                                                                                                                                                                  • contenttypes
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • val
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • mp
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • sealed
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • formparams
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • headerparams
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • def
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • formparams
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • forsome
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • headerparams
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                                                                                  • implicit
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                                                                                                                                  • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • apiinvoker
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • override
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • postbody
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                                  • match
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • contenttype
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • with
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • mp
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • override
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • path
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • postbody
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • queryparams
                                                                                                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • sealed
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • trait
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • type
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • val
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • with
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/scala-httpclient.md b/docs/generators/scala-httpclient.md deleted file mode 100644 index 6b85507bc2..0000000000 --- a/docs/generators/scala-httpclient.md +++ /dev/null @@ -1,17 +0,0 @@ - ---- -id: generator-opts-client-scala-httpclient -title: Config Options for scala-httpclient -sidebar_label: scala-httpclient ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| -|apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md index 92ad208d8b..0608d6cfa2 100644 --- a/docs/generators/scala-lagom-server.md +++ b/docs/generators/scala-lagom-server.md @@ -5,113 +5,113 @@ sidebar_label: scala-lagom-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| -|ListBuffer|scala.collection.mutable.ListBuffer| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.DateTime| -|Array|java.util.List| -|ListSet|scala.collection.immutable.ListSet| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Seq|scala.collection.immutable.Seq| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES | Type/Alias | Instantiated By | | ---------- | --------------- | -|set|Set| |array|ListBuffer| |map|HashMap| +|set|Set| ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                  • String
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • Double
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • Any
                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                  • Int
                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Any
                                                                                                                                                                                                                                                                                                                                                                                                                    • Array
                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                    • Long
                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                    • List
                                                                                                                                                                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Int
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                    • List
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Long
                                                                                                                                                                                                                                                                                                                                                                                                                    • Map
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                                                                                                                                                                                                    • Seq
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                    • def
                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • apiinvoker
                                                                                                                                                                                                                                                                                                                                                                                                                      • basepath
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • queryparams
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • type
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • path
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • trait
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • forsome
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • contenttype
                                                                                                                                                                                                                                                                                                                                                                                                                      • contenttypes
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • val
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • mp
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • sealed
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • formparams
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • headerparams
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • def
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • formparams
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • forsome
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • headerparams
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                                                      • implicit
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                                                                      • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • apiinvoker
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • override
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • postbody
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                                                      • match
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • contenttype
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • with
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • mp
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • override
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • path
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • postbody
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • queryparams
                                                                                                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • sealed
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • trait
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • type
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • val
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • with
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/scala-play-framework.md b/docs/generators/scala-play-framework.md deleted file mode 100644 index ff1f8243e1..0000000000 --- a/docs/generators/scala-play-framework.md +++ /dev/null @@ -1,22 +0,0 @@ - ---- -id: generator-opts-server-scala-play-framework -title: Config Options for scala-play-framework -sidebar_label: scala-play-framework ---- - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| -|apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| -|routesFileName|Name of the routes file to generate.| |routes| -|routesFileName|Base package in which supporting classes are generated.| |org.openapitools| -|skipStubs|If set, skips generation of stub classes.| |false| -|supportAsync|If set, wraps API return types with Futures and generates async actions.| |false| -|generateCustomExceptions|If set, generates custom exception types.| |true| -|useSwaggerUI|Add a route to /api which show your documentation in swagger-ui. Will also import needed dependencies| |true| diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md index af6e5a41c8..48d5cc9d55 100644 --- a/docs/generators/scala-play-server.md +++ b/docs/generators/scala-play-server.md @@ -5,112 +5,112 @@ sidebar_label: scala-play-server | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| -|routesFileName|Name of the routes file to generate.| |routes| |basePackage|Base package in which supporting classes are generated.| |org.openapitools| -|skipStubs|If set, skips generation of stub classes.| |false| -|supportAsync|If set, wraps API return types with Futures and generates async actions.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |generateCustomExceptions|If set, generates custom exception types.| |true| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|routesFileName|Name of the routes file to generate.| |routes| +|skipStubs|If set, skips generation of stub classes.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| +|supportAsync|If set, wraps API return types with Futures and generates async actions.| |false| |useSwaggerUI|Add a route to /api which show your documentation in swagger-ui. Will also import needed dependencies| |true| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|scala.collection.immutable.Set| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| -|ListBuffer|scala.collection.mutable.ListBuffer| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|java.time.LocalDate| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|ListSet|scala.collection.immutable.ListSet| -|OffsetDateTime|java.time.OffsetDateTime| -|List|java.util.*| -|TemporaryFile|play.api.libs.Files.TemporaryFile| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|java.time.LocalDate| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|OffsetDateTime|java.time.OffsetDateTime| |Seq|scala.collection.immutable.Seq| +|Set|scala.collection.immutable.Set| +|TemporaryFile|play.api.libs.Files.TemporaryFile| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES | Type/Alias | Instantiated By | | ---------- | --------------- | -|set|Set| |array|List| |map|Map| +|set|Set| ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                      • String
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • Double
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • Any
                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                      • Int
                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Any
                                                                                                                                                                                                                                                                                                                                                                                                                        • Array
                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                        • Long
                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                        • List
                                                                                                                                                                                                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Int
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                        • List
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Long
                                                                                                                                                                                                                                                                                                                                                                                                                        • Map
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                                                                                                                                                                                                                        • Seq
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                        • implicit
                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                        • private
                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                                          • def
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • forSome
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • implicit
                                                                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                                                                          • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • type
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • forSome
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • trait
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • override
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • val
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • sealed
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                                          • match
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • with
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • override
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • sealed
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • trait
                                                                                                                                                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • object
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • type
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • val
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • with
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md index aeb1f8de82..f420e05199 100644 --- a/docs/generators/scalatra.md +++ b/docs/generators/scalatra.md @@ -5,114 +5,114 @@ sidebar_label: scalatra | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|source folder for generated code| |null| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.LocalDateTime| -|Set|scala.collection.immutable.Set| -|LocalTime|org.joda.time.LocalTime| -|HashMap|java.util.HashMap| -|ListBuffer|scala.collection.mutable.ListBuffer| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.DateTime| -|Array|java.util.List| -|ListSet|scala.collection.immutable.ListSet| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.LocalDateTime| +|LocalTime|org.joda.time.LocalTime| |Map|java.util.Map| +|Set|scala.collection.immutable.Set| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES | Type/Alias | Instantiated By | | ---------- | --------------- | -|set|Set| |map|HashMap| +|set|Set| ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                          • String
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • Double
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • Any
                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                          • Int
                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                            • Any
                                                                                                                                                                                                                                                                                                                                                                                                                            • Array
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • Long
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • Object
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • List
                                                                                                                                                                                                                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                            • Int
                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                            • List
                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                            • Long
                                                                                                                                                                                                                                                                                                                                                                                                                            • Map
                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                            • Object
                                                                                                                                                                                                                                                                                                                                                                                                                            • Seq
                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                            • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • type
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • protected
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • catch
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • if
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • case
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • new
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • package
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • static
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • void
                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                            • double
                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • assert
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                                                              • byte
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • strictfp
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • throws
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                                                                              • enum
                                                                                                                                                                                                                                                                                                                                                                                                                              • extends
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • float
                                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • assert
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • strictfp
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • throws
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • type
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md index 082e71e571..e6050ab3f1 100644 --- a/docs/generators/scalaz.md +++ b/docs/generators/scalaz.md @@ -5,113 +5,113 @@ sidebar_label: scalaz | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |null| |apiPackage|package for generated api classes| |null| -|sourceFolder|source folder for generated code| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|modelPackage|package for generated models| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |null| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.LocalDateTime| -|LocalTime|org.joda.time.LocalTime| -|HashMap|java.util.HashMap| -|ListBuffer|scala.collection.mutable.ListBuffer| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.LocalDate| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.DateTime| -|Array|java.util.List| -|ListSet|scala.collection.immutable.ListSet| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|ListBuffer|scala.collection.mutable.ListBuffer| +|ListSet|scala.collection.immutable.ListSet| +|LocalDate|org.joda.time.LocalDate| +|LocalDateTime|org.joda.time.LocalDateTime| +|LocalTime|org.joda.time.LocalTime| |Seq|scala.collection.immutable.Seq| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES | Type/Alias | Instantiated By | | ---------- | --------------- | -|set|Set| |array|ListBuffer| |map|HashMap| +|set|Set| ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                              • String
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • Double
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • Any
                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                              • Int
                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                • List
                                                                                                                                                                                                                                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                • List
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                • Seq
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                • String
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                • def
                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • apiinvoker
                                                                                                                                                                                                                                                                                                                                                                                                                                  • basepath
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • queryparams
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • type
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • path
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • trait
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • forsome
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • contenttype
                                                                                                                                                                                                                                                                                                                                                                                                                                  • contenttypes
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • val
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • mp
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • sealed
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • formparams
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • headerparams
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • def
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • formparams
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • forsome
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • headerparams
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                                                                                                  • implicit
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                                                                                                                                                  • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • apiinvoker
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • override
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • postbody
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                                                  • match
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • contenttype
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • with
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • mp
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • object
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • override
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • path
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • postbody
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • queryparams
                                                                                                                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • sealed
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • trait
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • type
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • val
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • with
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 09a9e979cd..7ba4dca43d 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -5,86 +5,86 @@ sidebar_label: spring | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPackage|package for generated models| |org.openapitools.model| +|apiFirst|Generate the API from the OAI spec at server compile time (API first approach)| |false| |apiPackage|package for generated api classes| |org.openapitools.api| -|invokerPackage|root package for generated code| |org.openapitools.api| -|groupId|groupId in generated pom.xml| |org.openapitools| -|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-spring| -|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| +|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-spring| +|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| +|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| +|async|use async Callable controllers| |false| +|basePackage|base package (invokerPackage) for generated code| |org.openapitools| +|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| +|booleanGetterPrefix|Set booleanGetterPrefix| |get| +|configPackage|configuration package for generated code| |org.openapitools.configuration| +|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                                                                                                                                                                                                  **joda**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Joda (for legacy app only)
                                                                                                                                                                                                                                                                                                                                                                                                                                  **legacy**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                                                                                                                                                                                                  |threetenbp| +|delegatePattern|Whether to generate the server files using the delegate pattern| |false| +|developerEmail|developer email in generated pom.xml| |team@openapitools.org| +|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| +|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| +|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| +|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| +|groupId|groupId in generated pom.xml| |org.openapitools| +|hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| +|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| +|invokerPackage|root package for generated code| |org.openapitools.api| +|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
                                                                                                                                                                                                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Various third party libraries as needed
                                                                                                                                                                                                                                                                                                                                                                                                                                  |false| +|library|library template (sub-template)|
                                                                                                                                                                                                                                                                                                                                                                                                                                  **spring-boot**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Spring-boot Server application using the SpringFox integration.
                                                                                                                                                                                                                                                                                                                                                                                                                                  **spring-mvc**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Spring-MVC Server application using the SpringFox integration.
                                                                                                                                                                                                                                                                                                                                                                                                                                  **spring-cloud**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
                                                                                                                                                                                                                                                                                                                                                                                                                                  |spring-boot| +|licenseName|The name of the license| |Unlicense| +|licenseUrl|The URL of the license| |http://unlicense.org| +|modelPackage|package for generated models| |org.openapitools.model| +|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| +|performBeanValidation|Use Bean Validation Impl. to perform BeanValidation| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|reactive|wrap responses in Mono/Flux Reactor types (spring-boot only)| |false| +|responseWrapper|wrap the responses in given type (Future, Callable, CompletableFuture,ListenableFuture, DeferredResult, HystrixCommand, RxObservable, RxSingle or fully qualified type)| |null| +|returnSuccessCode|Generated server returns 2xx code| |false| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors| -|developerEmail|developer email in generated pom.xml| |team@openapitools.org| -|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org| -|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org| -|licenseName|The name of the license| |Unlicense| -|licenseUrl|The URL of the license| |http://unlicense.org| -|sourceFolder|source folder for generated code| |src/main/java| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| -|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| -|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| -|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| -|dateLibrary|Option. Date library to use|
                                                                                                                                                                                                                                                                                                                                                                                                                                  **joda**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Joda (for legacy app only)
                                                                                                                                                                                                                                                                                                                                                                                                                                  **legacy**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Legacy java.util.Date (if you really have a good reason not to use threetenbp
                                                                                                                                                                                                                                                                                                                                                                                                                                  **java8-localdatetime**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Java 8 using LocalDateTime (for legacy app only)
                                                                                                                                                                                                                                                                                                                                                                                                                                  **java8**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Java 8 native JSR310 (preferred for jdk 1.8+) - note: this also sets "java8" to true
                                                                                                                                                                                                                                                                                                                                                                                                                                  **threetenbp**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Backport of JSR310 (preferred for jdk < 1.8)
                                                                                                                                                                                                                                                                                                                                                                                                                                  |threetenbp| -|java8|Option. Use Java8 classes instead of third party equivalents|
                                                                                                                                                                                                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used
                                                                                                                                                                                                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Various third party libraries as needed
                                                                                                                                                                                                                                                                                                                                                                                                                                  |false| -|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false| -|booleanGetterPrefix|Set booleanGetterPrefix| |get| -|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null| -|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null| -|snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Use a SnapShot Version
                                                                                                                                                                                                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Use a Release Version
                                                                                                                                                                                                                                                                                                                                                                                                                                  |null| -|title|server title name or client service name| |OpenAPI Spring| -|configPackage|configuration package for generated code| |org.openapitools.configuration| -|basePackage|base package (invokerPackage) for generated code| |org.openapitools| -|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| -|delegatePattern|Whether to generate the server files using the delegate pattern| |false| |singleContentTypes|Whether to select only one produces/consumes content-type by operation.| |false| |skipDefaultInterface|Whether to generate default implementations for java8 interfaces| |false| -|async|use async Callable controllers| |false| -|reactive|wrap responses in Mono/Flux Reactor types (spring-boot only)| |false| -|responseWrapper|wrap the responses in given type (Future, Callable, CompletableFuture,ListenableFuture, DeferredResult, HystrixCommand, RxObservable, RxSingle or fully qualified type)| |null| -|virtualService|Generates the virtual service. For more details refer - https://github.com/elan-venture/virtualan/wiki| |false| -|useTags|use tags for creating interface and controller classnames| |false| -|useBeanValidation|Use BeanValidation API annotations| |true| -|performBeanValidation|Use Bean Validation Impl. to perform BeanValidation| |false| -|implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| +|snapshotVersion|Uses a SNAPSHOT version.|
                                                                                                                                                                                                                                                                                                                                                                                                                                  **true**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Use a SnapShot Version
                                                                                                                                                                                                                                                                                                                                                                                                                                  **false**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Use a Release Version
                                                                                                                                                                                                                                                                                                                                                                                                                                  |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|sourceFolder|source folder for generated code| |src/main/java| |swaggerDocketConfig|Generate Spring OpenAPI Docket configuration class.| |false| -|apiFirst|Generate the API from the OAI spec at server compile time (API first approach)| |false| -|useOptional|Use Optional container for optional parameters| |false| -|hateoas|Use Spring HATEOAS library to allow adding HATEOAS links| |false| -|returnSuccessCode|Generated server returns 2xx code| |false| +|title|server title name or client service name| |OpenAPI Spring| |unhandledException|Declare operation methods to throw a generic exception and allow unhandled exceptions (useful for Spring `@ControllerAdvice` directives).| |false| -|library|library template (sub-template)|
                                                                                                                                                                                                                                                                                                                                                                                                                                  **spring-boot**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Spring-boot Server application using the SpringFox integration.
                                                                                                                                                                                                                                                                                                                                                                                                                                  **spring-mvc**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Spring-MVC Server application using the SpringFox integration.
                                                                                                                                                                                                                                                                                                                                                                                                                                  **spring-cloud**
                                                                                                                                                                                                                                                                                                                                                                                                                                  Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
                                                                                                                                                                                                                                                                                                                                                                                                                                  |spring-boot| +|useBeanValidation|Use BeanValidation API annotations| |true| +|useOptional|Use Optional container for optional parameters| |false| +|useTags|use tags for creating interface and controller classnames| |false| +|virtualService|Generates the virtual service. For more details refer - https://github.com/elan-venture/virtualan/wiki| |false| +|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## IMPORT MAPPING | Type/Alias | Imports | | ---------- | ------- | -|LocalDateTime|org.joda.time.*| -|Set|java.util.*| -|LocalTime|org.joda.time.*| -|HashMap|java.util.HashMap| +|Array|java.util.List| |ArrayList|java.util.ArrayList| -|URI|java.net.URI| -|Timestamp|java.sql.Timestamp| -|LocalDate|org.joda.time.*| |BigDecimal|java.math.BigDecimal| |Date|java.util.Date| |DateTime|org.joda.time.*| -|Array|java.util.List| -|List|java.util.*| -|UUID|java.util.UUID| |File|java.io.File| +|HashMap|java.util.HashMap| +|List|java.util.*| +|LocalDate|org.joda.time.*| +|LocalDateTime|org.joda.time.*| +|LocalTime|org.joda.time.*| |Map|java.util.Map| +|Set|java.util.*| +|Timestamp|java.sql.Timestamp| +|URI|java.net.URI| +|UUID|java.util.UUID| ## INSTANTIATION TYPES @@ -97,87 +97,87 @@ sidebar_label: spring ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                  • byte[]
                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                    • byte[]
                                                                                                                                                                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • localvaraccepts
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • float
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • localvarpath
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                      • apiclient
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • apiexception
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • assert
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                                                                                                                      • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • strictfp
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                                                                                                                      • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • apiexception
                                                                                                                                                                                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • float
                                                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • apiresponse
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • assert
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • stringutil
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localreturntype
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvaraccept
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvaraccepts
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarauthnames
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarcollectionqueryparams
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarcontenttype
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarcontenttypes
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarcookieparams
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarformparams
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarheaderparams
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarpath
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarpostbody
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • localvarqueryparams
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • object
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • strictfp
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • stringutil
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/swift2-deprecated.md b/docs/generators/swift2-deprecated.md index 45a0547686..776a950d69 100644 --- a/docs/generators/swift2-deprecated.md +++ b/docs/generators/swift2-deprecated.md @@ -5,27 +5,27 @@ sidebar_label: swift2-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|podAuthors|Authors used for Podspec| |null| +|podDescription|Description used for Podspec| |null| +|podDocsetURL|Docset URL used for Podspec| |null| +|podDocumentationURL|Documentation URL used for Podspec| |null| +|podHomepage|Homepage used for Podspec| |null| +|podLicense|License used for Podspec| |null| +|podScreenshots|Screenshots used for Podspec| |null| +|podSocialMediaURL|Social Media URL used for Podspec| |null| +|podSource|Source information used for Podspec| |null| +|podSummary|Summary used for Podspec| |null| +|podVersion|Version used for Podspec| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|Project name in Xcode| |null| |responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available.| |null| -|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| -|podSource|Source information used for Podspec| |null| -|podVersion|Version used for Podspec| |null| -|podAuthors|Authors used for Podspec| |null| -|podSocialMediaURL|Social Media URL used for Podspec| |null| -|podDocsetURL|Docset URL used for Podspec| |null| -|podLicense|License used for Podspec| |null| -|podHomepage|Homepage used for Podspec| |null| -|podSummary|Summary used for Podspec| |null| -|podDescription|Description used for Podspec| |null| -|podScreenshots|Screenshots used for Podspec| |null| -|podDocumentationURL|Documentation URL used for Podspec| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| ## IMPORT MAPPING @@ -41,114 +41,114 @@ sidebar_label: swift2-deprecated ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                      • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • struct
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • convenience
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • none
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • required
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • nil
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • else
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • let
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • mutating
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • if
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • case
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • init
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • in
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • var
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • is
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • optional
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • infix
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • FUNCTION
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • as
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • left
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • extension
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • internal
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • guard
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Self
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • nonmutating
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • weak
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • default
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • get
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • where
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • override
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • typealias
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • FILE
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • Protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • set
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • break
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • willSet
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • right
                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                        • ErrorResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                          • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Type
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • deinit
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • self
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • open
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                          • COLUMN
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • dynamicType
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • operator
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • precedence
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • dynamic
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • associativity
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • subscript
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • indirect
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • throws
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Class
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • ErrorResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • FILE
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • FUNCTION
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • LINE
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Self
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • String
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Type
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • as
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • associativity
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • convenience
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • defer
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • deinit
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • didSet
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • dynamic
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • dynamicType
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • extension
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • fallthrough
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                                                          • fileprivate
                                                                                                                                                                                                                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Class
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • rethrows
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • defer
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • LINE
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • repeat
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • postfix
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • unowned
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • inout
                                                                                                                                                                                                                                                                                                                                                                                                                                          • func
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • didSet
                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • fallthrough
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • get
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • guard
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • indirect
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • infix
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • init
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • inout
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • internal
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • is
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • left
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • let
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • mutating
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • nil
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • none
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • nonmutating
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • open
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • operator
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • optional
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • override
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • postfix
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • precedence
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • repeat
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • required
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • rethrows
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • right
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • self
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • set
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • struct
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • subscript
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • throws
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • typealias
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • unowned
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • weak
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • where
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                          • willSet
                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/swift3-deprecated.md b/docs/generators/swift3-deprecated.md index a3079fd607..d605fb9d76 100644 --- a/docs/generators/swift3-deprecated.md +++ b/docs/generators/swift3-deprecated.md @@ -5,29 +5,29 @@ sidebar_label: swift3-deprecated | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| +|podAuthors|Authors used for Podspec| |null| +|podDescription|Description used for Podspec| |null| +|podDocsetURL|Docset URL used for Podspec| |null| +|podDocumentationURL|Documentation URL used for Podspec| |null| +|podHomepage|Homepage used for Podspec| |null| +|podLicense|License used for Podspec| |null| +|podScreenshots|Screenshots used for Podspec| |null| +|podSocialMediaURL|Social Media URL used for Podspec| |null| +|podSource|Source information used for Podspec| |null| +|podSummary|Summary used for Podspec| |null| +|podVersion|Version used for Podspec| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|Project name in Xcode| |null| |responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift are available.| |null| -|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| -|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| -|podSource|Source information used for Podspec| |null| -|podVersion|Version used for Podspec| |null| -|podAuthors|Authors used for Podspec| |null| -|podSocialMediaURL|Social Media URL used for Podspec| |null| -|podDocsetURL|Docset URL used for Podspec| |null| -|podLicense|License used for Podspec| |null| -|podHomepage|Homepage used for Podspec| |null| -|podSummary|Summary used for Podspec| |null| -|podDescription|Description used for Podspec| |null| -|podScreenshots|Screenshots used for Podspec| |null| -|podDocumentationURL|Documentation URL used for Podspec| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| ## IMPORT MAPPING @@ -43,106 +43,106 @@ sidebar_label: swift3-deprecated ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                          • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                            • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • struct
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • COLUMN
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • convenience
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • none
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • dynamicType
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • operator
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • precedence
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • required
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • nil
                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                            • protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • COLUMN
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Class
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • ErrorResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • FILE
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • FUNCTION
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • LINE
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Response
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Self
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • String
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Type
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • URL
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • as
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • associativity
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • convenience
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • deinit
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • didSet
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                                                                                                                                              • dynamic
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • dynamicType
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • extension
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • fallthrough
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • func
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • get
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • infix
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • init
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • inout
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • internal
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • is
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • left
                                                                                                                                                                                                                                                                                                                                                                                                                                              • let
                                                                                                                                                                                                                                                                                                                                                                                                                                              • mutating
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • associativity
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • init
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • subscript
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • is
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • optional
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • infix
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • FUNCTION
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • as
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • left
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Class
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • extension
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • internal
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Self
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • nil
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • none
                                                                                                                                                                                                                                                                                                                                                                                                                                              • nonmutating
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • URL
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • weak
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • get
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • LINE
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • where
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • operator
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • optional
                                                                                                                                                                                                                                                                                                                                                                                                                                              • override
                                                                                                                                                                                                                                                                                                                                                                                                                                              • postfix
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • typealias
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • FILE
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • set
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • right
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • unowned
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • ErrorResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Response
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • inout
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Type
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • deinit
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • func
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • didSet
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • self
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • fallthrough
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • precedence
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • required
                                                                                                                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • right
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • self
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • set
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • struct
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • subscript
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • typealias
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • unowned
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • weak
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • where
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/swift4.md b/docs/generators/swift4.md index 7018d2aad2..dfd34277fc 100644 --- a/docs/generators/swift4.md +++ b/docs/generators/swift4.md @@ -5,31 +5,30 @@ sidebar_label: swift4 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| +|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| +|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| +|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| +|podAuthors|Authors used for Podspec| |null| +|podDescription|Description used for Podspec| |null| +|podDocsetURL|Docset URL used for Podspec| |null| +|podDocumentationURL|Documentation URL used for Podspec| |null| +|podHomepage|Homepage used for Podspec| |null| +|podLicense|License used for Podspec| |null| +|podScreenshots|Screenshots used for Podspec| |null| +|podSocialMediaURL|Social Media URL used for Podspec| |null| +|podSource|Source information used for Podspec| |null| +|podSummary|Summary used for Podspec| |null| +|podVersion|Version used for Podspec| |null| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |projectName|Project name in Xcode| |null| |responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result are available.| |null| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| -|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| -|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| -|podSource|Source information used for Podspec| |null| -|podVersion|Version used for Podspec| |null| -|podAuthors|Authors used for Podspec| |null| -|podSocialMediaURL|Social Media URL used for Podspec| |null| -|podDocsetURL|Docset URL used for Podspec| |null| -|podLicense|License used for Podspec| |null| -|podHomepage|Homepage used for Podspec| |null| -|podSummary|Summary used for Podspec| |null| -|podDescription|Description used for Podspec| |null| -|podScreenshots|Screenshots used for Podspec| |null| -|podDocumentationURL|Documentation URL used for Podspec| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| +|unwrapRequired|Treat 'required' properties in response as non-optional (which would crash the app if api returns null as opposed to required option specified in json schema| |null| ## IMPORT MAPPING @@ -45,163 +44,163 @@ sidebar_label: swift4 ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • String
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • URL
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                              • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                                • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Decimal
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Decimal
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • URL
                                                                                                                                                                                                                                                                                                                                                                                                                                                • UUID
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • struct
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • #elseif
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • #file
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • #imageLiteral
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • convenience
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • none
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Int16
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • required
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • nil
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • CountableRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Float32
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • mutating
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • init
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • is
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • optional
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • infix
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • FUNCTION
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • as
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Decodable
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • left
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • extension
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • internal
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Set
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • guard
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • associatedtype
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • #available
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Self
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • nonmutating
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • URL
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • weak
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • #function
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • get
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • where
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • typealias
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • override
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • FILE
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • _
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • #selector
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • set
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • willSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • right
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Int8
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • ErrorResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Type
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Float64
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • deinit
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • self
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • UInt
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • UInt32
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • open
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • #if
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • #column
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • COLUMN
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • #line
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • #endif
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • dynamicType
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • operator
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • precedence
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • StaticString
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • CountableClosedRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • dynamic
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • associativity
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • Unicode
                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #available
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #colorLiteral
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • subscript
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • indirect
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Optional
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • throws
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Range
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • fileprivate
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Class
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • UInt16
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • rethrows
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Float80
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Encodable
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #column
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #else
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Dictionary
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • defer
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • ClosedRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #elseif
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #endif
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #file
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #fileLiteral
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #function
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #if
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #imageLiteral
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #line
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #selector
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #sourceLocation
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • COLUMN
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Class
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • ClosedRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Codable
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • CountableClosedRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • CountableRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Decodable
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Dictionary
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Encodable
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • ErrorResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • FILE
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • FUNCTION
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Float32
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Float64
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Float80
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Int16
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Int8
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • LINE
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • OptionSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Optional
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Range
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Response
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Self
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Set
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • StaticString
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Type
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • UInt
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • UInt16
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • UInt32
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • UInt64
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • UInt8
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • URL
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Unicode
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • _
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • as
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • associatedtype
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • associativity
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • convenience
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • defer
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • deinit
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • didSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • dynamic
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • dynamicType
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • extension
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • fallthrough
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • fileprivate
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • func
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • get
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • guard
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • indirect
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • infix
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • init
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • inout
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • internal
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • is
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • left
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • mutating
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • nil
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • none
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • nonmutating
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • open
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • operator
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • optional
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • override
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • postfix
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • precedence
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • repeat
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • LINE
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • #sourceLocation
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • postfix
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • UInt64
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Codable
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unowned
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Response
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • required
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • rethrows
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • right
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • self
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • set
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • struct
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • subscript
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • inout
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • func
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • didSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • fallthrough
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • OptionSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • throws
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • typealias
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • unowned
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • weak
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • where
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • willSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md index 3897f396d2..b5295c9075 100644 --- a/docs/generators/swift5.md +++ b/docs/generators/swift5.md @@ -5,30 +5,29 @@ sidebar_label: swift5 | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|projectName|Project name in Xcode| |null| -|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine are available.| |null| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null| -|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| -|podSource|Source information used for Podspec| |null| -|podVersion|Version used for Podspec| |null| -|podAuthors|Authors used for Podspec| |null| -|podSocialMediaURL|Social Media URL used for Podspec| |null| -|podLicense|License used for Podspec| |null| -|podHomepage|Homepage used for Podspec| |null| -|podSummary|Summary used for Podspec| |null| -|podDescription|Description used for Podspec| |null| -|podScreenshots|Screenshots used for Podspec| |null| -|podDocumentationURL|Documentation URL used for Podspec| |null| -|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| |library|Library template (sub-template) to use|
                                                                                                                                                                                                                                                                                                                                                                                                                                                  **urlsession**
                                                                                                                                                                                                                                                                                                                                                                                                                                                  [DEFAULT] HTTP client: URLSession
                                                                                                                                                                                                                                                                                                                                                                                                                                                  **alamofire**
                                                                                                                                                                                                                                                                                                                                                                                                                                                  HTTP client: Alamofire
                                                                                                                                                                                                                                                                                                                                                                                                                                                  |urlsession| +|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.(default: false)| |null| +|objcCompatible|Add additional properties and methods for Objective-C compatibility (default: false)| |null| +|podAuthors|Authors used for Podspec| |null| +|podDescription|Description used for Podspec| |null| +|podDocumentationURL|Documentation URL used for Podspec| |null| +|podHomepage|Homepage used for Podspec| |null| +|podLicense|License used for Podspec| |null| +|podScreenshots|Screenshots used for Podspec| |null| +|podSocialMediaURL|Social Media URL used for Podspec| |null| +|podSource|Source information used for Podspec| |null| +|podSummary|Summary used for Podspec| |null| +|podVersion|Version used for Podspec| |null| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|projectName|Project name in Xcode| |null| +|responseAs|Optionally use libraries to manage response. Currently PromiseKit, RxSwift, Result, Combine are available.| |null| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|swiftUseApiNamespace|Flag to make all the API classes inner-class of {{projectName}}API| |null| ## IMPORT MAPPING @@ -44,163 +43,163 @@ sidebar_label: swift5 ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • URL
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Decimal
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Decimal
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • URL
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • UUID
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • struct
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • #elseif
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • #file
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • #imageLiteral
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • convenience
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • none
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Int16
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • required
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • nil
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • CountableRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Float32
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • mutating
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • init
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • is
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • optional
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • infix
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • FUNCTION
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • as
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Decodable
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • left
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • extension
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • internal
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Set
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • guard
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • associatedtype
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • #available
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Self
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • nonmutating
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • URL
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • weak
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • #function
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • get
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • where
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • typealias
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • override
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • FILE
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • _
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • #selector
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • set
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • willSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • right
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Int8
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • ErrorResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Type
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Float64
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • deinit
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • self
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • UInt
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • UInt32
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • open
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • #if
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • #column
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • COLUMN
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • #line
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • #endif
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • dynamicType
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • operator
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • precedence
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • StaticString
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • CountableClosedRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • dynamic
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • associativity
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Unicode
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #available
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #colorLiteral
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • subscript
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • indirect
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Optional
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Range
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • fileprivate
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Class
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • UInt16
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • rethrows
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Float80
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Encodable
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #column
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #else
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Dictionary
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • defer
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • ClosedRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #elseif
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #endif
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #file
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #fileLiteral
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #function
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #if
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #imageLiteral
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #line
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #selector
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #sourceLocation
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Any
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • AnyObject
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Bool
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • COLUMN
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Character
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Class
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • ClosedRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Codable
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • CountableClosedRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • CountableRange
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Decodable
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Dictionary
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Encodable
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • ErrorResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • FILE
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • FUNCTION
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Float32
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Float64
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Float80
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Int
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Int16
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Int32
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Int8
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • LINE
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • OptionSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Optional
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Range
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Response
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Self
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Set
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • StaticString
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Type
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • UInt
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • UInt16
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • UInt32
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • UInt64
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • UInt8
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • URL
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Unicode
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Void
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • _
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • as
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • associatedtype
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • associativity
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • convenience
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • defer
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • deinit
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • didSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • dynamic
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • dynamicType
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • extension
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • fallthrough
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • fileprivate
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • func
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • get
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • guard
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • indirect
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • infix
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • init
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • inout
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • internal
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • is
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • lazy
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • left
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • mutating
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • nil
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • none
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • nonmutating
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • open
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • operator
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • optional
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • override
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • postfix
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • precedence
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • prefix
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • protocol
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • repeat
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • LINE
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • #sourceLocation
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • postfix
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • UInt64
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Codable
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Data
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unowned
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Response
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • required
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • rethrows
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • right
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • self
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • set
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • struct
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • subscript
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • inout
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • func
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Int64
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • didSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • fallthrough
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • OptionSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • throws
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • typealias
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • unowned
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • weak
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • where
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • willSet
                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 30cebe68a2..cb9160d26a 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -5,29 +5,29 @@ sidebar_label: typescript-angular | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| -|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| -|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false| -|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| -|providedInRoot|Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0).| |false| -|ngVersion|The version of Angular.| |8.0.0| |apiModulePrefix|The prefix of the generated ApiModule.| |null| -|serviceSuffix|The suffix of the generated service.| |Service| -|serviceFileSuffix|The suffix of the file of the generated service (service<suffix>.ts).| |.service| -|modelSuffix|The suffix of the generated model.| |null| -|modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |fileNaming|Naming convention for the output files: 'camelCase', 'kebab-case'.| |camelCase| +|modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|modelSuffix|The suffix of the generated model.| |null| +|ngVersion|The version of Angular.| |8.0.0| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|providedInRoot|Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0).| |false| +|serviceFileSuffix|The suffix of the file of the generated service (service<suffix>.ts).| |.service| +|serviceSuffix|The suffix of the generated service.| |Service| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |stringEnums|Generate string enums instead of objects for enum values.| |false| +|supportsES6|Generate code that conforms to ES6.| |false| +|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| +|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| ## IMPORT MAPPING @@ -44,94 +44,94 @@ sidebar_label: typescript-angular ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Blob
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Blob
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • File
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • object
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • typeof
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • with
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md index e4789789c0..932d469935 100644 --- a/docs/generators/typescript-angularjs.md +++ b/docs/generators/typescript-angularjs.md @@ -5,12 +5,12 @@ sidebar_label: typescript-angularjs | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |supportsES6|Generate code that conforms to ES6.| |false| ## IMPORT MAPPING @@ -28,93 +28,93 @@ sidebar_label: typescript-angularjs ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • File
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • object
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • typeof
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • with
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 630149f0ec..6f65c5174f 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -5,16 +5,16 @@ sidebar_label: typescript-aurelia | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| ## IMPORT MAPPING @@ -31,93 +31,93 @@ sidebar_label: typescript-aurelia ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • File
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • typeof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 2ce7e5c197..7df54bceb8 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -5,17 +5,17 @@ sidebar_label: typescript-axios | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url of your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes| |false| |withoutPrefixEnums|Don't prefix enum names with class names| |false| @@ -35,93 +35,93 @@ sidebar_label: typescript-axios ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • File
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • typeof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index c46d4226c9..98a52b89d7 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -5,21 +5,21 @@ sidebar_label: typescript-fetch | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| -|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| |prefixParameterInterfaces|Setting this property to true will generate parameter interface declarations prefixed with API class name to avoid name conflicts.| |false| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| |typescriptThreePlus|Setting this property to true will generate TypeScript 3.6+ compatible code.| |false| +|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| ## IMPORT MAPPING @@ -36,118 +36,118 @@ sidebar_label: typescript-fetch ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • File
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • ModelPropertyNaming
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • HTTPHeaders
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • COLLECTION_FORMATS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • BASE_PATH
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • BaseAPI
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPMethod
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ResponseContext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequestContext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ResponseTransformer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Middleware
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • BlobApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • COLLECTION_FORMATS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ConfigurationParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • FetchAPI
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • FetchParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPBody
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPHeaders
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPMethod
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPQuery
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • JSONApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Middleware
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ModelPropertyNaming
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequestContext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequestOpts
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequiredError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ResponseContext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ResponseTransformer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • TextApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • VoidApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • exists
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • BASE_PATH
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • JSONApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ConfigurationParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • TextApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequestOpts
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • FetchAPI
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • typeof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequiredError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • FetchParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPBody
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • exists
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPQuery
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • VoidApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index 6df5d833cc..c3bf2d710f 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -5,21 +5,21 @@ sidebar_label: typescript-inversify | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| +|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| |usePromise|Setting this property to use promise instead of observable inside every service.| |false| |useRxJS6|Setting this property to use rxjs 6 instead of rxjs 5.| |false| -|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| ## IMPORT MAPPING @@ -36,95 +36,95 @@ sidebar_label: typescript-inversify ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Blob
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Blob
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • File
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • typeof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index e0d11461d1..07d320ffe8 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -5,18 +5,18 @@ sidebar_label: typescript-jquery | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| -|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false| +|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| ## IMPORT MAPPING @@ -33,93 +33,93 @@ sidebar_label: typescript-jquery ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • File
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • typeof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 4d9e1d36e2..331905fd5c 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -5,17 +5,17 @@ sidebar_label: typescript-node | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| ## IMPORT MAPPING @@ -32,97 +32,97 @@ sidebar_label: typescript-node ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Buffer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • RequestDetailedFile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • ReadStream
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • RequestFile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Buffer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • File
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • ReadStream
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • RequestDetailedFile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • RequestFile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • typeof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md index 89b061d760..1bdb95c142 100644 --- a/docs/generators/typescript-redux-query.md +++ b/docs/generators/typescript-redux-query.md @@ -5,19 +5,19 @@ sidebar_label: typescript-redux-query | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true| +|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| ## IMPORT MAPPING @@ -34,116 +34,116 @@ sidebar_label: typescript-redux-query ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • File
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • ModelPropertyNaming
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • HTTPHeaders
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • COLLECTION_FORMATS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • BASE_PATH
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • BaseAPI
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPMethod
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ResponseContext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequestContext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ResponseTransformer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Middleware
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • BlobApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • COLLECTION_FORMATS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ConfigurationParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPBody
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPHeaders
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPMethod
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPQuery
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • JSONApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Middleware
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ModelPropertyNaming
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequestContext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequestOpts
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequiredError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ResponseContext
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ResponseTransformer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • TextApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • VoidApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • exists
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • BASE_PATH
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • JSONApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • ConfigurationParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • TextApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequestOpts
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • typeof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • RequiredError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPBody
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • exists
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • HTTPQuery
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • VoidApiResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index d5d43d6208..3d8bf8a331 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -5,17 +5,17 @@ sidebar_label: typescript-rxjs | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| -|supportsES6|Generate code that conforms to ES6.| |false| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| -|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| -|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| +|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| +|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| +|supportsES6|Generate code that conforms to ES6.| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| ## IMPORT MAPPING @@ -33,112 +33,112 @@ sidebar_label: typescript-rxjs ## LANGUAGE PRIMITIVES -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Blob
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Array
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Blob
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Date
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Error
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • File
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Integer
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Map
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • String
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • any
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • object
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • string
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ## RESERVED WORDS -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • ModelPropertyNaming
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • HttpHeaders
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • RequestArgs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • COLLECTION_FORMATS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • HttpBody
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • AjaxRequest
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • AjaxResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • BASE_PATH
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • BaseAPI
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • COLLECTION_FORMATS
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Configuration
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ConfigurationParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • HttpBody
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • HttpHeaders
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • HttpMethod
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • HttpQuery
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • Middleware
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ModelPropertyNaming
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • RequestArgs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • RequestOpts
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • RequiredError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ResponseArgs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • byte
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • case
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • catch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • continue
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • debugger
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • do
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • double
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • else
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • enum
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • exists
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • export
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • extends
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • final
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • finally
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • float
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • formParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • headerParams
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • if
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • in
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • let
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • new
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • null
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • package
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • protected
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • queryParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • static
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • synchronized
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • this
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • transient
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • try
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • HttpMethod
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • implements
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • private
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • const
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • import
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • BASE_PATH
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • for
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • interface
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ConfigurationParameters
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • delete
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • long
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • switch
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • default
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • goto
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • AjaxRequest
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • native
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ResponseArgs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • await
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • RequestOpts
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • class
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • typeof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • break
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • HttpQuery
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • AjaxResponse
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • useFormData
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • var
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • varLocalDeferred
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • varLocalPath
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • void
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • volatile
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • abstract
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • requestOptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • RequiredError
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • int
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • instanceof
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • super
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • while
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • with
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • boolean
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • throw
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • char
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • short
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • exists
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • -
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • return
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • +
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • yield
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java index feb0f35f74..8e55421c7b 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ConfigHelp.java @@ -32,6 +32,9 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Paths; import java.util.Locale; import java.util.Map; +import java.util.TreeMap; +import java.util.function.Function; +import java.util.stream.Collectors; import static org.apache.commons.lang3.StringEscapeUtils.escapeHtml4; import static org.apache.commons.lang3.StringUtils.isEmpty; @@ -164,12 +167,18 @@ public class ConfigHelp implements Runnable { sb.append("| Option | Description | Values | Default |").append(newline); sb.append("| ------ | ----------- | ------ | ------- |").append(newline); - for (CliOption langCliOption : config.cliOptions()) { + Map langCliOptions = config.cliOptions() + .stream() + .collect(Collectors.toMap(CliOption::getOpt, Function.identity(), (a, b) -> { + throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a.getOpt(), b.getOpt())); + }, TreeMap::new)); + + langCliOptions.forEach((key, langCliOption) -> { // start sb.append("|"); // option - sb.append(escapeHtml4(langCliOption.getOpt())).append("|"); + sb.append(escapeHtml4(key)).append("|"); // description sb.append(escapeHtml4(langCliOption.getDescription())).append("|"); @@ -193,7 +202,7 @@ public class ConfigHelp implements Runnable { sb.append(escapeHtml4(langCliOption.getDefault())).append("|"); sb.append(newline); - } + }); if (Boolean.TRUE.equals(importMappings)) { @@ -205,10 +214,14 @@ public class ConfigHelp implements Runnable { sb.append("| Type/Alias | Imports |").append(newline); sb.append("| ---------- | ------- |").append(newline); - config.importMapping().forEach((key, value)-> { - sb.append("|").append(escapeHtml4(key)).append("|").append(escapeHtml4(value)).append("|"); - sb.append(newline); - }); + config.importMapping() + .entrySet() + .stream() + .sorted(Map.Entry.comparingByKey()) + .forEachOrdered(kvp -> { + sb.append("|").append(escapeHtml4(kvp.getKey())).append("|").append(escapeHtml4(kvp.getValue())).append("|"); + sb.append(newline); + }); sb.append(newline); } @@ -222,10 +235,14 @@ public class ConfigHelp implements Runnable { sb.append("| Type/Alias | Instantiated By |").append(newline); sb.append("| ---------- | --------------- |").append(newline); - config.instantiationTypes().forEach((key, value)-> { - sb.append("|").append(escapeHtml4(key)).append("|").append(escapeHtml4(value)).append("|"); - sb.append(newline); - }); + config.instantiationTypes() + .entrySet() + .stream() + .sorted(Map.Entry.comparingByKey()) + .forEachOrdered(kvp -> { + sb.append("|").append(escapeHtml4(kvp.getKey())).append("|").append(escapeHtml4(kvp.getValue())).append("|"); + sb.append(newline); + }); sb.append(newline); } @@ -236,7 +253,10 @@ public class ConfigHelp implements Runnable { sb.append(newline); sb.append(newline); sb.append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                "); - config.languageSpecificPrimitives().forEach(s -> sb.append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ").append(escapeHtml4(s)).append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ").append(newline)); + config.languageSpecificPrimitives() + .stream() + .sorted(String::compareTo) + .forEach(s -> sb.append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ").append(escapeHtml4(s)).append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ").append(newline)); sb.append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              "); sb.append(newline); } @@ -247,7 +267,10 @@ public class ConfigHelp implements Runnable { sb.append(newline); sb.append(newline); sb.append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                "); - config.reservedWords().forEach(s -> sb.append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ").append(escapeHtml4(s)).append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ").append(newline)); + config.reservedWords() + .stream() + .sorted(String::compareTo) + .forEach(s -> sb.append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ").append(escapeHtml4(s)).append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • ").append(newline)); sb.append("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              "); sb.append(newline); } @@ -294,21 +317,32 @@ public class ConfigHelp implements Runnable { String optIndent = "\t"; String optNestedIndent = "\t "; - for (CliOption langCliOption : config.cliOptions()) { - sb.append(optIndent).append(langCliOption.getOpt()); + Map langCliOptions = config.cliOptions() + .stream() + .collect(Collectors.toMap(CliOption::getOpt, Function.identity(), (a, b) -> { + throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a.getOpt(), b.getOpt())); + }, TreeMap::new)); + + langCliOptions.forEach((key, langCliOption) -> { + sb.append(optIndent).append(key); sb.append(newline); sb.append(optNestedIndent).append(langCliOption.getOptionHelp() .replaceAll("\n", System.lineSeparator() + optNestedIndent)); sb.append(newline); sb.append(newline); - } + }); if (Boolean.TRUE.equals(importMappings)) { sb.append(newline); sb.append("IMPORT MAPPING"); sb.append(newline); sb.append(newline); - Map map = config.importMapping(); + Map map = config.importMapping() + .entrySet() + .stream() + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> { + throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a, b)); + }, TreeMap::new)); writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "Type/Alias", "Imports"); sb.append(newline); } @@ -318,7 +352,12 @@ public class ConfigHelp implements Runnable { sb.append("INSTANTIATION TYPES"); sb.append(newline); sb.append(newline); - Map map = config.instantiationTypes(); + Map map = config.instantiationTypes() + .entrySet() + .stream() + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> { + throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a, b)); + }, TreeMap::new)); writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "Type/Alias", "Instantiated By"); sb.append(newline); } @@ -389,7 +428,7 @@ public class ConfigHelp implements Runnable { for (int i = 0; i < arr.length; i++) { String current = arr[i]; sb.append(optIndent).append(String.format(Locale.ROOT, format, current)); - if (i % columns == 0) { + if ((i + 1) % columns == 0) { sb.append(newline); } } diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java index a9270dc41d..3cab8cf656 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java @@ -25,6 +25,9 @@ public class ListGenerators implements Runnable { @Option(name = {"-d", "--docsite" }, description = "format for docusaurus site output", hidden = true) private Boolean docusaurus = false; + @Option(name = {"--github-nested-index" }, description = "format for github index at docs/generators/README.md", hidden = true) + private Boolean githubNestedIndex = false; + @Option(name = {"-i", "--include" }, description = "comma-separated list of stability indexes to include (value: all,beta,stable,experimental,deprecated). Excludes deprecated by default.", allowedValues = { "all", "beta", "stable", "experimental", "deprecated" }) @@ -85,7 +88,7 @@ public class ListGenerators implements Runnable { .collect(Collectors.toList()); if(!list.isEmpty()) { - if (docusaurus) { + if (docusaurus || githubNestedIndex) { sb.append("## ").append(typeName).append(" generators"); } else { sb.append(typeName).append(" generators:"); @@ -94,9 +97,10 @@ public class ListGenerators implements Runnable { list.forEach(generator -> { GeneratorMetadata meta = generator.getGeneratorMetadata(); - if (docusaurus) { + if (docusaurus || githubNestedIndex) { sb.append("* "); - String id = "generators/" + generator.getName() + ".md"; + String idPrefix = docusaurus ? "generators/" : ""; + String id = idPrefix + generator.getName() + ".md"; sb.append("[").append(generator.getName()); if (meta != null && meta.getStability() != null && meta.getStability() != Stability.STABLE) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java index 6a5bf184e8..02a25cd9cf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangClientCodegen.java @@ -124,7 +124,7 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig cliOptions.clear(); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application name (convention: lowercase).") .defaultValue(this.packageName)); - cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application version") + cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "Erlang application version") .defaultValue(this.packageVersion)); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java index 55a3a975c0..b48eb615be 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ErlangProperCodegen.java @@ -130,7 +130,7 @@ public class ErlangProperCodegen extends DefaultCodegen implements CodegenConfig cliOptions.clear(); cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application name (convention: lowercase).") .defaultValue(this.packageName)); - cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Erlang application version") + cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "Erlang application version") .defaultValue(this.packageVersion)); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java index f21ad4f5c4..c680ff5d19 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSCXFCDIServerCodegen.java @@ -53,8 +53,6 @@ public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen imp // Updated template directory embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME + File.separator + "cxf-cdi"; - - cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations",useBeanValidation)); } @Override diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java index 2439d1fb74..a8d53dfa28 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaResteasyEapServerCodegen.java @@ -63,7 +63,6 @@ public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen embeddedTemplateDir = templateDir = "JavaJaxRS" + File.separator + "resteasy" + File.separator + "eap"; - cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations",useBeanValidation)); cliOptions.add(CliOption.newBoolean(GENERATE_JBOSS_DEPLOYMENT_DESCRIPTOR, "Generate Jboss Deployment Descriptor",generateJbossDeploymentDescriptor)); cliOptions.add(CliOption.newBoolean(USE_SWAGGER_FEATURE, "Use dynamic Swagger generator",useSwaggerFeature)); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java index 454eb43b77..eb669b02df 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift4Codegen.java @@ -236,8 +236,6 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig { cliOptions.add(new CliOption(CodegenConstants.NON_PUBLIC_API, CodegenConstants.NON_PUBLIC_API_DESC + "(default: false)")); - cliOptions.add(new CliOption(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, - CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC)); cliOptions.add(new CliOption(UNWRAP_REQUIRED, "Treat 'required' properties in response as non-optional " + "(which would crash the app if api returns null as opposed " diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 094eec48df..5bc9f1ad4d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -221,8 +221,6 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig cliOptions.add(new CliOption(CodegenConstants.NON_PUBLIC_API, CodegenConstants.NON_PUBLIC_API_DESC + "(default: false)")); - cliOptions.add(new CliOption(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, - CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC)); cliOptions.add(new CliOption(OBJC_COMPATIBLE, "Add additional properties and methods for Objective-C " + "compatibility (default: false)")); From f744ec55f8bb8228a6c51af0e72090157cdabb04 Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Sun, 19 Jan 2020 18:17:02 -0800 Subject: [PATCH 80/82] Execute ./bin/openapi3/go-experimental-petstore.sh script (#5049) --- .../go-petstore/api/openapi.yaml | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml index 06a1bb8d46..71d688ccea 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/api/openapi.yaml @@ -54,7 +54,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - 405: + "405": description: Invalid input security: - petstore_auth: @@ -68,11 +68,11 @@ paths: requestBody: $ref: '#/components/requestBodies/Pet' responses: - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Pet not found - 405: + "405": description: Validation exception security: - petstore_auth: @@ -105,7 +105,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -118,7 +118,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": description: Invalid status value security: - petstore_auth: @@ -145,7 +145,7 @@ paths: type: array style: form responses: - 200: + "200": content: application/xml: schema: @@ -158,7 +158,7 @@ paths: $ref: '#/components/schemas/Pet' type: array description: successful operation - 400: + "400": description: Invalid tag value security: - petstore_auth: @@ -188,7 +188,7 @@ paths: type: integer style: simple responses: - 400: + "400": description: Invalid pet value security: - petstore_auth: @@ -211,7 +211,7 @@ paths: type: integer style: simple responses: - 200: + "200": content: application/xml: schema: @@ -220,9 +220,9 @@ paths: schema: $ref: '#/components/schemas/Pet' description: successful operation - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Pet not found security: - api_key: [] @@ -255,7 +255,7 @@ paths: type: string type: object responses: - 405: + "405": description: Invalid input security: - petstore_auth: @@ -292,7 +292,7 @@ paths: type: string type: object responses: - 200: + "200": content: application/json: schema: @@ -310,7 +310,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + "200": content: application/json: schema: @@ -335,7 +335,7 @@ paths: description: order placed for purchasing the pet required: true responses: - 200: + "200": content: application/xml: schema: @@ -344,7 +344,7 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": description: Invalid Order summary: Place an order for a pet tags: @@ -364,9 +364,9 @@ paths: type: string style: simple responses: - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Order not found summary: Delete purchase order by ID tags: @@ -388,7 +388,7 @@ paths: type: integer style: simple responses: - 200: + "200": content: application/xml: schema: @@ -397,9 +397,9 @@ paths: schema: $ref: '#/components/schemas/Order' description: successful operation - 400: + "400": description: Invalid ID supplied - 404: + "404": description: Order not found summary: Find purchase order by ID tags: @@ -464,7 +464,7 @@ paths: type: string style: form responses: - 200: + "200": content: application/xml: schema: @@ -488,7 +488,7 @@ paths: format: date-time type: string style: simple - 400: + "400": description: Invalid username/password supplied summary: Logs user into the system tags: @@ -516,9 +516,9 @@ paths: type: string style: simple responses: - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found summary: Delete user tags: @@ -535,7 +535,7 @@ paths: type: string style: simple responses: - 200: + "200": content: application/xml: schema: @@ -544,9 +544,9 @@ paths: schema: $ref: '#/components/schemas/User' description: successful operation - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found summary: Get user by user name tags: @@ -571,9 +571,9 @@ paths: description: Updated user object required: true responses: - 400: + "400": description: Invalid user supplied - 404: + "404": description: User not found summary: Updated user tags: @@ -585,7 +585,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -652,7 +652,7 @@ paths: type: integer style: form responses: - 400: + "400": description: Someting wrong security: - bearer_test: [] @@ -767,9 +767,9 @@ paths: type: string type: object responses: - 400: + "400": description: Invalid request - 404: + "404": description: Not found summary: To test enum parameters tags: @@ -780,7 +780,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -873,9 +873,9 @@ paths: - pattern_without_delimiter type: object responses: - 400: + "400": description: Invalid username supplied - 404: + "404": description: User not found security: - http_basic_test: [] @@ -897,7 +897,7 @@ paths: $ref: '#/components/schemas/OuterNumber' description: Input number as post body responses: - 200: + "200": content: '*/*': schema: @@ -916,7 +916,7 @@ paths: $ref: '#/components/schemas/OuterString' description: Input string as post body responses: - 200: + "200": content: '*/*': schema: @@ -935,7 +935,7 @@ paths: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body responses: - 200: + "200": content: '*/*': schema: @@ -954,7 +954,7 @@ paths: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body responses: - 200: + "200": content: '*/*': schema: @@ -982,7 +982,7 @@ paths: - param2 type: object responses: - 200: + "200": description: successful operation summary: test json serialization of form data tags: @@ -1000,7 +1000,7 @@ paths: description: request body required: true responses: - 200: + "200": description: successful operation summary: test inline additionalProperties tags: @@ -1023,7 +1023,7 @@ paths: $ref: '#/components/schemas/User' required: true responses: - 200: + "200": description: Success tags: - fake @@ -1034,7 +1034,7 @@ paths: requestBody: $ref: '#/components/requestBodies/Client' responses: - 200: + "200": content: application/json: schema: @@ -1055,7 +1055,7 @@ paths: $ref: '#/components/schemas/FileSchemaTestClass' required: true responses: - 200: + "200": description: Success tags: - fake @@ -1110,7 +1110,7 @@ paths: type: array style: form responses: - 200: + "200": description: Success tags: - fake @@ -1144,7 +1144,7 @@ paths: - requiredFile type: object responses: - 200: + "200": content: application/json: schema: @@ -1160,7 +1160,7 @@ paths: /fake/health: get: responses: - 200: + "200": content: application/json: schema: @@ -1423,14 +1423,14 @@ components: type: integer property: type: string - 123Number: + "123Number": readOnly: true type: integer required: - name xml: name: Name - 200_response: + "200_response": description: Model for testing model name starting with number properties: name: @@ -1608,7 +1608,7 @@ components: type: object List: properties: - 123-list: + "123-list": type: string type: object Client: From 449026add7f3a341b6556e37834151e80bd16180 Mon Sep 17 00:00:00 2001 From: Sebastien Rosset Date: Sun, 19 Jan 2020 18:18:15 -0800 Subject: [PATCH 81/82] Add java code comments based on explanation from Jim Schubert (#5048) --- .../java/org/openapitools/codegen/DefaultCodegen.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 65b06022d2..45677bb61e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -136,6 +136,10 @@ public class DefaultCodegen implements CodegenConfig { protected String modelNamePrefix = "", modelNameSuffix = ""; protected String apiNameSuffix = "Api"; protected String testPackage = ""; + /* + apiTemplateFiles are for API outputs only (controllers/handlers). + API templates may be written multiple times; APIs are grouped by tag and the file is written once per tag group. + */ protected Map apiTemplateFiles = new HashMap(); protected Map modelTemplateFiles = new HashMap(); protected Map apiTestTemplateFiles = new HashMap(); @@ -149,6 +153,11 @@ public class DefaultCodegen implements CodegenConfig { protected Map additionalProperties = new HashMap(); protected Map serverVariables = new HashMap(); protected Map vendorExtensions = new HashMap(); + /* + Supporting files are those which aren't models, APIs, or docs. + These get a different map of data bound to the templates. Supporting files are written once. + See also 'apiTemplateFiles'. + */ protected List supportingFiles = new ArrayList(); protected List cliOptions = new ArrayList(); protected boolean skipOverwrite; From 3a8e598ca22f78b37739c319c0ec6a6baa8afe20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=A0o=20Ho=C3=A0ng=20S=C6=A1n?= Date: Mon, 20 Jan 2020 10:56:24 +0700 Subject: [PATCH 82/82] [dart-dio] Various fixes (#5027) * [dart-dio+time_machine] Add missing import, serializer * [dart-dio] Remove bad import from `http` package * [dart-dio] Use raw strings for those that contain variable name. This should eliminate potential issue with variables like `$ref`. * [dart-dio] Use `_path` instead of `path` to avoid potential conflict with op params. See https://gist.githubusercontent.com/daohoangson/6431f46beb4c2d0d163f3a4791f518e8/raw/1bec0b47b1a00d1655689db1c2f6a399d10a5899/Kubernetes.json, there are a few with `{path}` param. * [dart-dio+time_machine] Use `OffsetXxx` classes for date time values --- .../languages/DartDioClientCodegen.java | 6 +- .../src/main/resources/dart-dio/api.mustache | 12 +- .../main/resources/dart-dio/apilib.mustache | 1 - .../main/resources/dart-dio/class.mustache | 2 +- .../dart-dio/local_date_serializer.mustache | 50 +++++-- .../resources/dart-dio/serializers.mustache | 7 +- .../codegen/dartdio/DartDioModelTest.java | 6 +- samples/client/petstore/dart-dio/lib/api.dart | 1 - .../petstore/dart-dio/lib/api/pet_api.dart | 42 +++--- .../petstore/dart-dio/lib/api/store_api.dart | 16 +-- .../petstore/dart-dio/lib/api/user_api.dart | 36 ++--- .../dart-dio/lib/model/api_response.dart | 6 +- .../dart-dio/lib/model/api_response.g.dart | 41 +++--- .../petstore/dart-dio/lib/model/category.dart | 4 +- .../dart-dio/lib/model/category.g.dart | 29 ++-- .../petstore/dart-dio/lib/model/order.dart | 12 +- .../petstore/dart-dio/lib/model/order.g.dart | 77 ++++++----- .../petstore/dart-dio/lib/model/pet.dart | 12 +- .../petstore/dart-dio/lib/model/pet.g.dart | 125 +++++++++--------- .../petstore/dart-dio/lib/model/tag.dart | 4 +- .../petstore/dart-dio/lib/model/tag.g.dart | 29 ++-- .../petstore/dart-dio/lib/model/user.dart | 16 +-- .../petstore/dart-dio/lib/model/user.g.dart | 102 +++++++------- .../petstore/dart-dio/lib/serializers.g.dart | 8 +- 24 files changed, 337 insertions(+), 307 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 8cded7e4c0..af85710ef7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -245,11 +245,11 @@ public class DartDioClientCodegen extends DartClientCodegen { typeMapping.put("date", "DateTime"); } else if ("timemachine".equals(dateLibrary)) { additionalProperties.put("timeMachine", "true"); - typeMapping.put("date", "LocalDate"); - typeMapping.put("Date", "LocalDate"); + typeMapping.put("date", "OffsetDate"); + typeMapping.put("Date", "OffsetDate"); typeMapping.put("DateTime", "OffsetDateTime"); typeMapping.put("datetime", "OffsetDateTime"); - importMapping.put("LocalDate", "package:time_machine/time_machine.dart"); + importMapping.put("OffsetDate", "package:time_machine/time_machine.dart"); importMapping.put("OffsetDateTime", "package:time_machine/time_machine.dart"); supportingFiles.add(new SupportingFile("local_date_serializer.mustache", libFolder, "local_date_serializer.dart")); diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index 5b7ace703e..112fd77f99 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -23,17 +23,17 @@ class {{classname}} { /// {{notes}} Future{{/returnType}}>{{nickname}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}},{{/required}}{{/allParams}}CancelToken cancelToken, Map headers,}) async { - String path = "{{{path}}}"{{#pathParams}}.replaceAll("{" + "{{baseName}}" + "}", {{{paramName}}}.toString()){{/pathParams}}; + String _path = "{{{path}}}"{{#pathParams}}.replaceAll("{" r'{{baseName}}' "}", {{{paramName}}}.toString()){{/pathParams}}; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); dynamic bodyData; {{#headerParams}} - headerParams["{{baseName}}"] = {{paramName}}; + headerParams[r'{{baseName}}'] = {{paramName}}; {{/headerParams}} {{#queryParams}} - queryParams["{{baseName}}"] = {{paramName}}; + queryParams[r'{{baseName}}'] = {{paramName}}; {{/queryParams}} queryParams.removeWhere((key, value) => value == null); headerParams.removeWhere((key, value) => value == null); @@ -46,12 +46,12 @@ class {{classname}} { {{#isMultipart}} {{^isFile}} if ({{paramName}} != null) { - formData['{{baseName}}'] = parameterToString(_serializers, {{paramName}}); + formData[r'{{baseName}}'] = parameterToString(_serializers, {{paramName}}); } {{/isFile}} {{#isFile}} if ({{paramName}} != null) { - formData['{{baseName}}'] = MultipartFile.fromBytes({{paramName}}, filename: "{{baseName}}"); + formData[r'{{baseName}}'] = MultipartFile.fromBytes({{paramName}}, filename: r'{{baseName}}'); } {{/isFile}} {{/isMultipart}} @@ -72,7 +72,7 @@ class {{classname}} { {{/bodyParam}} return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( diff --git a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache index 14d947b104..77029c3994 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/apilib.mustache @@ -1,6 +1,5 @@ library {{pubName}}.api; -import 'package:http/io_client.dart'; import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; import 'package:{{pubName}}/serializers.dart'; diff --git a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache index c7e26935d3..f0df6902f7 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache @@ -10,7 +10,7 @@ abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builde {{#isNullable}} @nullable {{/isNullable}} - @BuiltValueField(wireName: '{{baseName}}') + @BuiltValueField(wireName: r'{{baseName}}') {{{dataType}}} get {{name}}; {{#allowableValues}} {{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}} diff --git a/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache b/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache index 2fb73ef0aa..86a9eac68c 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/local_date_serializer.mustache @@ -2,22 +2,44 @@ import 'package:built_collection/built_collection.dart'; import 'package:built_value/serializer.dart'; import 'package:time_machine/time_machine.dart'; -class LocalDateSerializer implements PrimitiveSerializer { +class OffsetDateSerializer implements PrimitiveSerializer { @override - Iterable get types => BuiltList([LocalDate]); + Iterable get types => BuiltList([OffsetDate]); - @override - String get wireName => "LocalDate"; + @override + String get wireName => "OffsetDate"; - @override - LocalDate deserialize(Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) { - return LocalDate.dateTime(DateTime.parse(serialized as String)); - } + @override + OffsetDate deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) { + final local = LocalDate.dateTime(DateTime.parse(serialized as String)); + return OffsetDate(local, Offset(0)); + } - @override - Object serialize(Serializers serializers, LocalDate localDate, - {FullType specifiedType = FullType.unspecified}) { - return localDate.toString('yyyy-MM-dd'); - } + @override + Object serialize(Serializers serializers, OffsetDate offsetDate, + {FullType specifiedType = FullType.unspecified}) { + return offsetDate.toString('yyyy-MM-dd'); + } +} + +class OffsetDateTimeSerializer implements PrimitiveSerializer { + @override + Iterable get types => BuiltList([OffsetDateTime]); + + @override + String get wireName => "OffsetDateTime"; + + @override + OffsetDateTime deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) { + final local = LocalDateTime.dateTime(DateTime.parse(serialized as String)); + return OffsetDateTime(local, Offset(0)); + } + + @override + Object serialize(Serializers serializers, OffsetDateTime offsetDateTime, + {FullType specifiedType = FullType.unspecified}) { + return offsetDateTime.toString(); + } } diff --git a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache index 2d850a28c9..76ebd4a0dc 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/serializers.mustache @@ -4,7 +4,8 @@ import 'package:built_value/serializer.dart'; import 'package:built_collection/built_collection.dart'; import 'package:built_value/json_object.dart'; import 'package:built_value/standard_json_plugin.dart'; -{{#timeMachine}}import 'package:{{pubName}}/local_date_serializer.dart';{{/timeMachine}} +{{#timeMachine}}import 'package:time_machine/time_machine.dart'; +import 'package:{{pubName}}/local_date_serializer.dart';{{/timeMachine}} {{#models}}{{#model}}import 'package:{{pubName}}/model/{{classFilename}}.dart'; {{/model}}{{/models}} @@ -25,4 +26,6 @@ const FullType(BuiltList, const [const FullType({{classname}})]), Serializers standardSerializers = (serializers.toBuilder() -{{#timeMachine}}..add(LocalDateSerializer()){{/timeMachine}}..addPlugin(StandardJsonPlugin())).build(); +{{#timeMachine}}..add(OffsetDateSerializer()) +..add(OffsetDateTimeSerializer()) +{{/timeMachine}}..addPlugin(StandardJsonPlugin())).build(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java index 4ccac1f074..7776cf9ccf 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dartdio/DartDioModelTest.java @@ -162,11 +162,11 @@ public class DartDioModelTest { final CodegenProperty property4 = cm.vars.get(3); Assert.assertEquals(property4.baseName, "birthDate"); - Assert.assertEquals(property4.complexType, "LocalDate"); - Assert.assertEquals(property4.dataType, "LocalDate"); + Assert.assertEquals(property4.complexType, "OffsetDate"); + Assert.assertEquals(property4.dataType, "OffsetDate"); Assert.assertEquals(property4.name, "birthDate"); Assert.assertEquals(property4.defaultValue, "null"); - Assert.assertEquals(property4.baseType, "LocalDate"); + Assert.assertEquals(property4.baseType, "OffsetDate"); Assert.assertFalse(property4.hasMore); Assert.assertFalse(property4.required); Assert.assertFalse(property4.isContainer); diff --git a/samples/client/petstore/dart-dio/lib/api.dart b/samples/client/petstore/dart-dio/lib/api.dart index 8fc03c1fec..5206fb1d36 100644 --- a/samples/client/petstore/dart-dio/lib/api.dart +++ b/samples/client/petstore/dart-dio/lib/api.dart @@ -1,6 +1,5 @@ library openapi.api; -import 'package:http/io_client.dart'; import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; import 'package:openapi/serializers.dart'; diff --git a/samples/client/petstore/dart-dio/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/lib/api/pet_api.dart index 7078df5969..5c78e6e620 100644 --- a/samples/client/petstore/dart-dio/lib/api/pet_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/pet_api.dart @@ -21,7 +21,7 @@ class PetApi { /// FutureaddPet(Pet body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/pet"; + String _path = "/pet"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -38,7 +38,7 @@ class PetApi { bodyData = jsonbody; return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -54,13 +54,13 @@ class PetApi { /// FuturedeletePet(int petId,{ String apiKey,CancelToken cancelToken, Map headers,}) async { - String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); dynamic bodyData; - headerParams["api_key"] = apiKey; + headerParams[r'api_key'] = apiKey; queryParams.removeWhere((key, value) => value == null); headerParams.removeWhere((key, value) => value == null); @@ -69,7 +69,7 @@ class PetApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -85,13 +85,13 @@ class PetApi { /// Multiple status values can be provided with comma separated strings Future>>findPetsByStatus(List status,{ CancelToken cancelToken, Map headers,}) async { - String path = "/pet/findByStatus"; + String _path = "/pet/findByStatus"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); dynamic bodyData; - queryParams["status"] = status; + queryParams[r'status'] = status; queryParams.removeWhere((key, value) => value == null); headerParams.removeWhere((key, value) => value == null); @@ -100,7 +100,7 @@ class PetApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -131,13 +131,13 @@ class PetApi { /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. Future>>findPetsByTags(List tags,{ CancelToken cancelToken, Map headers,}) async { - String path = "/pet/findByTags"; + String _path = "/pet/findByTags"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); dynamic bodyData; - queryParams["tags"] = tags; + queryParams[r'tags'] = tags; queryParams.removeWhere((key, value) => value == null); headerParams.removeWhere((key, value) => value == null); @@ -146,7 +146,7 @@ class PetApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -177,7 +177,7 @@ class PetApi { /// Returns a single pet Future>getPetById(int petId,{ CancelToken cancelToken, Map headers,}) async { - String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -191,7 +191,7 @@ class PetApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -221,7 +221,7 @@ class PetApi { /// FutureupdatePet(Pet body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/pet"; + String _path = "/pet"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -238,7 +238,7 @@ class PetApi { bodyData = jsonbody; return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -254,7 +254,7 @@ class PetApi { /// FutureupdatePetWithForm(int petId,{ String name,String status,CancelToken cancelToken, Map headers,}) async { - String path = "/pet/{petId}".replaceAll("{" + "petId" + "}", petId.toString()); + String _path = "/pet/{petId}".replaceAll("{" r'petId' "}", petId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -270,7 +270,7 @@ class PetApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -286,7 +286,7 @@ class PetApi { /// Future>uploadFile(int petId,{ String additionalMetadata,Uint8List file,CancelToken cancelToken, Map headers,}) async { - String path = "/pet/{petId}/uploadImage".replaceAll("{" + "petId" + "}", petId.toString()); + String _path = "/pet/{petId}/uploadImage".replaceAll("{" r'petId' "}", petId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -299,16 +299,16 @@ class PetApi { Map formData = {}; if (additionalMetadata != null) { - formData['additionalMetadata'] = parameterToString(_serializers, additionalMetadata); + formData[r'additionalMetadata'] = parameterToString(_serializers, additionalMetadata); } if (file != null) { - formData['file'] = MultipartFile.fromBytes(file, filename: "file"); + formData[r'file'] = MultipartFile.fromBytes(file, filename: r'file'); } bodyData = FormData.fromMap(formData); return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( diff --git a/samples/client/petstore/dart-dio/lib/api/store_api.dart b/samples/client/petstore/dart-dio/lib/api/store_api.dart index abbe73be27..92e4a1394f 100644 --- a/samples/client/petstore/dart-dio/lib/api/store_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/store_api.dart @@ -18,7 +18,7 @@ class StoreApi { /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors FuturedeleteOrder(String orderId,{ CancelToken cancelToken, Map headers,}) async { - String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + String _path = "/store/order/{orderId}".replaceAll("{" r'orderId' "}", orderId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -32,7 +32,7 @@ class StoreApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -48,7 +48,7 @@ class StoreApi { /// Returns a map of status codes to quantities Future>>getInventory({ CancelToken cancelToken, Map headers,}) async { - String path = "/store/inventory"; + String _path = "/store/inventory"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -62,7 +62,7 @@ class StoreApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -92,7 +92,7 @@ class StoreApi { /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions Future>getOrderById(int orderId,{ CancelToken cancelToken, Map headers,}) async { - String path = "/store/order/{orderId}".replaceAll("{" + "orderId" + "}", orderId.toString()); + String _path = "/store/order/{orderId}".replaceAll("{" r'orderId' "}", orderId.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -106,7 +106,7 @@ class StoreApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -136,7 +136,7 @@ class StoreApi { /// Future>placeOrder(Order body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/store/order"; + String _path = "/store/order"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -153,7 +153,7 @@ class StoreApi { bodyData = jsonbody; return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( diff --git a/samples/client/petstore/dart-dio/lib/api/user_api.dart b/samples/client/petstore/dart-dio/lib/api/user_api.dart index a2d2d3189a..2e127ec8d7 100644 --- a/samples/client/petstore/dart-dio/lib/api/user_api.dart +++ b/samples/client/petstore/dart-dio/lib/api/user_api.dart @@ -18,7 +18,7 @@ class UserApi { /// This can only be done by the logged in user. FuturecreateUser(User body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user"; + String _path = "/user"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -35,7 +35,7 @@ class UserApi { bodyData = jsonbody; return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -51,7 +51,7 @@ class UserApi { /// FuturecreateUsersWithArrayInput(List body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/createWithArray"; + String _path = "/user/createWithArray"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -69,7 +69,7 @@ class UserApi { bodyData = jsonbody; return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -85,7 +85,7 @@ class UserApi { /// FuturecreateUsersWithListInput(List body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/createWithList"; + String _path = "/user/createWithList"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -103,7 +103,7 @@ class UserApi { bodyData = jsonbody; return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -119,7 +119,7 @@ class UserApi { /// This can only be done by the logged in user. FuturedeleteUser(String username,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); + String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -133,7 +133,7 @@ class UserApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -149,7 +149,7 @@ class UserApi { /// Future>getUserByName(String username,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); + String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -163,7 +163,7 @@ class UserApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -193,14 +193,14 @@ class UserApi { /// Future>loginUser(String username,String password,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/login"; + String _path = "/user/login"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); dynamic bodyData; - queryParams["username"] = username; - queryParams["password"] = password; + queryParams[r'username'] = username; + queryParams[r'password'] = password; queryParams.removeWhere((key, value) => value == null); headerParams.removeWhere((key, value) => value == null); @@ -209,7 +209,7 @@ class UserApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -239,7 +239,7 @@ class UserApi { /// FuturelogoutUser({ CancelToken cancelToken, Map headers,}) async { - String path = "/user/logout"; + String _path = "/user/logout"; Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -253,7 +253,7 @@ class UserApi { return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( @@ -269,7 +269,7 @@ class UserApi { /// This can only be done by the logged in user. FutureupdateUser(String username,User body,{ CancelToken cancelToken, Map headers,}) async { - String path = "/user/{username}".replaceAll("{" + "username" + "}", username.toString()); + String _path = "/user/{username}".replaceAll("{" r'username' "}", username.toString()); Map queryParams = {}; Map headerParams = Map.from(headers ?? {}); @@ -286,7 +286,7 @@ class UserApi { bodyData = jsonbody; return _dio.request( - path, + _path, queryParameters: queryParams, data: bodyData, options: Options( diff --git a/samples/client/petstore/dart-dio/lib/model/api_response.dart b/samples/client/petstore/dart-dio/lib/model/api_response.dart index 1463d222b9..1512a5509d 100644 --- a/samples/client/petstore/dart-dio/lib/model/api_response.dart +++ b/samples/client/petstore/dart-dio/lib/model/api_response.dart @@ -7,15 +7,15 @@ abstract class ApiResponse implements Built { @nullable - @BuiltValueField(wireName: 'code') + @BuiltValueField(wireName: r'code') int get code; @nullable - @BuiltValueField(wireName: 'type') + @BuiltValueField(wireName: r'type') String get type; @nullable - @BuiltValueField(wireName: 'message') + @BuiltValueField(wireName: r'message') String get message; // Boilerplate code needed to wire-up generated code diff --git a/samples/client/petstore/dart-dio/lib/model/api_response.g.dart b/samples/client/petstore/dart-dio/lib/model/api_response.g.dart index ca7c7161ba..3e5db8c181 100644 --- a/samples/client/petstore/dart-dio/lib/model/api_response.g.dart +++ b/samples/client/petstore/dart-dio/lib/model/api_response.g.dart @@ -17,16 +17,25 @@ class _$ApiResponseSerializer implements StructuredSerializer { @override Iterable serialize(Serializers serializers, ApiResponse object, {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'code', - serializers.serialize(object.code, specifiedType: const FullType(int)), - 'type', - serializers.serialize(object.type, specifiedType: const FullType(String)), - 'message', - serializers.serialize(object.message, - specifiedType: const FullType(String)), - ]; - + final result = []; + if (object.code != null) { + result + ..add('code') + ..add(serializers.serialize(object.code, + specifiedType: const FullType(int))); + } + if (object.type != null) { + result + ..add('type') + ..add(serializers.serialize(object.type, + specifiedType: const FullType(String))); + } + if (object.message != null) { + result + ..add('message') + ..add(serializers.serialize(object.message, + specifiedType: const FullType(String))); + } return result; } @@ -71,17 +80,7 @@ class _$ApiResponse extends ApiResponse { factory _$ApiResponse([void Function(ApiResponseBuilder) updates]) => (new ApiResponseBuilder()..update(updates)).build(); - _$ApiResponse._({this.code, this.type, this.message}) : super._() { - if (code == null) { - throw new BuiltValueNullFieldError('ApiResponse', 'code'); - } - if (type == null) { - throw new BuiltValueNullFieldError('ApiResponse', 'type'); - } - if (message == null) { - throw new BuiltValueNullFieldError('ApiResponse', 'message'); - } - } + _$ApiResponse._({this.code, this.type, this.message}) : super._(); @override ApiResponse rebuild(void Function(ApiResponseBuilder) updates) => diff --git a/samples/client/petstore/dart-dio/lib/model/category.dart b/samples/client/petstore/dart-dio/lib/model/category.dart index 725c0a5c61..da7b671dd2 100644 --- a/samples/client/petstore/dart-dio/lib/model/category.dart +++ b/samples/client/petstore/dart-dio/lib/model/category.dart @@ -7,11 +7,11 @@ abstract class Category implements Built { @nullable - @BuiltValueField(wireName: 'id') + @BuiltValueField(wireName: r'id') int get id; @nullable - @BuiltValueField(wireName: 'name') + @BuiltValueField(wireName: r'name') String get name; // Boilerplate code needed to wire-up generated code diff --git a/samples/client/petstore/dart-dio/lib/model/category.g.dart b/samples/client/petstore/dart-dio/lib/model/category.g.dart index 4e4b83a006..a766a9b3db 100644 --- a/samples/client/petstore/dart-dio/lib/model/category.g.dart +++ b/samples/client/petstore/dart-dio/lib/model/category.g.dart @@ -17,13 +17,19 @@ class _$CategorySerializer implements StructuredSerializer { @override Iterable serialize(Serializers serializers, Category object, {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'id', - serializers.serialize(object.id, specifiedType: const FullType(int)), - 'name', - serializers.serialize(object.name, specifiedType: const FullType(String)), - ]; - + final result = []; + if (object.id != null) { + result + ..add('id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(int))); + } + if (object.name != null) { + result + ..add('name') + ..add(serializers.serialize(object.name, + specifiedType: const FullType(String))); + } return result; } @@ -62,14 +68,7 @@ class _$Category extends Category { factory _$Category([void Function(CategoryBuilder) updates]) => (new CategoryBuilder()..update(updates)).build(); - _$Category._({this.id, this.name}) : super._() { - if (id == null) { - throw new BuiltValueNullFieldError('Category', 'id'); - } - if (name == null) { - throw new BuiltValueNullFieldError('Category', 'name'); - } - } + _$Category._({this.id, this.name}) : super._(); @override Category rebuild(void Function(CategoryBuilder) updates) => diff --git a/samples/client/petstore/dart-dio/lib/model/order.dart b/samples/client/petstore/dart-dio/lib/model/order.dart index 4838d56a1d..abf27c59f9 100644 --- a/samples/client/petstore/dart-dio/lib/model/order.dart +++ b/samples/client/petstore/dart-dio/lib/model/order.dart @@ -7,28 +7,28 @@ abstract class Order implements Built { @nullable - @BuiltValueField(wireName: 'id') + @BuiltValueField(wireName: r'id') int get id; @nullable - @BuiltValueField(wireName: 'petId') + @BuiltValueField(wireName: r'petId') int get petId; @nullable - @BuiltValueField(wireName: 'quantity') + @BuiltValueField(wireName: r'quantity') int get quantity; @nullable - @BuiltValueField(wireName: 'shipDate') + @BuiltValueField(wireName: r'shipDate') DateTime get shipDate; /* Order Status */ @nullable - @BuiltValueField(wireName: 'status') + @BuiltValueField(wireName: r'status') String get status; //enum statusEnum { placed, approved, delivered, }; @nullable - @BuiltValueField(wireName: 'complete') + @BuiltValueField(wireName: r'complete') bool get complete; // Boilerplate code needed to wire-up generated code diff --git a/samples/client/petstore/dart-dio/lib/model/order.g.dart b/samples/client/petstore/dart-dio/lib/model/order.g.dart index e4eede934c..5d58a6b36c 100644 --- a/samples/client/petstore/dart-dio/lib/model/order.g.dart +++ b/samples/client/petstore/dart-dio/lib/model/order.g.dart @@ -17,25 +17,43 @@ class _$OrderSerializer implements StructuredSerializer { @override Iterable serialize(Serializers serializers, Order object, {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'id', - serializers.serialize(object.id, specifiedType: const FullType(int)), - 'petId', - serializers.serialize(object.petId, specifiedType: const FullType(int)), - 'quantity', - serializers.serialize(object.quantity, - specifiedType: const FullType(int)), - 'shipDate', - serializers.serialize(object.shipDate, - specifiedType: const FullType(DateTime)), - 'status', - serializers.serialize(object.status, - specifiedType: const FullType(String)), - 'complete', - serializers.serialize(object.complete, - specifiedType: const FullType(bool)), - ]; - + final result = []; + if (object.id != null) { + result + ..add('id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(int))); + } + if (object.petId != null) { + result + ..add('petId') + ..add(serializers.serialize(object.petId, + specifiedType: const FullType(int))); + } + if (object.quantity != null) { + result + ..add('quantity') + ..add(serializers.serialize(object.quantity, + specifiedType: const FullType(int))); + } + if (object.shipDate != null) { + result + ..add('shipDate') + ..add(serializers.serialize(object.shipDate, + specifiedType: const FullType(DateTime))); + } + if (object.status != null) { + result + ..add('status') + ..add(serializers.serialize(object.status, + specifiedType: const FullType(String))); + } + if (object.complete != null) { + result + ..add('complete') + ..add(serializers.serialize(object.complete, + specifiedType: const FullType(bool))); + } return result; } @@ -105,26 +123,7 @@ class _$Order extends Order { this.shipDate, this.status, this.complete}) - : super._() { - if (id == null) { - throw new BuiltValueNullFieldError('Order', 'id'); - } - if (petId == null) { - throw new BuiltValueNullFieldError('Order', 'petId'); - } - if (quantity == null) { - throw new BuiltValueNullFieldError('Order', 'quantity'); - } - if (shipDate == null) { - throw new BuiltValueNullFieldError('Order', 'shipDate'); - } - if (status == null) { - throw new BuiltValueNullFieldError('Order', 'status'); - } - if (complete == null) { - throw new BuiltValueNullFieldError('Order', 'complete'); - } - } + : super._(); @override Order rebuild(void Function(OrderBuilder) updates) => diff --git a/samples/client/petstore/dart-dio/lib/model/pet.dart b/samples/client/petstore/dart-dio/lib/model/pet.dart index e8810fa2e9..d8647038ae 100644 --- a/samples/client/petstore/dart-dio/lib/model/pet.dart +++ b/samples/client/petstore/dart-dio/lib/model/pet.dart @@ -10,27 +10,27 @@ abstract class Pet implements Built { @nullable - @BuiltValueField(wireName: 'id') + @BuiltValueField(wireName: r'id') int get id; @nullable - @BuiltValueField(wireName: 'category') + @BuiltValueField(wireName: r'category') Category get category; @nullable - @BuiltValueField(wireName: 'name') + @BuiltValueField(wireName: r'name') String get name; @nullable - @BuiltValueField(wireName: 'photoUrls') + @BuiltValueField(wireName: r'photoUrls') BuiltList get photoUrls; @nullable - @BuiltValueField(wireName: 'tags') + @BuiltValueField(wireName: r'tags') BuiltList get tags; /* pet status in the store */ @nullable - @BuiltValueField(wireName: 'status') + @BuiltValueField(wireName: r'status') String get status; //enum statusEnum { available, pending, sold, }; diff --git a/samples/client/petstore/dart-dio/lib/model/pet.g.dart b/samples/client/petstore/dart-dio/lib/model/pet.g.dart index 058ad2dc9b..abfeb806b4 100644 --- a/samples/client/petstore/dart-dio/lib/model/pet.g.dart +++ b/samples/client/petstore/dart-dio/lib/model/pet.g.dart @@ -17,25 +17,45 @@ class _$PetSerializer implements StructuredSerializer { @override Iterable serialize(Serializers serializers, Pet object, {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'id', - serializers.serialize(object.id, specifiedType: const FullType(int)), - 'category', - serializers.serialize(object.category, - specifiedType: const FullType(Category)), - 'name', - serializers.serialize(object.name, specifiedType: const FullType(String)), - 'photoUrls', - serializers.serialize(object.photoUrls, - specifiedType: const FullType(List, const [const FullType(String)])), - 'tags', - serializers.serialize(object.tags, - specifiedType: const FullType(List, const [const FullType(Tag)])), - 'status', - serializers.serialize(object.status, - specifiedType: const FullType(String)), - ]; - + final result = []; + if (object.id != null) { + result + ..add('id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(int))); + } + if (object.category != null) { + result + ..add('category') + ..add(serializers.serialize(object.category, + specifiedType: const FullType(Category))); + } + if (object.name != null) { + result + ..add('name') + ..add(serializers.serialize(object.name, + specifiedType: const FullType(String))); + } + if (object.photoUrls != null) { + result + ..add('photoUrls') + ..add(serializers.serialize(object.photoUrls, + specifiedType: + const FullType(BuiltList, const [const FullType(String)]))); + } + if (object.tags != null) { + result + ..add('tags') + ..add(serializers.serialize(object.tags, + specifiedType: + const FullType(BuiltList, const [const FullType(Tag)]))); + } + if (object.status != null) { + result + ..add('status') + ..add(serializers.serialize(object.status, + specifiedType: const FullType(String))); + } return result; } @@ -63,16 +83,16 @@ class _$PetSerializer implements StructuredSerializer { specifiedType: const FullType(String)) as String; break; case 'photoUrls': - result.photoUrls = serializers.deserialize(value, + result.photoUrls.replace(serializers.deserialize(value, specifiedType: - const FullType(List, const [const FullType(String)])) - as List; + const FullType(BuiltList, const [const FullType(String)])) + as BuiltList); break; case 'tags': - result.tags = serializers.deserialize(value, + result.tags.replace(serializers.deserialize(value, specifiedType: - const FullType(List, const [const FullType(Tag)])) - as List; + const FullType(BuiltList, const [const FullType(Tag)])) + as BuiltList); break; case 'status': result.status = serializers.deserialize(value, @@ -93,9 +113,9 @@ class _$Pet extends Pet { @override final String name; @override - final List photoUrls; + final BuiltList photoUrls; @override - final List tags; + final BuiltList tags; @override final String status; @@ -109,26 +129,7 @@ class _$Pet extends Pet { this.photoUrls, this.tags, this.status}) - : super._() { - if (id == null) { - throw new BuiltValueNullFieldError('Pet', 'id'); - } - if (category == null) { - throw new BuiltValueNullFieldError('Pet', 'category'); - } - if (name == null) { - throw new BuiltValueNullFieldError('Pet', 'name'); - } - if (photoUrls == null) { - throw new BuiltValueNullFieldError('Pet', 'photoUrls'); - } - if (tags == null) { - throw new BuiltValueNullFieldError('Pet', 'tags'); - } - if (status == null) { - throw new BuiltValueNullFieldError('Pet', 'status'); - } - } + : super._(); @override Pet rebuild(void Function(PetBuilder) updates) => @@ -187,13 +188,14 @@ class PetBuilder implements Builder { String get name => _$this._name; set name(String name) => _$this._name = name; - List _photoUrls; - List get photoUrls => _$this._photoUrls; - set photoUrls(List photoUrls) => _$this._photoUrls = photoUrls; + ListBuilder _photoUrls; + ListBuilder get photoUrls => + _$this._photoUrls ??= new ListBuilder(); + set photoUrls(ListBuilder photoUrls) => _$this._photoUrls = photoUrls; - List _tags; - List get tags => _$this._tags; - set tags(List tags) => _$this._tags = tags; + ListBuilder _tags; + ListBuilder get tags => _$this._tags ??= new ListBuilder(); + set tags(ListBuilder tags) => _$this._tags = tags; String _status; String get status => _$this._status; @@ -206,8 +208,8 @@ class PetBuilder implements Builder { _id = _$v.id; _category = _$v.category?.toBuilder(); _name = _$v.name; - _photoUrls = _$v.photoUrls; - _tags = _$v.tags; + _photoUrls = _$v.photoUrls?.toBuilder(); + _tags = _$v.tags?.toBuilder(); _status = _$v.status; _$v = null; } @@ -234,16 +236,21 @@ class PetBuilder implements Builder { _$result = _$v ?? new _$Pet._( id: id, - category: category.build(), + category: _category?.build(), name: name, - photoUrls: photoUrls, - tags: tags, + photoUrls: _photoUrls?.build(), + tags: _tags?.build(), status: status); } catch (_) { String _$failedField; try { _$failedField = 'category'; - category.build(); + _category?.build(); + + _$failedField = 'photoUrls'; + _photoUrls?.build(); + _$failedField = 'tags'; + _tags?.build(); } catch (e) { throw new BuiltValueNestedFieldError( 'Pet', _$failedField, e.toString()); diff --git a/samples/client/petstore/dart-dio/lib/model/tag.dart b/samples/client/petstore/dart-dio/lib/model/tag.dart index ba86002670..202a58ee97 100644 --- a/samples/client/petstore/dart-dio/lib/model/tag.dart +++ b/samples/client/petstore/dart-dio/lib/model/tag.dart @@ -7,11 +7,11 @@ abstract class Tag implements Built { @nullable - @BuiltValueField(wireName: 'id') + @BuiltValueField(wireName: r'id') int get id; @nullable - @BuiltValueField(wireName: 'name') + @BuiltValueField(wireName: r'name') String get name; // Boilerplate code needed to wire-up generated code diff --git a/samples/client/petstore/dart-dio/lib/model/tag.g.dart b/samples/client/petstore/dart-dio/lib/model/tag.g.dart index e7de1eab62..4c8f7a9dc8 100644 --- a/samples/client/petstore/dart-dio/lib/model/tag.g.dart +++ b/samples/client/petstore/dart-dio/lib/model/tag.g.dart @@ -17,13 +17,19 @@ class _$TagSerializer implements StructuredSerializer { @override Iterable serialize(Serializers serializers, Tag object, {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'id', - serializers.serialize(object.id, specifiedType: const FullType(int)), - 'name', - serializers.serialize(object.name, specifiedType: const FullType(String)), - ]; - + final result = []; + if (object.id != null) { + result + ..add('id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(int))); + } + if (object.name != null) { + result + ..add('name') + ..add(serializers.serialize(object.name, + specifiedType: const FullType(String))); + } return result; } @@ -62,14 +68,7 @@ class _$Tag extends Tag { factory _$Tag([void Function(TagBuilder) updates]) => (new TagBuilder()..update(updates)).build(); - _$Tag._({this.id, this.name}) : super._() { - if (id == null) { - throw new BuiltValueNullFieldError('Tag', 'id'); - } - if (name == null) { - throw new BuiltValueNullFieldError('Tag', 'name'); - } - } + _$Tag._({this.id, this.name}) : super._(); @override Tag rebuild(void Function(TagBuilder) updates) => diff --git a/samples/client/petstore/dart-dio/lib/model/user.dart b/samples/client/petstore/dart-dio/lib/model/user.dart index d6595d4a9d..3b70e58fac 100644 --- a/samples/client/petstore/dart-dio/lib/model/user.dart +++ b/samples/client/petstore/dart-dio/lib/model/user.dart @@ -7,35 +7,35 @@ abstract class User implements Built { @nullable - @BuiltValueField(wireName: 'id') + @BuiltValueField(wireName: r'id') int get id; @nullable - @BuiltValueField(wireName: 'username') + @BuiltValueField(wireName: r'username') String get username; @nullable - @BuiltValueField(wireName: 'firstName') + @BuiltValueField(wireName: r'firstName') String get firstName; @nullable - @BuiltValueField(wireName: 'lastName') + @BuiltValueField(wireName: r'lastName') String get lastName; @nullable - @BuiltValueField(wireName: 'email') + @BuiltValueField(wireName: r'email') String get email; @nullable - @BuiltValueField(wireName: 'password') + @BuiltValueField(wireName: r'password') String get password; @nullable - @BuiltValueField(wireName: 'phone') + @BuiltValueField(wireName: r'phone') String get phone; /* User Status */ @nullable - @BuiltValueField(wireName: 'userStatus') + @BuiltValueField(wireName: r'userStatus') int get userStatus; // Boilerplate code needed to wire-up generated code diff --git a/samples/client/petstore/dart-dio/lib/model/user.g.dart b/samples/client/petstore/dart-dio/lib/model/user.g.dart index 2b277e1d49..5a04b4804c 100644 --- a/samples/client/petstore/dart-dio/lib/model/user.g.dart +++ b/samples/client/petstore/dart-dio/lib/model/user.g.dart @@ -17,32 +17,55 @@ class _$UserSerializer implements StructuredSerializer { @override Iterable serialize(Serializers serializers, User object, {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'id', - serializers.serialize(object.id, specifiedType: const FullType(int)), - 'username', - serializers.serialize(object.username, - specifiedType: const FullType(String)), - 'firstName', - serializers.serialize(object.firstName, - specifiedType: const FullType(String)), - 'lastName', - serializers.serialize(object.lastName, - specifiedType: const FullType(String)), - 'email', - serializers.serialize(object.email, - specifiedType: const FullType(String)), - 'password', - serializers.serialize(object.password, - specifiedType: const FullType(String)), - 'phone', - serializers.serialize(object.phone, - specifiedType: const FullType(String)), - 'userStatus', - serializers.serialize(object.userStatus, - specifiedType: const FullType(int)), - ]; - + final result = []; + if (object.id != null) { + result + ..add('id') + ..add(serializers.serialize(object.id, + specifiedType: const FullType(int))); + } + if (object.username != null) { + result + ..add('username') + ..add(serializers.serialize(object.username, + specifiedType: const FullType(String))); + } + if (object.firstName != null) { + result + ..add('firstName') + ..add(serializers.serialize(object.firstName, + specifiedType: const FullType(String))); + } + if (object.lastName != null) { + result + ..add('lastName') + ..add(serializers.serialize(object.lastName, + specifiedType: const FullType(String))); + } + if (object.email != null) { + result + ..add('email') + ..add(serializers.serialize(object.email, + specifiedType: const FullType(String))); + } + if (object.password != null) { + result + ..add('password') + ..add(serializers.serialize(object.password, + specifiedType: const FullType(String))); + } + if (object.phone != null) { + result + ..add('phone') + ..add(serializers.serialize(object.phone, + specifiedType: const FullType(String))); + } + if (object.userStatus != null) { + result + ..add('userStatus') + ..add(serializers.serialize(object.userStatus, + specifiedType: const FullType(int))); + } return result; } @@ -126,32 +149,7 @@ class _$User extends User { this.password, this.phone, this.userStatus}) - : super._() { - if (id == null) { - throw new BuiltValueNullFieldError('User', 'id'); - } - if (username == null) { - throw new BuiltValueNullFieldError('User', 'username'); - } - if (firstName == null) { - throw new BuiltValueNullFieldError('User', 'firstName'); - } - if (lastName == null) { - throw new BuiltValueNullFieldError('User', 'lastName'); - } - if (email == null) { - throw new BuiltValueNullFieldError('User', 'email'); - } - if (password == null) { - throw new BuiltValueNullFieldError('User', 'password'); - } - if (phone == null) { - throw new BuiltValueNullFieldError('User', 'phone'); - } - if (userStatus == null) { - throw new BuiltValueNullFieldError('User', 'userStatus'); - } - } + : super._(); @override User rebuild(void Function(UserBuilder) updates) => diff --git a/samples/client/petstore/dart-dio/lib/serializers.g.dart b/samples/client/petstore/dart-dio/lib/serializers.g.dart index 8106577235..24717f2afb 100644 --- a/samples/client/petstore/dart-dio/lib/serializers.g.dart +++ b/samples/client/petstore/dart-dio/lib/serializers.g.dart @@ -12,7 +12,13 @@ Serializers _$serializers = (new Serializers().toBuilder() ..add(Order.serializer) ..add(Pet.serializer) ..add(Tag.serializer) - ..add(User.serializer)) + ..add(User.serializer) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(String)]), + () => new ListBuilder()) + ..addBuilderFactory( + const FullType(BuiltList, const [const FullType(Tag)]), + () => new ListBuilder())) .build(); // ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new